How can I unassign COM ports?

Messages
7,969
Name
Sara
Edit My Images
Yes
I need to unassign some COM ports, currently my PC is showing that 27 are in use. It appears that every time I plug in a USB device it assigns it to yet another COM port and doesn't then unassign it when unplugged. Neither does it keep the same port when the same thing is plugged in a number of times.

I have gone into device manager, but I do not have a 'port' menu option. So, I don't have 27 'things' plugged in and need to get at least a number of COM 1-16 back.

Can anyone help? Doesn't seem to make sense to me!
 
if that doesnt work:

Open "Control Panel > System" then select the "Advanced" tab and click "Environment Variables". In the System Variables section (NOT THE USER VARIABLES SECTION), click "New..." in the box that appears create a new System Variable called "DevMgr_Show_NonPresent_Devices" and set the value to 1, then click OK.
 
Windows Vista

I have tried show hidden devices in device manager - But for some reason I don't have the ports menu in device manager - Will it only show up if I have a device connected or should it be there all the time?

Ive done the second bit you say as I found this on the net,

1. Click the "Start" or "Globe" button, and then click "Programs" or "All Programs," and then point to "Accessories." Then, if running Windows XP, click the command line icon in the menu that appears. If running Windows 7 or Vista, right-click on the command line icon and then click "Run as Administrator." The command line window will appear.


2. Enter "set devmgr_show_nonpresent_devices=1" on the command prompt and then press the "Enter" key.


3. Click the "Start" or "Globe" button, and then right-click on "Computer" or "My Computer" and click "Manage." In the window that opens, click on "Device Manager."


4. Select the "View" menu and then click "Show hidden devices." Click the "Ports" device header and a list of "Com" ports will appear. Right-click on each "Com" port you wish to remove and click "Uninstall" in the menu that appears. The virtual "Com" ports have now been removed.


But I don't have the ports menu :bang:
 
I've not got a printer installed on this particular lptop. I use it purely in my observatory, so it's running a gamepad, USB hub, a couple of camera's and the mount.

I'll have a look at it with the info you've given Neil tonight when I go out.

Many thanks for the help so far :thumbs:
 
Not tried with Vista but always worked for XP and has worked on 7 ...

... choose a com port that is there and in the advanced section of the port settings change it's com port number to one of the ones assigned but not present. It will give a pop up complaining - just OK it.
Then repeat and set the com port number to the next assigned one. Keep going til all have been assigned/unassigned and finally change it back to the original number. All the assigned ports should now not be.
 
How do I know whether a COM port is in use? For example, if I only have 1 device plugged in via USB and it tells me in device manager that this is COM 27 and all the others are in use - Are they only used by USB devices or is there something within the PC that uses COM ports that I need to be aware of?
 
Just incase anyone ever needs to know this, below is an excellent way I was told to do this. I am sure that you all know about it, but you never know it may be of use to someone one day!!

1. Click Start, point to All Programs, point to Accessories, and then click Command Prompt.

2. At a command prompt, type the following command , and then press ENTER:

set devmgr_show_nonpresent_devices=1

3. Type the following command at command prompt, and then press ENTER:

start devmgmt.msc

4. Click View > Show hidden devices. This will display devices that are not connected to your computer but Windows XP still reserves space for them.

5. Go to Ports (COM & LPT) and expand that section.

6. Remove all devices in the list of ports that are grayed out but have a specific COM port number assigned to them. (You can do this by right clicking on the grayed out device and choosing Uninstall and then OK in the dialog box that appears).

7. When you are finished troubleshooting, close the Device Manager.

8. Type exit in the Command Prompt
 
Thanks for that, Sara.

Never had a need to do it but no doubt it will come in handy one day!
 
Back
Top