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.

26 lines
747 B

  1. //***************************************************************************
  2. //This script tests various "remote" methods on classes
  3. //***************************************************************************
  4. var DiskClass = GetObject("winmgmts:CIM_LogicalDisk");
  5. //Subclasses enumeration
  6. var e = new Enumerator (DiskClass.Subclasses_ ());
  7. for (;!e.atEnd();e.moveNext ())
  8. {
  9. var DiskSubclass = e.item ();
  10. WScript.Echo ("Subclass name:", DiskSubclass.Path_.Relpath);
  11. }
  12. //Instance enumeration
  13. DiskClass.Security_.ImpersonationLevel = 3;
  14. e = new Enumerator (DiskClass.Instances_ ());
  15. for (;!e.atEnd();e.moveNext ())
  16. {
  17. var DiskSubclass = e.item ();
  18. WScript.Echo ("Instance path:", DiskSubclass.Path_.Relpath);
  19. }