Share via

Windows 10 USB device COM port keeps changing from COM4 randomly

Fedda306 Anadi 0 Reputation points
2026-04-28T03:03:24.02+00:00

Hi, I’m working in a small industrial setup on Windows 10 where a USB-to-serial device must always enumerate as COM4 for a legacy control application we rely on in production. The annoying part is that even though we keep plugging it into the same physical USB port on the machine, Windows sometimes randomly assigns it a different COM number, which breaks the workflow and forces our technicians to manually reassign it in Device Manager during shifts. This is becoming a real operational headache on the shop floor, is there a reliable way to lock or permanently reserve a COM port for that device so Windows stops changing it?

Windows for business | Windows Server | Devices and deployment | Install Windows updates, features, or roles
0 comments No comments

1 answer

Sort by: Most helpful
  1. Tracy Le 9,280 Reputation points Independent Advisor
    2026-04-28T03:29:29.4933333+00:00

    Hi Fedda306 Anadi,

    The root cause is that your Windows COM Port Database (COMDB) is filled with "ghost" reservations. Every time there is a slight power fluctuation or micro-disconnect, Windows thinks it is a brand-new device and bumps it to the next available COM number to avoid conflicts.

    Here is the exact way to flush the database and permanently lock your device to COM4:

    Step 1: Clear the COM Port Database

    1. Unplug the USB-to-serial device from the machine.

    Press Windows key + R, type regedit, and hit Enter to open the Registry Editor.

    Navigate exactly to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arbiter

    On the right panel, right-click and Delete the ComDB entry. (Don't worry, Windows will automatically recreate a fresh, empty one).

    Restart your computer.

    Step 2: Lock the Port

    Plug the device back into its dedicated physical USB port.

    Open Device Manager and expand Ports (COM & LPT).

    Right-click your USB-to-serial device -> Properties -> Port Settings tab -> Advanced.

    Change the COM Port Number to COM4. (If it says COM4 is "in use", ignore the warning and force it, since we just cleared the database).

    Click OK on all windows. Your device will now strictly hold COM4 and stop jumping around. If this resolves your operational headache, please click "Accept Answer".

    Tracy.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.