[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


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

Posted on 2011-03-14
Medium Priority
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.
Question by:csd32129
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
LVL 51

Expert Comment

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.

Author Comment

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.
LVL 51

Expert Comment

ID: 35140808

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.

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Author Comment

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

Expert Comment

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



Author Comment

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
LVL 51

Accepted Solution

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.

LVL 59

Expert Comment

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.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

650 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