Hi Gary,
Thanks for your reply.
I can execute the script in vb.
But how does that translate for the 'default.js' - file in the
'Microsoft Visual Studio .NET 2003\Vb7\VBWizards - Subfolders'?
This is what I cameup with until now (but evedently does not work)
ComputerSystemSet = new ActiveXObject("WbemScripting.SWbemObjectSet");
css = new ActiveXObject("WbemScripting.SWbemObject");
var userName;
ComputerSystemSet =
GetObject("winmgmts:{impersonationLevel=impersonat e}").InstancesOf("Win32_ComputerSystem");
For Each css In ComputerSystemSet
userName = css.UserName;
Next
Regards,
Michael
Gary Chang wrote:
Hi Michael,
Try the WMI scripting:
'using the Microsoft WMI Scripting Library.
Imports WbemScripting
Dim ComputerSystemSet As SWbemObjectSet
Dim css As SWbemObject
Dim userName As String
ComputerSystemSet =
GetObject("winmgmts:{impersonationLevel=impersona te}").InstancesOf("Win32_Co
mputerSystem")
For Each css In ComputerSystemSet
userName = css.UserName
Next
Wish it helps!
Best regards,
Gary Chang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------