Solved

How to use devcon to change the com port used by a device

Posted on 2011-03-14
9
1,925 Views
Last Modified: 2012-05-11
I am trying to write a bat file that will change the auto-selected com port used by a device to com port 8. I have a USB GPS device that needs to be on port 8. Once I install it on com port 8 then move it to another USB port I have to change the port that it is defaulted to back to com port 8. I need a BAT file that will do this for me. I believe using "devcon" from a command prompt may help but i just can't find any examples out there that show me how.
0
Comment
Question by:csd32129
  • 4
  • 3
9 Comments
 
LVL 51

Expert Comment

by:Netman66
Comment Utility
I don't think you can reassign like that using Devcon.

I *think* that Xp should remember this device if you plug it into each USB port and configure the Com port.

Is this not the case?

If not, please post the INF from the driver for this device.
0
 

Author Comment

by:csd32129
Comment Utility
It does remember the port once the settings have been changed but we use a USB hub and if I have to replace the hub then I have to fix the settings on all 28 possible ports it could be plugged into. I can not find an INF driver for this device. The drivers listed are serenum.sys and ser2pl.sys. They install via an exe file.
0
 
LVL 51

Expert Comment

by:Netman66
Comment Utility
Bummer...

See if you can find an OEM*.inf file in C:\Windows\Inf that relates to these drivers and post it.

Otherwise, I'm sure devcon isn't capable of this - which isn't surprising.  The INF might allow us to hardcode the COM port.

0
 

Author Comment

by:csd32129
Comment Utility
Found what I think is the INF. It's attached as a text file. oem108.txt
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 51

Expert Comment

by:Netman66
Comment Utility
Can you search your registry and export this key and its content?

{4D36E978-E325-11CE-BFC1-08002BE10318}

0
 

Author Comment

by:csd32129
Comment Utility
Here are a few of the keys I found. There were several found in the search these are just the first few.  keys.txt key2.txt key3.txt key4.txt key5.txt
0
 
LVL 51

Accepted Solution

by:
Netman66 earned 500 total points
Comment Utility
Ok, from what I've been able to gather up, you cannot assign a COM port number directly upon installation.  

The PnP enumerator uses APIs to call the ComDB and get the next free port number.

Apparently, there isn't a way to get around this that I've been able to find.

I guess you can keep using specific ports on the PC directly or the likelihood of the USB hub going bad isn't going to be high or happen often - so if all the ports have been mapped properly now, simply keep working with them as they are.

Sorry I couldn't offer up anything exciting!  It wasn't for the lack of trying though - I dug deep to try to understand a workaround, but I just don't think it exists.

0
 
LVL 59

Expert Comment

by:LeeTutor
Comment Utility
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

We have adopted the strategy to use Computers in Student Labs as the bulletin boards. The same target can be achieved by using a Login Notice feature in Group policy but it’s not as attractive as graphical wallpapers with message which grabs the att…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now