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.

35 lines
965 B

  1. Set Service = GetObject("winmgmts:")
  2. On Error Resume Next
  3. Set aClass = Service.Get("Win32_BaseService")
  4. for each Property in aClass.Properties_
  5. if VarType(Property) = vbNull then
  6. WScript.Echo Property.Name, Property.Origin, Property.IsLocal, Property.IsArray
  7. else
  8. WScript.Echo Property.Name, Property, Property.Origin, Property.IsLocal, Property.IsArray
  9. end if
  10. for each Qualifier in Property.Qualifiers_
  11. if IsArray(Qualifier) then
  12. Dim strArrayContents
  13. V = Qualifier
  14. strArrayContents = " " & Qualifier.Name & " {"
  15. For x =0 to UBound(V)
  16. if x <> 0 Then
  17. strArrayContents = strArrayContents & ", "
  18. ENd If
  19. strArrayContents = strArrayContents & V(x)
  20. If Err <> 0 Then
  21. WScript.Echo Err.Description
  22. Err.Clear
  23. End If
  24. Next
  25. strArrayContents = strArrayContents & "}"
  26. WScript.Echo strArrayContents
  27. else
  28. WScript.Echo " ", Qualifier.Name, Qualifier
  29. end if
  30. Next
  31. Next