Renumbering COM Ports On Windows Vista

When using a USB Bluetooth dongle, the COM port numbers kept getting higher for me every time I plugged it in. Soon the port numbers were higher than my Bluetooth device was compatible with. I'll explain how to reset those numbers -but first a brief description of how Vista assigns these numbers.

How Vista Assigns COM Port Numbers

COM ports are used by Bluetooth and other hardware for communication. Most of the time these ports are virtual because few computers come with hard-wired COM ports these days. To enable a plug and play environment, Vista saves previously used ports as hidden or inactive ports. When the device is plugged in after being previously installed, Vista matches the device to the existing COM port.

If the Bluetooth or other virtual COM port is unplugged from the USB port, Vista saves the association. However, if another USB device such as a flash drive is plugged into that port it resets the USB port. When the COM port device is plugged back into the USB port -or into a different USB port, Vista will make a new COM port to USB association. The previous associations are not overwritten, causing Vista to assign a higher COM port number. Over time the COM ports are numbering in the 30's or even higher, which is higher than most hardware supports.

How To Renumber COM Ports

  1. Open the command prompt in Admin mode.

    1. In Vista search type CMD

    2. Right-click on the CMD.exe search result and select Run as Administrator (If the Administrator option is missing, click here for instructions on how to run CMD in Admin mode).

  2. Click Continue through the UAC screen.

  3. Type set devmgr_show_nonpresent_devices=1 after the prompt and press Enter.

  4. Type start devmgmt.msc and press Enter to open the Device Manager.

  1. In Device Manager, Click View and make sure Show hidden devices is checked.
  2. Now expand the Ports (COM & LPT) row.
  3. All saved COM ports are displayed.
  4. Uninstall all the unused COM ports by selecting them and pressing Delete, then click OK.
  5. Here's a screenshot of the Device Manager with my hidden ports displayed -it's a mess.

And here's the same screen after uninstalling all the no-longer-needed ports.

Try to keep a dedicated USB port for your Bluetooth dongle. Keep an eye on the COM port numbers and clean up again if they get too high.

Sources:

http://www.psy.uq.edu.au/sections/it/index.php?option=com_content&task=blogcategory&id=4

http://support.microsoft.com/?id=315539

0 comments: