Is there a way using C# to identifying a device and associated child USB device(s)? For example I have a USB Zebra printer with a card reader mounted on it, and wish to know the card reader's name and identifying details i.e. build up a tree of associated devices.
USB Zebra Printer ---> USB Card Reader Name
Using a Powershell script I can see the devices I'm interested in;
gwmi Win32_USBControllerDevice |%{[wmi]($_.Dependent)} | Sort Manufacturer,Description,DeviceID | Ft -GroupBy Manufacturer Description,Service,DeviceID
Here's the output;
Windows shows this information in the printer properties;