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
979 B

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