Question

Locked

what is the line?

By wancona ·
I know that the object for searching Windows 2000 is WinNT when writing a batch file such as this piece:

Set objUser = GetObject("WinNT://" & strComputer & "/Administrator")

what would I use in place of that for Windows Small Business Server 2003

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

VBScript

by dan.cox In reply to what is the line?

Not sure about batch file but it is easy from VBScript file.
Try this.


strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_ComputerSystem")

For Each objItem in colItems
Wscript.Echo objItem.UserName
Next

Back to Networks Forum
1 total post (Page 1 of 1)  

Related Forums