Hi
I have the following script, which works fine for getting
some of the data requested but not all. I realise the
reason this occurs is thatin the line: "Select * from
Win32_ComputerSystem",,48)
it just specifies win32_computersystem. Is there a way to
specify multiple WMI objects in the same script?
-----------------
On Error Resume Next
strComputer = InputBox ("Enter Remote Computer Name or
Press Enter for local machine","Enter Remote Computer
Name",".")
Set objWMIService = GetObject("winmgmts:\\" & strComputer
& "\root\cimv2")
Set colItems = objWMIService.ExecQuery(
For Each objItem in colItems
Wscript.Echo "Wallpaper: " & objItem.Wallpaper
Wscript.Echo "Domain: " & objItem.Domain
Wscript.Echo "Manufacturer: " & objItem.Manufacturer
Wscript.Echo "Model: " & objItem.Model
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "NumberOfProcessors: " &
objItem.NumberOfProcessors
Wscript.Echo "PrimaryOwnerName: " &
objItem.PrimaryOwnerName
Wscript.Echo "SystemType: " & objItem.SystemType
Wscript.Echo "TotalPhysicalMemory: " &
objItem.TotalPhysicalMemory
Wscript.Echo "UserName: " & objItem.UserName
Wscript.Echo "Computer name: " &
objComputer.MachineName
Wscript.Echo "Start Time: " & objItem.StartTime
Next