How to change number of COM port in a command line?

Is there away to change number of COM port in a command line?

I have many many devices and for each device Windows assigns different port number (and remembers this number!).

But in my case only one device is connected at any given time. I use serial port COM (using USB).

Therefore I want to use only one COM port, let's say COM4.

I know that there is a way to create some sort of a link, redirection, alias:

change port COM4=COM6

This works! Now I can use COM4.

But! Windows also increments COM port number by one (1). I want Windows to forget old devices and port numbers because I wish to connect more than 256 different devices. Therefore this just cannot happen:

change port COM4=COM270

Is there any chance that I can order Windows to forget old devices and port numbers? I know this can be done in Device Manager but I want to (and have to) do this in a command line.

I know there are also some other commands, for instance:

wmic path Win32_SerialPort

The commands above show ports information. Is possible to change port numbers using wmic?

2 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like