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.

41 lines
1.1 KiB

  1. '
  2. ' test7.vbs
  3. '
  4. ' query device registry
  5. '
  6. Dim WshShell
  7. Dim DevCon
  8. Dim Devs
  9. Dim Dev
  10. Dim Reg
  11. Dim Str
  12. Dim StrStr
  13. SET WshShell = WScript.CreateObject("WScript.Shell")
  14. SET DevCon = WScript.CreateObject("DevCon.DeviceConsole")
  15. SET Devs = DevCon.DevicesBySetupClasses("NET",,"\\jamiehun-dev")
  16. Count = Devs.Count
  17. Wscript.Echo "net: Count="+CStr(Count)
  18. 'on error resume next
  19. FOR EACH Dev IN Devs
  20. WScript.Echo Dev + ": " + Dev.Description
  21. Reg = Dev.RegRead("SW\DriverVersion")
  22. WScript.Echo "Driver Version = " + CStr(Reg)
  23. SET Reg = Dev.RegRead("SW\Linkage\UpperBind")
  24. StrStr = ""
  25. FOR EACH Str IN Reg
  26. StrStr = StrStr + " " + Str
  27. NEXT
  28. WScript.Echo "SW\Linkage\UpperBind =" + StrStr
  29. Reg = Dev.RegRead("HW\InstanceIndex")
  30. WScript.Echo "Instance Index = " + CStr(Reg)
  31. Reg = Dev.RegRead("SW\DriverDesc")
  32. WScript.Echo "Driver Description = " + CStr(Reg)
  33. Dev.RegWrite "SW\DriverDesc2",Reg
  34. Reg = Dev.RegRead("SW\DriverDesc2")
  35. WScript.Echo "Driver Description (copy) = " + CStr(Reg)
  36. Dev.RegDelete "SW\DriverDesc2"
  37. NEXT