Change COM port via registry, command line or software?

SparkyNZ picture SparkyNZ · Jan 4, 2010 · Viewed 53.3k times · Source

Does anybody know how to change the COM port number that Windows maps to a USB virtual COM port? You can change this via the Device Manager and clicking on the Advanced button.. but how can you do this via an API, registry change or command line operation?

Any ideas please?

Answer

Alireza picture Alireza · Oct 17, 2012

I monitored registry changes during changing COM port 1 to 110 and found modifications in following keys:

[HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM] "\Device\Serial0"="COM110"

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\COM Name Arbiter] "ComDB"=hex(3):FC,7F,00,00,00,00,00,00,00,00,00,00,00,20,00,00,00,00,00,00,\ 00,00,00,00,00,00,00,00,00,00,00,00

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\ACPI\PNP0501\1\Device Parameters] "PortName"="COM110"