Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
754 B

'***************************************************************************
'This script tests the GetInstance operation using XML/HTTP
'***************************************************************************
on error resume next
Dim objLocator
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
Dim objService
Set objService = objLocator.ConnectServer("[http://localhost/cimom]", "root\cimv2")
if err <> 0 then
WScript.Echo ErrNumber, Err.Source, Err.Description
else
WScript.Echo "ConnectServer Succeeded"
end if
Set firstProcessor = objService.Get("win32_processor.DeviceID=""CPU0""")
if err <> 0 then
WScript.Echo ErrNumber, Err.Source, Err.Description
else
WScript.Echo firstProcessor.description
end if