How can I force a USB COM Serial COM port to a certain Port on a PC

cmdolcet
cmdolcet used Ask the Experts™
on
How can I control or force each device I plug my USB into to the same COM Port each time. Each time I plug my device in usign a USB cable it will always go to the next available which is COM 10 however I want it to go to COM 5....I know COM 5 isn;t being used however when USB is involved it jsut randomly pick a COM port.

Can anyone offer suggestions?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Todd GerbertIT Consultant
Top Expert 2010

Commented:
Not sure why this is in the Visual Basic zone, however...

I would imagine what COM port your USB/Serial adapter uses is going to be dependant on the driver for your adapter, and whether or not it even allows such a choice.  On my Belkin adapter I can use Device Manager to specify which COM port it should use.

Author

Commented:
Im trying to manually control this...using vb if possible
Todd GerbertIT Consultant
Top Expert 2010

Commented:
Well, that would explain the Visual Basic zone...

But you are talking about a USB to RS-232/serial adapter?  I'm thinking that's still going to be dependant on the driver, and whether or not the manufacturer has exposed any interfaces to allow for programatic control of their driver.
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

Author

Commented:
No there is no driver. I plug my device in with a USB cord. I see my USB COM Port in the COM Port section of the device manager however it is referring to COm 10 instead of COM 5
IT Consultant
Top Expert 2010
Commented:
Just because you don't like the answer doesn't make it wrong. ;)

Anyhow, there is in fact a driver (that's the software that makes your USB/RS-232 adapter work), and as I stated earlier how that driver is written will determine whether or not what you're asking is possible - you would need to consult documentation for driver.

Out of curiosity, what does it matter whether it's COM1, COM10 or COM72347?

Author

Commented:
to answer your question. I don know why my COM wont accept anything over COM10. I have VB 2003 because there is no COM control and I had to write my own class!. I may be doing somthing wrong however I ahven;t had the time to research the root cause. I figured that if It does see it as COM 10 i can force it to COM 1-9 like I manually already do

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial