This blog has permanently moved to

Contact Form | Email Address

© 2018 All rights reserved by Boseji

Thank you for all your support.

Sunday, November 6, 2011

Removal of old Serial Port entries and COM port Re-assignment in Windows

Many time we have see that we are stuck with some odd serial port Numbers such as COM58, COM86 and all. We were bugged up with this issue as we have several Bluetooth dongles and each creates it own set of 10 COM ports!
To make matters worse when the 2-digit COM numbers is exhausted then 3-digit code like COM103 or COM112 are listed. Most of the Serial port terminal programs support only 2-digit code. And if you happen to have some old piece of software that expect the COM to be a single digit one like COM3 or COM9 then you hit the road block.
This problem has happened to us several times. We found some quick workaround to fix this. The platform being Windows XP Professional in consideration, but should work for Windows 7 also.
Here are the steps to achieve this:
  1.  Open Regedit :
    • From Start Menu click on Run and then type regedit in the text provided
    • Make sure you are logged in as Administrator in Windows XP else in Windows 7 it would ask for Administrator permission.
  2. Navigate to the Key:
    HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/COM Name Arbiter
    • Looks something like this:
      Regedit Window showing the CommDB option
    • Now Right click on CommDB and click on Modify..
    • This will show a window like this:
    • The Value of the CommDB would be some thing like COMDB = FC FF FF 03... or some thing similar. Now this indicates the number of ports occupied in binary. Each bit represents a COM port slot being occupied.
      For Example if you have COM1 , COM2 and COM4
      then COMDB = 0B 00 00... in => Binary (0000)u (1011)l = (0D) hex
    • So accordingly first calculate the value of the COM ports that you have on your PC at all times and cleat off rest of the bits.
    • For our case we have COM3 at all times representing the built-in Modem so our value would be Binary (0000)u (0100)l = (04) hex
    • Here is the modified window:
    • Note: Make sure you dont add additional bytes to this entry or it would cause System Crash
    • This completes the second step
  3. Navigate to the Key:
    • Here you can see all the COM ports currently present or are plugged into the computer
    • For our case we don't have any other ports than the Modem so here is how it looks like:
    • If you need first uninstall the ports from pc and check if they are update here.
  4. Navigate to the Key:
    HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/CurrentVersion/Ports
    • Here you would be able to see all the assigned COM ports available
    • This is how it would look like:
    • Delete the COM ports that you don't need. For Example we needed only COM3 rest all COM port entries can be deleted.
    • Make sure you dont delete any other ports else System Crash
  5. Now reboot the PC
Now when ever you plug in the new hardware if it shows the old port then just uninstall the driver and plug it back again. It should get a new port assigned.

For more info Read the following:

No comments:

Post a Comment