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.
26 lines
747 B
26 lines
747 B
//***************************************************************************
|
|
//This script tests various "remote" methods on classes
|
|
//***************************************************************************
|
|
|
|
var DiskClass = GetObject("winmgmts:CIM_LogicalDisk");
|
|
|
|
//Subclasses enumeration
|
|
var e = new Enumerator (DiskClass.Subclasses_ ());
|
|
|
|
for (;!e.atEnd();e.moveNext ())
|
|
{
|
|
var DiskSubclass = e.item ();
|
|
WScript.Echo ("Subclass name:", DiskSubclass.Path_.Relpath);
|
|
}
|
|
|
|
|
|
//Instance enumeration
|
|
DiskClass.Security_.ImpersonationLevel = 3;
|
|
e = new Enumerator (DiskClass.Instances_ ());
|
|
|
|
for (;!e.atEnd();e.moveNext ())
|
|
{
|
|
var DiskSubclass = e.item ();
|
|
WScript.Echo ("Instance path:", DiskSubclass.Path_.Relpath);
|
|
}
|
|
|