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.

21 lines
787 B

  1. //***************************************************************************
  2. //This script tests the enumeration of subclasses
  3. //***************************************************************************
  4. var Service = GetObject("winmgmts:");
  5. var DiskSubClass = Service.Get("CIM_LogicalDisk").SpawnDerivedClass_();
  6. //Set the name of the subclass
  7. DiskSubClass.Path_.Class = "SUBCLASSTEST00";
  8. //Add a property to the subclass
  9. var NewProperty = DiskSubClass.Properties_.Add ("MyNewProperty", 19);
  10. NewProperty.Value = 12;
  11. //Add a qualifier to the property with an integer array value
  12. NewProperty.Qualifiers_.Add ("MyNewPropertyQualifier", new Array (1,2,3));
  13. //Persist the subclass in CIMOM
  14. DiskSubClass.Put_ ();
  15. //Now delete it
  16. Service.Delete ("SUBCLASSTEST00");