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.
 
 
 
 
 
 

27 lines
854 B

'***************************************************************************
'This script tests the enumeration of subclasses
'***************************************************************************
On Error Resume Next
Set Service = GetObject("winmgmts:")
Set DiskSubclass = Service.Get("CIM_LogicalDisk").SpawnDerivedClass_()
'Set the name of the subclass
DiskSubClass.Path_.Class = "SUBCLASSTEST00"
'Add a property to the subclass
Set NewProperty = DiskSubClass.Properties_.Add ("MyNewProperty", 19)
NewProperty.Value = 12
'Add a qualifier to the property with an integer array value
NewProperty.Qualifiers_.Add "MyNewPropertyQualifier", Array (1,2,3)
'Persist the subclass in CIMOM
DiskSubclass.Put_ ()
'Now delete it
Service.Delete "SUBCLASSTEST00"
if Err <> 0 Then
WScript.Echo Err.Description
Err.Clear
End if