Hardware

Comm Port Manager in Windows: Change and Manage COM Ports

There is no separate comm port manager in Windows: you manage COM ports in Device Manager. Expand Ports (COM & LPT), open the port's Properties, and use the advanced port settings to choose a different COM port number.

This article covers changing a number, what Windows does behind the scenes to hand numbers out, and why a number you set may not stay put. To only find out which COM port a device is using, see COM ports on this computer: how to find them in Windows.

How to change a COM port number in Device Manager

  1. Right-click the Start button and select Device Manager, or press Win + R, type devmgmt.msc and press Enter.
  2. Expand Ports (COM & LPT).
  3. Right-click the port and choose Properties.
  4. Open the port settings tab and click Advanced. A Microsoft Q&A answer words this as "Under Port tab > Advanced", so the exact tab label can differ between drivers.
  5. Change the COM port number and confirm with OK.

Afterwards, look at the entry in Device Manager again. The number in brackets after the device name, for example USB Serial Device (COM7), should show the new value. Then close and reopen the program that uses the port, because most programs read the list of ports only when they start.

What the COM port database does

Windows keeps a COM port database, and Microsoft documents a set of functions for it in the Win32 reference. Two of them explain most of the behavior you see.

  • ComDBClaimNextFreePort returns the lowest COM port number that is not already in use. When a number is claimed, it is logged as "in use".
  • ComDBReleasePort logs a number as "not in use". Microsoft's wording is that releasing a COM port number means to log the port number as "not in use".

Two details from that reference matter for you. First, the database does not contain information about the caller or device that claims a port number. It is a list of used and unused numbers, so it cannot by itself say that COM3 belongs to a particular adapter. Second, a port number is an integer from 1 up to a constant named COMDB_MAX_PORTS_ARBITRATED, and the claim function can fail with ERROR_NO_LOG_SPACE when the database cannot arbitrate any more port numbers.

Put together, this gives the practical picture. A new serial device normally receives the lowest free number. A number that was claimed and never released counts as taken, which is the usual reason a freshly plugged adapter lands on COM5 or COM8 even though only one adapter is connected. This article describes that as the likely cause, not as a documented guarantee, because the pages above do not walk through the Device Manager scenario.

Why the number you set may change back

The same Microsoft Q&A thread that gives the Device Manager steps also says that Windows manages the COM port number assignments, and that a device's COM port number may change after a reboot. It adds that with two identical USB devices attached, the assignment after a reboot is decided by Windows. The answers there do not promise that a manually set number survives unplugging or restarting. One user in the thread reports that it did stay after confirming the change, which is a single report and not a guarantee.

So treat the number as a setting you verify, not one you can rely on forever:

  • After changing it, restart the PC with the device attached and look at Device Manager again.
  • Plug the device into the same USB port each time. Moving a cable to another port is a common way to get a different number, and you should check after any such move.
  • If the software supports it, configure the port inside the program each time the device changes, or let the program find the device by something other than the number.

If the Advanced button is missing

The tabs in a port's Properties window come from the driver. A Microsoft Q&A poster describes a USB receiver whose Properties showed only General, Details and Events. If you see the same, there is no place in Device Manager to change the number for that device. Your options are to point your software at the number Windows assigned, or to check whether the device maker's driver or utility offers a setting.

The same thread has a warning about command-line port-remapping utilities. One poster reports that such a utility on Windows 10 "merely creates a mapping" and that commands such as mode, copy and type do not recognise it. That is one user's report and not tested here, so confirm with your own software before building on a remapping tool.

Quick reference

GoalWhereNote
See current numbersDevice Manager, Ports (COM & LPT)Number is in brackets after the name
Change a numberPort Properties, then AdvancedMissing for some drivers
Check it heldRestart with device attachedNumbers may change after a reboot
Understand "in use"COM port databaseRecords numbers only, not devices

If the port still does not work

  • Program says the port is busy. Close other programs that might hold it open, since a serial port is normally opened by one program at a time.
  • Program does not list the new number. Restart the program. If it still does not appear, compare against the lists in the article linked above.
  • Device shows a yellow warning icon. The driver did not load, so changing the number will not help. Reinstall the driver from the device maker first.
  • Settings such as baud rate. These live in your program or in the mode command, not in the port number. A wrong baud rate opens the port fine but produces unreadable text.

As of November 2026 the reference pages cited here describe the database functions but not a user-facing rename feature, so the guidance above is limited to what Microsoft's pages and the Q&A thread state.

Frequently asked questions

Is there a separate comm port manager program in Windows?
No separate program is needed. Windows manages COM port numbers itself, and the place to change one is Device Manager: open the port's Properties, find the advanced port settings and pick a different COM port number. Microsoft's API reference also describes a COM port database that records which numbers are in use, but that database is maintained by Windows and drivers, not by a tool you open.
Why does my USB serial device get a different COM number after a reboot?
Windows assigns the number, and a Microsoft Q&A answer states that a device's COM port number may change after a reboot. Devices that present no unique identity are the most likely to move. If your software needs a fixed number, set the number in Device Manager and check it again after the next restart instead of assuming it stuck.
Why is there no Advanced button on my port?
The tabs on a port's Properties window come from its driver. One user on Microsoft Q&A reported a USB receiver that showed only General, Details and Events tabs. In that case the number cannot be changed there, and the fix is to make the software use whatever number Windows gave the device.
Can I rename a COM port to a custom name such as GPS?
Not through Device Manager as far as the sources checked for this article show. What the Advanced dialog changes is the port number. The name in brackets after the device name, such as (COM4), follows that number.

Sources