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.

36 lines
1.1 KiB

  1. On Error Resume Next
  2. Set service = GetObject("winmgmts:root/cimv2:win32_service")
  3. 'Test the collection properties of IWbemMethodSet
  4. For each Method in service.Methods_
  5. WScript.Echo "***************************"
  6. WScript.Echo "METHOD:", Method.Name, "from class", Method.Origin
  7. WScript.Echo
  8. WScript.Echo " Qualifiers:"
  9. for each Qualifier in Method.Qualifiers_
  10. WScript.Echo " ", Qualifier.Name, "=", Qualifier
  11. Next
  12. WScript.Echo
  13. WScript.Echo " In Parameters:"
  14. if (Method.InParameters <> NULL) Then
  15. for each InParameter in Method.InParameters.Properties_
  16. WScript.Echo " ", InParameter.Name, "<", InParameter.CIMType, ">"
  17. Next
  18. End If
  19. WScript.Echo
  20. WScript.Echo " Out Parameters"
  21. if (Method.OutParameters <> NULL) Then
  22. for each OutParameter in Method.OutParameters.Properties_
  23. WScript.Echo " ", OutParameter.Name, "<", OutParameter.CIMType, ">"
  24. Next
  25. End If
  26. WScript.Echo
  27. WScript.Echo
  28. Next
  29. 'Test the Item and Count properties of IWbemMethodSet
  30. WScript.Echo service.Methods_("Create").Name
  31. WScript.Echo service.Methods_.Count