NIM Posted August 22, 2006 Share Posted August 22, 2006 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.