- Get the
devcon
utility if you don't have it already. It is a highly recommended tool. Instructions here
- Unplug all USB devices from accessible ports, for example a webcam is USB as well, but you cannot really unplug it.
- Plug in a device you know, something with a specific name is easier than a mouse. In the sample I used an ACR38.
- List USB devices using
devcon find *usb*
(1).
- Find the port ID in the end of the device string, and write it down (2).
- Unplug the device and plug it in the next port, repeat two steps above until done (3).
- Now you know which ID is which port. Either memorize the list, or use scripting tool or editor macro that does a find/replace on the console output for eah item in the list. Then you could use a batch file to produce output like (4)
(1)
>devcon find *usb*
USB\VID_072F&PID_9000\6&4E08F0F&0&4 : ACR38 Smart Card Reader
USB\VID_8086&PID_0189\6&3023DF2C&0&5 : Generic Bluetooth Adapter
USB\VID_0C45&PID_642A\6&174C4A1&0&4 : USB Composite Device
USB\VID_8087&PID_0024\5&120253F1&0&1 : Generic USB Hub
NUSB3\ROOT_HUB30\5&24981BD0&0 : Renesas Electronics USB 3.0 Root Hub
USB\VID_0C45&PID_642A&MI_00\7&2669BE51&0&0000 : Integrated Webcam
USB\ROOT_HUB20\4&1D3C1330&0 : USB Root Hub
USB\VID_8087&PID_0024\5&7937534&0&1 : Generic USB Hub
USB\ROOT_HUB20\4&236B341D&0 : USB Root Hub
9 matching device(s) found.
(2)
6&4E08F0F&0&4 = Port A (front right)
(3)
>devcon find *usb*
USB\VID_072F&PID_9000\6&4E08F0F&0&3 : ACR38 Smart Card Reader
USB\VID_8086&PID_0189\6&3023DF2C&0&5 : Generic Bluetooth Adapter
USB\VID_0C45&PID_642A\6&174C4A1&0&4 : USB Composite Device
USB\VID_8087&PID_0024\5&120253F1&0&1 : Generic USB Hub
NUSB3\ROOT_HUB30\5&24981BD0&0 : Renesas Electronics USB 3.0 Root Hub
USB\VID_0C45&PID_642A&MI_00\7&2669BE51&0&0000 : Integrated Webcam
USB\ROOT_HUB20\4&1D3C1330&0 : USB Root Hub
USB\VID_8087&PID_0024\5&7937534&0&1 : Generic USB Hub
USB\ROOT_HUB20\4&236B341D&0 : USB Root Hub
9 matching device(s) found.
6&4E08F0F&0&4 = Port A (front right)
6&4E08F0F&0&3 = Port B (front left)
(4)
After plugging in a mouse and doing find/replace in a macro with Notepad++ these are the first two lines of the output now:
USB\VID_072F&PID_9000\Port A (front right) : ACR38 Smart Card Reader
USB\VID_1532&PID_0013\Port B (front left) : USB Composite Device
[Note this answer requires the commandline, but I doubt this can be done with a simple UI like Device Manager, so I'll post it anyway. Also, I verified it only on one computer, so please verify this yourself first.]