Too many COM port numbers, how to delete them?


B

Bo Berglund

I have a problem relating to my use of USB-RS232 converters:

When I plug one into a USB port it has not previously been inserted
into, then a *new* COM port number is used. So if I have 3 USB ports a
single converter will wind up as three different port numbers
depending on which USB socket it is inserted into...

But worse is that if I expand my USB ports by attaching a USB hub the
same procedure repeats as above, so now I get 7 more COM port numbers
used *for each* laptop USB port I put the 7-way hub on.
Since I also have used several hubs over time (just trew out my old
USB1x4 hub) I have a *lot* of COM port numbers assigned to my 3
USB-RS232 converters....
I think the next free one is like COM43 or similar. :-(

It seems like there is somewhere in the system a repository of used
COM ports that I would like to clear out.
Can someone direct me to the place (in the Registry perhaps) where I
can delete all of these extra COM port numbers so I can start out
fresh and get sensible numbers in the range 2..9 (single digits,
please)???


Bo Berglund
 
Ad

Advertisements

C

Claggy

Bo Berglund said:
I have a problem relating to my use of USB-RS232 converters:

When I plug one into a USB port it has not previously been inserted
into, then a *new* COM port number is used. So if I have 3 USB ports a
single converter will wind up as three different port numbers
depending on which USB socket it is inserted into...

But worse is that if I expand my USB ports by attaching a USB hub the
same procedure repeats as above, so now I get 7 more COM port numbers
used *for each* laptop USB port I put the 7-way hub on.
Since I also have used several hubs over time (just trew out my old
USB1x4 hub) I have a *lot* of COM port numbers assigned to my 3
USB-RS232 converters....
I think the next free one is like COM43 or similar. :-(

It seems like there is somewhere in the system a repository of used
COM ports that I would like to clear out.
Can someone direct me to the place (in the Registry perhaps) where I
can delete all of these extra COM port numbers so I can start out
fresh and get sensible numbers in the range 2..9 (single digits,
please)???


Bo Berglund

Look in the phone and modems options in the control panel. They might be
there.
 
M

M.I.5¾

Bo Berglund said:
I have a problem relating to my use of USB-RS232 converters:

When I plug one into a USB port it has not previously been inserted
into, then a *new* COM port number is used. So if I have 3 USB ports a
single converter will wind up as three different port numbers
depending on which USB socket it is inserted into...

But worse is that if I expand my USB ports by attaching a USB hub the
same procedure repeats as above, so now I get 7 more COM port numbers
used *for each* laptop USB port I put the 7-way hub on.
Since I also have used several hubs over time (just trew out my old
USB1x4 hub) I have a *lot* of COM port numbers assigned to my 3
USB-RS232 converters....
I think the next free one is like COM43 or similar. :-(

It seems like there is somewhere in the system a repository of used
COM ports that I would like to clear out.
Can someone direct me to the place (in the Registry perhaps) where I
can delete all of these extra COM port numbers so I can start out
fresh and get sensible numbers in the range 2..9 (single digits,
please)???

Not such an easy one if you don't know how.

Open a command window.

Now set an environment variable by entering the line

"set devmgr_show_nonpresent_devices=1" - without the quotes obviously

then enter

"start devmgmt.msc"

In the box that opens, select "Show hidden devices" in the 'view' menu.

Now if you expand the section on COM ports, all the COM ports that have ever
been created will be displayed, the non present ones being in grey. You can
uninstall away anything that you don't want (right click, select uninstall).

The behaviour that you report is correct for a non serial numbered USB
peripheral. If you want an RS-232 adaptor to retain its assigned COM port
regardles of where you plug it in, you require an (electronically) serial
numbered device, (but personally I don't know of one - but that doesn't mean
they don't exist).
 
M

M.I.5¾

Michael W. Ryder said:
Have you tried Device Manager and selecting the Show Hidden option under
the View tab?

Good try but ...

This won't work unless you enable the facility first - see my other post on
how to do this.
 
Ad

Advertisements

B

Bo Berglund

Not such an easy one if you don't know how.

Open a command window.

Now set an environment variable by entering the line

"set devmgr_show_nonpresent_devices=1" - without the quotes obviously

then enter

"start devmgmt.msc"

In the box that opens, select "Show hidden devices" in the 'view' menu.

Now if you expand the section on COM ports, all the COM ports that have ever
been created will be displayed, the non present ones being in grey. You can
uninstall away anything that you don't want (right click, select uninstall).

The behaviour that you report is correct for a non serial numbered USB
peripheral. If you want an RS-232 adaptor to retain its assigned COM port
regardles of where you plug it in, you require an (electronically) serial
numbered device, (but personally I don't know of one - but that doesn't mean
they don't exist).
GREAT!
Thanks a million, this was exactly what I was looking for!
I have now set the variable in my envoronment variables so that DevMgr
hidden devices also show these non-present ones.


Bo Berglund
 
Ad

Advertisements

M

M.I.5¾

Bo Berglund said:
GREAT!
Thanks a million, this was exactly what I was looking for!
I have now set the variable in my envoronment variables so that DevMgr
hidden devices also show these non-present ones.

There is registry entry that will do the same thing (can't find it at the
moment, but you can probably google as well as I). Better to do it this way
because the environment variable space is limited and the variable name is
quite long.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top