Whenever a new COM port is installed, Windows looks for the first
never used number. This ensures that there are no conflicts when
two of the devices are attached at the same time.
In real live the users do not use their devices (as USB to COM adaptors)
at the same time, but the COM numbers increase and increase because
the reservation is not removed when the COM port device is uninstalled
from the Device Manager. After 25 years Microsoft finally fixed this in
Windows 10 version 1903, here the reservation is removed when a device
is uninstalled, so this tool isn't needed anymore...
Windows stores used COM port numbers in the registry in the value ComDB under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\COM Name Arbiter
By default there are 32 bytes with 8 bits in each byte. A set bit makes a
port number (1..256) reserved. Over time Windows might exceed 256 ports,
COM Name Arbiter Tool can handle this.
Changes are written immediately to the registry, admin privileges are required.
Removing the reservation does not do anything else than making Windows
reassign the number to a new device when it is attached.
As long as the new device is not attached at the same time as the
device which had these COM port before there is no problem.
If the devices are attached at the same time then the second one will
not start because it cannot create its "COMx" symbolic link. This happens too
if a new device wants to get a port which is supposed to be free because
its arbiter bit is not set but in fact the port is in use! So don't
clean up to much...
The tool can also uninstall (remove) devices.
Started with parameter /c it performs silently the "Clear unused reservations" operation.
Started with parameter /r it performs silently the "Remove non-present devices" operation.
Last update: 07 Nov 2021