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.

17 lines
732 B

  1. '***************************************************************************
  2. 'This script tests the enumeration of instances using XML/HTTP
  3. '***************************************************************************
  4. On Error Resume Next
  5. Dim objLocator
  6. Set objLocator = CreateObject("WbemScripting.SWbemLocator")
  7. ' Replace the first argument to this function with the URL of your WMI XML/HTTP server
  8. ' For the local machine, use the URL as below
  9. Dim objService
  10. Set objService = objLocator.ConnectServer("[http://localhost/cimom]", "root\cimv2")
  11. ' Now enumerate the processors on your machine
  12. for each processor in objService.InstancesOf ("Win32_processor")
  13. WScript.Echo "Processor:", processor.description
  14. next