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.

12 lines
456 B

  1. '***************************************************************************
  2. 'This script tests the enumeration of instances
  3. '***************************************************************************
  4. On Error Resume Next
  5. for each Disk in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("CIM_LogicalDisk")
  6. WScript.Echo "Instance:", Disk.Path_.Relpath
  7. next
  8. if Err <> 0 Then
  9. WScript.Echo Err.Description
  10. Err.Clear
  11. End if