Removing Com ports in Windows 7 using cmd

1

I have been trying to find a way to make a script to uninstall specific COM-ports from Windows 7 that are no longer used.

Background:

I'm using NI Teststand to test a productio test of an USB-serial device. This test will change the FTDI config, so each device tested will use two COM-ports. It doens't take long time until there are hundreds of COM-ports present in the system.

What I have tried:

I found this suggestion, but it doesn't seem to work. I can see all the devices when i use:

devcon findall =ports

But from what I have gathered it is only possible to remove active devices using:

devcon remove 

Question:

How can I remove a large number of COM-ports from CMD?


Thanks in advance

/Jaxc

Jaxc

Posted 2016-08-05T14:37:22.227

Reputation: 13

Ah thanks, I thought it was there I was since thats where I clicked "sign up" :) – Jaxc – 2016-08-05T14:44:44.883

Answers

0

I had a similiar issue to remove unused COM-Ports. I am using "COM Name Arbiter Setter" from http://www.uwe-sieber.de/misc_tools_e.html

Hans Hubert Vogts

Posted 2016-08-05T14:37:22.227

Reputation: 438

Please read How do I recommend software for some tips as to how you should go about recommending software. You should provide at least a link, some additional information about the software itself, and how it can be used to solve the problem in the question.

– DavidPostill – 2016-09-08T10:11:35.003

I checked the site and found Device Cleanup Cmd. This tool looks like it doing exatcly what I needed: a way to remove inactive COM-ports from CMD.

– Jaxc – 2016-09-09T12:07:42.703