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.

22 lines
692 B

  1. '***************************************************************************
  2. 'This script tests various "remote" methods on classes
  3. '***************************************************************************
  4. On Error Resume Next
  5. Set DiskClass = GetObject("winmgmts:CIM_LogicalDisk")
  6. 'Subclasses enumeration
  7. for each DiskSubclass in DiskClass.Subclasses_ ()
  8. WScript.Echo "Subclass name:", DiskSubclass.Path_.Relpath
  9. next
  10. 'Instance enumeration
  11. DiskClass.Security_.ImpersonationLevel = 3
  12. for each DiskSubclass in DiskClass.Instances_ (0)
  13. WScript.Echo "Instance Path:", DiskSubclass.Path_.Relpath
  14. next
  15. if Err <> 0 Then
  16. WScript.Echo Err.Description
  17. Err.Clear
  18. End if