Click here to Skip to main content
15,906,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

I have a USB to RS-232 device which I use to communicate with various equipment. However, whenever I plug it into a USB port then COM port number changes from the last time I plugged it in, for example, yesterday it registered as COM1 and today it is COM8.
Now, I know I can go into the device manager and change it manually, but that is a pain. I would like to write a script that I can run and it will look for my device, get its assigned com port number and change it to the number I want (for example, I always want it to be COM1).
The reason I need this is because I am using a commercial application that is set to use only that particular com port.
So, where do I start?

Thanks,

Sean
Posted

1 solution

Well, first and best advice would be to trash your "commercial application" and blacklist the company which develop this stuff :). Well, beyond the jokes...

If you cannot afford that step, there is a class of utilities called "COM Port Redirector"; it will do the trick. See:

http://en.lmgtfy.com/?q=com+port+redirector[^]

Good luck!
—SA
 
Share this answer
 
v2
Comments
fjdiewornncalwe 2-Feb-11 14:41pm    
Excellent sense of humor... (ummm.. Link too)
Sergey Alexandrovich Kryukov 2-Feb-11 14:53pm    
Thanks a lot, Marcus.

This is not just humor, this is real life. Working in the companies which use legacy is a fight to replace the legacy with something that really works, also fighting with morons who think this is just waste if time :-) -- yes, ugly truth of real life.
--SA
Espen Harlinn 2-Feb-11 15:48pm    
Practical answer, 5+

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900