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.

10 lines
449 B

  1. // The following samples retrieves the associators of an
  2. // instance of Win32_LogicalDisk which are associated via the
  3. // class Win32_LogicalDiskToPartition
  4. var objServices = GetObject('cim:root/cimv2');
  5. var objEnum = objServices.AssociatorsOf('Win32_LogicalDisk="C:"', 'Win32_LogicalDiskToPartition');
  6. var e = new Enumerator (objEnum);
  7. for (;!e.atEnd();e.moveNext ()){
  8. var p = e.item ();
  9. WScript.Echo (p.Path_.DisplayName);
  10. }