Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Determine Which USB Devices are Connected to a ComputerContent of Determine Which USB Devices are Connected to a Computer.vbsMD5 Hash: 03FEB6A8A40A4E7F48FC51358293E39F |
||
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colDevices = objWMIService.ExecQuery _ ("Select * From Win32_USBControllerDevice") For Each objDevice in colDevices strDeviceName = objDevice.Dependent strQuotes = Chr(34) strDeviceName = Replace(strDeviceName, strQuotes, "") arrDeviceNames = Split(strDeviceName, "=") strDeviceName = arrDeviceNames(1) Set colUSBDevices = objWMIService.ExecQuery _ ("Select * From Win32_PnPEntity Where DeviceID = '" & strDeviceName & "'") For Each objUSBDevice in colUSBDevices Wscript.Echo objUSBDevice.Description Next Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |