Showing results for 
Search instead for 
Did you mean: 

how to get the list of USB connected devices

Go to solution

I am looking for a simple function in labview to progammatically scan for connected devices and list them.
This query concerns USB devices of all types: storage media, printer, mouse, game controller, networking accessory...
Does .NET offer any solution ?



0 Kudos
Message 1 of 4
Accepted by topic author Eric_H
0 Kudos
Message 2 of 4



The .NET method works but I found that the returned data is non descriptive (or lacks identifiable friendly names of devices). 


My search plus a suggestion from smercurio landed me on this page.


The usbdeview.exe utility has many command line options including one that returns user friendly names of the usb devices query'ed.


Here is a LabVIEW 2014 wrapper that implements the usbdeview.exe utility and returns data for actively connected USB devices and saves that data in a file.


The info returned is comprehensive enough to be able to identity the USB device correctly as described.




Download All
0 Kudos
Message 3 of 4



Here is an example of the detailed info returned by the usbdeview.exe utility for a connected USB device. This case is for the USB4 Encoder DAQ board from US Digital.


Device Name : USB4 Adapter
Description : US Digital USB4 fully functional
Device Type : Vendor Specific
Connected : Yes
Safe To Unplug : Yes
Disabled : No
USB Hub : No
Drive Letter :
Serial Number :
Registry Time 1 : 7/27/2021 1:55:17 PM
Registry Time 2 : 7/27/2021 1:55:47 PM
VendorID : 09c9
ProductID : 0044
Firmware Revision : 0.00
USB Class : ff
USB SubClass : 00
USB Protocol : 00
Hub / Port : Hub 6, Port 2
Computer Name : MEZ-LV14
Vendor Name :
Product Name :
ParentId Prefix :
Service Name : CYUSB3
Service Description: US Digital USB4 Driver Using CyUSB3.sys
Driver Filename : CYUSB3.sys
Device Class : Encoder Interface
Device Mfg : %MfgName%
Friendly Name :
Power : 100 mA
USB Version : 2.00
Driver Description: US Digital USB4 fully functional
Driver Version :
Driver InfSection : CYUSB3
Driver InfPath : oem12.inf
Instance ID : USB\VID_09C9&PID_0044\8&3242ce6d&0&2
Capabilities : Removable, SurpriseRemovalOK
Install Time :
First Install Time:
Connect Time :
Disconnect Time :

0 Kudos
Message 4 of 4