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.

11 lines
456 B

  1. //***************************************************************************
  2. //This script tests the enumeration of instances
  3. //***************************************************************************
  4. var Disks = GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("CIM_LogicalDisk");
  5. WScript.Echo ("There are", Disks.Count, " Disks");
  6. var Disk = Disks('Win32_LogicalDisk.DeviceID="C:"');
  7. WScript.Echo (Disk.Path_.Path);