Dear visitor, welcome to Jabaco - Community.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
JACOB and WScript.Network
So far so good. The following works nicely. Okay, it's just a demo, but it bodes well for further use of JaBaCo on Windows.
|
Jabaco Source
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
Public Sub main(ByJava args() As String)
Dim myArgs() As String
myArgs = args
' [Your Source]
Dim oShell As ActiveXComponent
Set oShell = New ActiveXComponent("WScript.Network")
Dim a As String
Dim b As String
Dim c As String
Dim dShell As Dispatch
Set dShell = oShell.getObject()
a = Dispatch.call(dShell,"UserDomain")
b = Dispatch.call(dShell,"ComputerName")
c = Dispatch.call(dShell,"UserName")
MsgBox (a & ", " & b & ", " & c)
comthread.Release()
End Sub
|
Regards,
Bruce.