Windows OS Hub
  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2012
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Group Policies
  • Windows Clients
    • Windows 10
    • Windows 8
    • Windows 7
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
  • PowerShell
  • Exchange

 Windows OS Hub / Windows 7 / How to Clean Up and Reset COM ports in Windows 7

May 12, 2016 Windows 7

How to Clean Up and Reset COM ports in Windows 7

Each time when you connect a new COM device or a USB device (true for modems, smartphones, Bluetooth, serial-to-USB converters, etc.), Windows detects it using Plug-n-Play and assigns it some COM port number in the range of 1 to 255. If this device is connected again, the reserved port is assigned to it. A new device gets the first free COM port number. It often occurs that, when being connected, the external devices create several COM ports at once. In my case after connecting a Bluetooth adapter 10!!! new COM ports has appeared in the system.

A number of applications (quite obsolete, as a rule) are able to address only two-digit COM port numbers and won’t work with COM100 or higher. In the worst cases, these programs work only with COM1-COM9 ports. What if a device has got a higher number? Could the numbering scheme of the reserved COM ports be reset and the assigned ports be deleted? Let’s try to deal with it in Windows 7.

Contents:
  • How to Change a COM Port Number for a Specific Device
  • How to Reset COM Port Binding Using the Registry

As a rule, you are not able to change the assigned COM port in the hardware properties, since the system says that all “lower” COM ports are already in use.

Change COM port assigment

How to Change a COM Port Number for a Specific Device

First of all, try to reassign the COM port number for a specific COM device manually. Suppose that the necessary COM port is already busy and we would like to free it.

  1. Start the Device Manager as follows:
    set devmgr_show_nonpresent_devices=1
    start devmgmt.msc
    devmgr_show_nonpresent_devices
  2. Select View->Show Hidden Devices in the console menu.Show Hidden Devices
  3. Expand  Ports (COM & LPT) branch and find the device, which is assigned the necessary COM port in the list. (A pale icon means that this COM port is already assigned, but currently the device is not connected) Right-click it and select Uninstall.Uninstall COM device
  4. The freed up COM port can be assigned to another device. Find your device in the same branch, and open the Properties window. Then go to the Port Settings tab and click Advanced. In the dropdown list, select the free COM port.com port number

This method is not always useful in trying to free up a busy COM port. Then you will have to make some changes to the registry.

How to Reset COM Port Binding Using the Registry

The information about busy COM ports is stored in CommDB registry key in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arbiter section.

  • Open the Registry Editor (regedit) and go to the branch mentioned above.COM Name Arbiter
    Important! We strongly recommend to back up this registry branch (File -> Export) before doing anything. If something goes wrong, you can get back to the original port configuration.
  • The value of ComDB parameter in the binary format determines the list of COM ports reserved in the system. Each bit determines the state of the corresponding port (from 1 to 255). For example, if you need to leave the reservation only for COM3, the hex value of ComDB is equal to 04 (0000 0100)  ComDB
    Important! Be very attentive, and don’t add any additional bits to the parameter, or the system will display the BSOD.
  • If you have to reset all COM port bindings, change the value of ComDB to 0.reset com port
    Note. In  HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM section, you can see the list of COM ports connected to the system.SERIALCOMM
  • The HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports branch contains the list of all assigned COM ports. All unnecessary ports may be deleted. In our example, we’ll leave only COM3 and delete the rest ports.used com ports
  • Unplug all external devices and restart your computer.
  • After the restart, connect the devices in the necessary order. (Reinstall USB-to-serial converters, etc.) All COM ports found by the system will be automatically identified by the system and assigned the COM port numbers one by one.

3 comments
0
Facebook Twitter Google + Pinterest
previous post
Configuring Remote Control in SCCM 2012
next post
How to Install TFTP Server on Windows Server 2012 R2

Related Reading

How to Reduce Windows.edb Huge File Size?

October 19, 2020

Managing System Reserved Partition in Windows 10

October 9, 2020

How to Restore Deleted EFI System Partition in...

July 29, 2020

How to Clear RDP Connections History in Windows?

June 9, 2020

How to Create a UEFI Bootable USB Drive...

June 2, 2020

3 comments

Mahmood February 11, 2018 - 8:04 am

Hi dear
When I open Device Manager there is no branch of (COM & LPT) to expand. How can I Add or Find it?

Reply
mahdi August 26, 2018 - 11:36 am

thank you so much

Reply
zack January 24, 2020 - 6:16 am

thanks you so much , life saving post 🙂 , i mostly work with iot devices and sometime com ports get busy and am getting com port busy returns in code so this saved my life in flushing com port

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange
  • Windows 10
  • Windows 8
  • Windows 7
  • Windows Server 2016
  • Windows Server 2012 R2
  • Windows Server 2008 R2
  • PowerShell
  • VMWare
  • MS Office

Recent Posts

  • Accessing USB Flash Drive from VMWare ESXi

    February 26, 2021
  • How to Sign a PowerShell Script (PS1) with a Code Signing Certificate?

    February 25, 2021
  • Change the Default Port Number (TCP/1433) for a MS SQL Server Instance

    February 24, 2021
  • How to Shadow (Remote Control) a User’s RDP session on RDS Windows Server 2016/2019?

    February 22, 2021
  • Configuring PowerShell Script Execution Policy

    February 18, 2021
  • Configuring Proxy Settings on Windows Using Group Policy Preferences

    February 17, 2021
  • Updating Group Policy Settings on Windows Domain Computers

    February 16, 2021
  • Managing Administrative Shares (Admin$, IPC$, C$, D$) in Windows 10

    February 11, 2021
  • Packet Monitor (PktMon) – Built-in Packet Sniffer in Windows 10

    February 10, 2021
  • Fixing “Winload.efi is Missing or Contains Errors” in Windows 10

    February 5, 2021

Follow us

woshub.com
  • Facebook
  • Twitter
  • RSS
Popular Posts
  • How to Remove Unused Drivers from Driver Store
  • Windows Update Error 0x80244022 and WsusPool Memory Limit
  • How Windows Determines That the File Has Been Downloaded from the Internet
  • How to Delete OEM Recovery Partition Using Diskpart
  • Unable to Install Print Driver after KB3170455
  • GPO Logging Using Gpsvc.log in Windows 7
  • Using Process Monitor to Solve a Slow Boot Problems
Footer Logo

@2014 - 2018 - Windows OS Hub. All about operating systems for sysadmins


Back To Top