You are not logged in.

axtens

Trainee

  • "axtens" is male
  • "axtens" started this thread

Posts: 37

Date of registration: Mar 16th 2009

Location: Perth, WA, Australia

Occupation: Software/Test Engineer

Hobbies: be a husband and a dad, play ukulele, sing

  • Send private message

1

Sunday, October 4th 2009, 8:02pm

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.

Rate this thread
WoltLab Burning Board