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.

25 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. var locator = WScript.CreateObject ("WbemScripting.SWbemLocator");
  6. var service = locator.ConnectServer (".", "root/default");
  7. var Class = service.Get();
  8. Class.Path_.Class = "QUAL00";
  9. Class.Qualifiers_.Add ("q1", 327, true, false, false);
  10. WScript.Echo ("The initial value of q1 is", Class.Qualifiers_("q1"));
  11. //Verify we can report the qualifier value
  12. var v = Class.Qualifiers_("q1");
  13. WScript.Echo ("By indirection q1 has value:",v);
  14. //Verify we can report the value directly
  15. WScript.Echo ("By direct access q1 has value:", Class.Qualifiers_("q1"));
  16. //Verify we can set the value of a single qualifier value element
  17. Class.Qualifiers_("q1") = 234;
  18. WScript.Echo ("After direct assignment q1 has value:", Class.Qualifiers_("q1"));
  19. Class.Put_ ();