Skip to content

Commit

Permalink
added pnpList.vbs, updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
todbot committed Mar 2, 2012
1 parent abea2ce commit bda9c9e
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pnpList.vbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'
' pnpList.vbs -- list all PNP devices, could contain COM ports
'
'

strComputer = "."
set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colDevices = objWMIService.ExecQuery _
("Select * From Win32_PnPEntity")

for each objDevice in colDevices
wscript.echo
wscript.echo "DeviceID:" & objDevice.DeviceID
wscript.echo "PNPDeviceID:" & objDevice.PNPDeviceID
wscript.echo "Caption:" & objDevice.Caption
wscript.echo "Description:" & objDevice.Description
wscript.echo "ConfigManagerErrorCode:" & objDevice.ConfigManagerErrorCode
next

0 comments on commit bda9c9e

Please sign in to comment.