As an end user, I probably would not think "com 3" vs "com 7" (or whatever). I would like the product to work whether I plug it into the left side of the laptop or the right side of the laptop. So, if I started off with plugging it into the "first USB socket on the right side" and got it all set-up for my liking... There needs to be an easy way for me the user if next time I plugged it into the left side of the laptop. I would found it very annoying if I have to go through the entire setup process again - particularly if I have multiple devices and/or multiple laptops. And then, God forbid, I went and purchased a couple of USB Hubs... Now I have to go through the whole darn thing again...
That's pretty much how seems to work under Windows ... every time you put the same device into a new USB socket, it gets assigned a new COM port.
It would be nice if the OS just used the VID/PID/serial# as a unique identifier assigning it the same COM port no matter what USB socket it happens to be plugged in to. Although this would cause problem with CH340's which seem have default serial# == 0.
I recently did a update program for a product using a USB serial port. When the user launches the update program, it tells him to connect the USB cable, and that if it is already connected he should disconnect it, and also that he should not connect/disconnect anything else while the update program is running. It then waits for a change in the serial ports configuration.
If I see a serial port "go away", I issue a message that he should now reconnect it.
If I see a serial port of the correct PID/VID show up, I configure it and attempt to do the update.
This works quite well for in-frequent operations (such as updating), however it would become a PITA if you had to disconnect/connect the cable every time for more frequent functions. Perhaps default to the last COM port used, and offer a "Find my COM port" button doing the above when that COM port does not exist or does not respond as the expected device.
A fully automatic way would be on application startup to scan the USB serial ports and try any that are the correct VID/PID ... but I don't like software automatically communicating with random COM ports unless I've activated a function documented to do that. The disconnect/connect method is nice because it does not actually communicate with a port unless it appears during discovery.
Dave