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
583 B

  1. var obj = GetObject('winmgmts:{impersonationLevel=impersonate}!win32_diskpartition.DeviceId="Disk #0, Partition #1"');
  2. WScript.Echo (obj.Path_.Class);
  3. // Use the Enumerator helper to manipulate collections
  4. e = new Enumerator (obj.Associators_("", "Win32_ComputerSystem"));
  5. for (;!e.atEnd();e.moveNext ())
  6. {
  7. var y = e.item ();
  8. WScript.Echo (y.Name);
  9. }
  10. // Use the Enumerator helper to manipulate collections
  11. e = new Enumerator (obj.Associators_(null, "Win32_ComputerSystem"));
  12. for (;!e.atEnd();e.moveNext ())
  13. {
  14. var y = e.item ();
  15. WScript.Echo (y.Name);
  16. }