F5F Stay Refreshed Software Operating Systems Delete COM ports currently in use on Windows 10 using a batch script.

Delete COM ports currently in use on Windows 10 using a batch script.

Delete COM ports currently in use on Windows 10 using a batch script.

M
mineuout482
Posting Freak
812
11-11-2016, 03:39 AM
#1
Hey! It sounds like you're dealing with a lot of devices needing virtual COM ports, which can get tedious. You're looking for a solution to automatically remove them in bulk. Let me know if you'd like help finding tools or methods for that.
M
mineuout482
11-11-2016, 03:39 AM #1

Hey! It sounds like you're dealing with a lot of devices needing virtual COM ports, which can get tedious. You're looking for a solution to automatically remove them in bulk. Let me know if you'd like help finding tools or methods for that.

C
CxnquerBB
Junior Member
14
11-12-2016, 06:44 AM
#2
I experienced this situation a few years ago, where I employed a keyboard macro to remove them previously.
C
CxnquerBB
11-12-2016, 06:44 AM #2

I experienced this situation a few years ago, where I employed a keyboard macro to remove them previously.

O
Okeinshield
Senior Member
595
11-12-2016, 12:26 PM
#3
You have around a dozen Arduino boards, mostly running version 9.14 or newer. None of them seem to be using older firmware versions.
O
Okeinshield
11-12-2016, 12:26 PM #3

You have around a dozen Arduino boards, mostly running version 9.14 or newer. None of them seem to be using older firmware versions.

M
maestrowilldo
Member
142
11-24-2016, 10:39 AM
#4
In PowerShell: retrieve - wmiobject - Query "select * from win32_systemdriver where caption like `"USB Serial Port %` "" | ForEach { $_ . StopService () $_ . Delete () } I haven't tested this and offer no guarantees. Actually, the worst it could do is fixed by a reboot."
M
maestrowilldo
11-24-2016, 10:39 AM #4

In PowerShell: retrieve - wmiobject - Query "select * from win32_systemdriver where caption like `"USB Serial Port %` "" | ForEach { $_ . StopService () $_ . Delete () } I haven't tested this and offer no guarantees. Actually, the worst it could do is fixed by a reboot."

J
juniorhockey
Member
171
12-09-2016, 11:13 PM
#5
Windows faces issues because it doesn't reuse COM ports unless devices report identical identifiers, meaning each connected device can have a distinct COM port VID/PID. These values are fully adjustable based on the hardware I use, which is why I encounter the same challenge at work with many embedded systems. Linux handles serial ports more smoothly. Serial numbers are reassigned to the pool when a device disconnects, and they clearly distinguish between USB and hardware serial connections (such as ttyUSB versus ttyS).
J
juniorhockey
12-09-2016, 11:13 PM #5

Windows faces issues because it doesn't reuse COM ports unless devices report identical identifiers, meaning each connected device can have a distinct COM port VID/PID. These values are fully adjustable based on the hardware I use, which is why I encounter the same challenge at work with many embedded systems. Linux handles serial ports more smoothly. Serial numbers are reassigned to the pool when a device disconnects, and they clearly distinguish between USB and hardware serial connections (such as ttyUSB versus ttyS).

R
roms12_
Member
158
12-18-2016, 06:05 PM
#6
Port numbers remain unique and I handle many Arduino and embedded devices each year. It doesn’t appear to be working, but I appreciate the help! Yes, it seems like you’re still facing the same issue without a solution found yet.
R
roms12_
12-18-2016, 06:05 PM #6

Port numbers remain unique and I handle many Arduino and embedded devices each year. It doesn’t appear to be working, but I appreciate the help! Yes, it seems like you’re still facing the same issue without a solution found yet.

P
philipds
Member
60
12-18-2016, 06:19 PM
#7
Microsoft offers a utility named Power Automate within Windows to handle sequences of tasks together. It’s available in the Store if you remove it.
P
philipds
12-18-2016, 06:19 PM #7

Microsoft offers a utility named Power Automate within Windows to handle sequences of tasks together. It’s available in the Store if you remove it.