Too many COM port numbers, how to delete them?

  • Thread starter Thread starter Bo Berglund
  • Start date Start date
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
 
"Bo Berglund" <boberglund@home.se> wrote in message
news:23grl310494obp1gdnmhdkfd6oq6tqsvpf@4ax.com...
>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.
 
On Mon, 10 Dec 2007 23:51:04 GMT, "Claggy" <claggy@nospam.com> wrote:

>
>"Bo Berglund" <boberglund@home.se> wrote in message
>news:23grl310494obp1gdnmhdkfd6oq6tqsvpf@4ax.com...
>> 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)???

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

Nope, not there....
Any oher idea?


Bo Berglund
 
Bo Berglund wrote:
> On Mon, 10 Dec 2007 23:51:04 GMT, "Claggy" <claggy@nospam.com> wrote:
>
>> "Bo Berglund" <boberglund@home.se> wrote in message
>> news:23grl310494obp1gdnmhdkfd6oq6tqsvpf@4ax.com...
>>> 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)???

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

> Nope, not there....
> Any oher idea?
>


Have you tried Device Manager and selecting the Show Hidden option under
the View tab?

>
> Bo Berglund
 
"Bo Berglund" <boberglund@home.se> wrote in message
news:23grl310494obp1gdnmhdkfd6oq6tqsvpf@4ax.com...
>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).
 
"Michael W. Ryder" <_mwryder@worldnet.att.net> wrote in message
news:pHq7j.239641$kj1.118176@bgtnsc04-news.ops.worldnet.att.net...
> Bo Berglund wrote:
>> On Mon, 10 Dec 2007 23:51:04 GMT, "Claggy" <claggy@nospam.com> wrote:
>>
>>> "Bo Berglund" <boberglund@home.se> wrote in message
>>> news:23grl310494obp1gdnmhdkfd6oq6tqsvpf@4ax.com...
>>>> 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)???
>>> Look in the phone and modems options in the control panel. They might be
>>> there.

>> Nope, not there....
>> Any oher idea?
>>

>
> 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.
 
On Tue, 11 Dec 2007 08:09:47 -0000, "M.I.5¾"
<no.one@no.where.NO_SPAM.co.uk> wrote:

>
>"Bo Berglund" <boberglund@home.se> wrote in message
>news:23grl310494obp1gdnmhdkfd6oq6tqsvpf@4ax.com...
>>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).
>

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
 
"Bo Berglund" <boberglund@home.se> wrote in message
news:p5otl3pkt6arqgmfuggv1ffobi7sntgp31@4ax.com...
> On Tue, 11 Dec 2007 08:09:47 -0000, "M.I.5¾"
> <no.one@no.where.NO_SPAM.co.uk> wrote:
>
>>
>>"Bo Berglund" <boberglund@home.se> wrote in message
>>news:23grl310494obp1gdnmhdkfd6oq6tqsvpf@4ax.com...
>>>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).
>>

> 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.
 
Back
Top