Each time when you connect a new COM device or a USB device (true for modems, smartphones, Bluetooth, serial-to-USB converters, etc.), Windows detects it using Plug-n-Play and assigns it a COM port number in the range of 1 to 255. If this device is connected again, the reserved port is re-assigned to it. A new device gets the first free or available COM port number. This ensures that there are no conflicts when two of the devices are attached at the same time.
Occasionally, multiple com ports will be classified as reserved or "in use" even though there is not a COM device or a USB device currently associated with it. If this happens frequently enough, it is possible that all of the free or available com ports become reserved and the system is exhausted of COM ports as there is a limit.
The reserved or "in use" port information is stored in the Windows Registry in a key named COM Name Arbiter that can be modified to remove the "in use" or reservation for COM ports that are not actually in use.
To fix the condition to unmark unused ports are in use, you have to modify the Windows Registry, which we do not recommend doing. There is a program that you can use to do this for you and remove most of the risk associated with modifying the Registry called COM Name Arbiter Setter V0.7 (http://www.uwe-sieber.de/misc_tools_e.html#arbiter). It has to be run as Administrator to modify the registry.
When you run it, only leave the boxes checked next to the com ports that are actually defined on your system and click on Apply to clear the other com ports.