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.

Thread display: Collapse - | Expand +

All Answers

Collapse -


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

Related Discussions

Related Forums