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.

29 lines
924 B

  1. '***************************************************************************
  2. 'This script tests the enumeration of subclasses 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://calvinids/cimom]", "root\cimv2")
  11. if Err <> 0 Then
  12. WScript.Echo Err.Description
  13. Err.Clear
  14. End if
  15. WScript.Echo objService.Get("win32_logicaldisk").Path_.Path
  16. ' Specify 2nd param of 1 0 here if you want sync
  17. for each subclass in objService.instancesOf ("win32_process")
  18. WScript.Echo subclass.Name
  19. exit for
  20. next
  21. if Err <> 0 Then
  22. WScript.Echo Err.Description
  23. Err.Clear
  24. End if