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.

49 lines
1.3 KiB

  1. On Error Resume Next
  2. while true
  3. Set Service = GetObject("winmgmts:root/default")
  4. Set Class = Service.Get()
  5. Class.Path_.Class = "Qualtest00"
  6. Set Qualifiers = Class.Qualifiers_
  7. Qualifiers.Add "qbool", true, true, true, false
  8. Qualifiers.Add "qsint32", 345
  9. Qualifiers.Add "qreal64", -345.675
  10. Qualifiers.Add "qstring", "freddy the frog"
  11. Qualifiers.Add "qstring2", "freddy the froggie", false
  12. Qualifiers.Add "qstring3", "freddy the froggies", false, false
  13. Qualifiers.Add "qstring4", "freddy the froggiess", true, false
  14. Qualifiers.Add "qstring5", "wibble", true, true, false
  15. Qualifiers.Add "aqbool", Array(true, false, true)
  16. Qualifiers.Add "aqsint32", Array (10, -12)
  17. Qualifiers.Add "aqreal64", Array(-2.3, 2.456, 12.356567897)
  18. Qualifiers.Add "aqstring", Array("lahdi", "dah", "wibble")
  19. Qualifiers("qsint32").Value = 7677
  20. WScript.Echo "There are", Qualifiers.Count, "Qualifiers in the collection"
  21. for each qualifier in Qualifiers
  22. If (IsArray(qualifier)) Then
  23. str = qualifier.Name & "={"
  24. for x=LBound(qualifier) to UBound(qualifier)
  25. v =qualifier
  26. str = str & v(x)
  27. if x <> UBound(qualifier) then
  28. str = str & ", "
  29. end if
  30. next
  31. str = str & "}"
  32. WScript.Echo str
  33. Else
  34. WScript.Echo qualifier.Name, "=", qualifier
  35. End If
  36. Next
  37. if Err <> 0 Then
  38. WScript.Echo Err.Description
  39. End if
  40. Class.Put_
  41. wend