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
1.0 KiB

  1. '***************************************************************************
  2. 'This script tests the manipulation of qualifier values, in the case that the
  3. 'qualifier is a not an array type
  4. '***************************************************************************
  5. Set Service = GetObject("winmgmts:root/default")
  6. On Error Resume Next
  7. Set aClass = Service.Get()
  8. aClass.Path_.Class = "SIMPLEQUALTEST00"
  9. aClass.Qualifiers_.Add "q1", 327, true, false, false
  10. WScript.Echo "The initial value of q1 is [327]:", aClass.Qualifiers_("q1")
  11. 'Verify we can report the qualifier value
  12. v = aClass.Qualifiers_("q1")
  13. WScript.Echo "By indirection q1 has value [327]:",v
  14. 'Verify we can report the value directly
  15. WScript.Echo "By direct access q1 has value [327]:", aClass.Qualifiers_("q1")
  16. 'Verify we can set the value of a single qualifier value element
  17. aClass.Qualifiers_("q1") = 234
  18. WScript.Echo "After direct assignment q1 has value [234]:", aClass.Qualifiers_("q1")
  19. aClass.Put_ ()
  20. if Err <> 0 Then
  21. WScript.Echo Err.Description
  22. Err.Clear
  23. End if