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.

24 lines
784 B

  1. '
  2. ' hardware.vbs
  3. '
  4. ' collect information about all files currently being used by drivers
  5. '
  6. SET WshShell = WScript.CreateObject("WScript.Shell")
  7. SET DevCon = WScript.CreateObject("DevCon.DeviceConsole")
  8. SET Devs = DevCon.DevicesByInterfaceClasses("{86e0d1e0-8089-11d0-9ce4-08003e301f73}")
  9. Count = Devs.Count
  10. Wscript.Echo "Serial: Count="+CStr(Count)
  11. 'on error resume next
  12. FOR EACH Dev IN Devs
  13. PortName = Dev.RegRead("HW\PortName")
  14. WScript.Echo PortName + " : " + Dev.Description
  15. IF Dev.HasInterface("{4d36e978-e325-11ce-bfc1-08002be10318}") THEN
  16. WScript.Echo " " + "Has serial enumerator"
  17. END IF
  18. IF Dev.HasInterface("{86e0d1e0-8089-11d0-9ce4-08003e301f73}") THEN
  19. WScript.Echo " " + "Has serial port"
  20. END IF
  21. NEXT