?
Solved

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

Posted on 2011-03-14
9
Medium Priority
?
2,071 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
9 Comments
 
LVL 51

Expert Comment

by:Netman66
ID: 35139616
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
ID: 35140746
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
ID: 35140808
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:csd32129
ID: 35140981
Found what I think is the INF. It's attached as a text file. oem108.txt
0
 
LVL 51

Expert Comment

by:Netman66
ID: 35141110
Can you search your registry and export this key and its content?

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

0
 

Author Comment

by:csd32129
ID: 35141363
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 2000 total points
ID: 35141432
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
ID: 35390555
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

741 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