Query which works for some devices found in Win32_USBHub
SELECT * FROM Win32_USBHub WHERE DeviceID = '{0}'
Here's the code context,
// Check if USB device is plugged in
string deviceQuery = String.Format("SELECT * FROM Win32_USBHub WHERE DeviceID = '{0}'", deviceID);
using (var searcher = new System.Management.ManagementObjectSearcher(deviceQuery))
if (searcher.Get().Count == 0)
MessageBox.Show(@"Device not detected");
However when a device is not listed inside 'Universal Serial Bus controllers', querying from Win32_USBHub
does not return the connected device I'm looking for.
Is there another 'table' to query outside from Win32_USBHub
which would contain device I'm looking for 'Cardio Perfect PRO-Link USB'? Or would this be a 'custom table'?