I am looking for the proper WMI Win32 or CIM Class property to find the location of a USB device. In device manager, shown below, the Location is known as "Port_#0002.Hub_#0009". Any ideas on the class and property that this is in the Windows API or if it is an arbitrary value Device Manager gives another property which is more cryptic. If the latter, what is the "more cryptic" class and property?
Image: https://i.sstatic.net/7Miwp.png
Use API SetupDiGetDeviceRegistryProperty
and const parameter SPDRP_LOCATION_INFORMATION.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With