Posted August 22, 200619 yr On error resume nextstrComputer = InputBox("Type in the name of the computer you want to query.") If strComputer > "" ThenSet objWMIService = GetObject("winmgmts:" _& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colComputer = objWMIService.ExecQuery _("Select * from Win32_ComputerSystem")For Each objComputer in colComputerWscript.Echo objComputer.UserNameNext Else Wscript.Quit End IfWscript.Quit
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now