The Computer Oracle

How to view serial COM ports but not through Device Manager

Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn

--

Track title: CC M Beethoven - Piano Sonata No 3 in C 3

--

Chapters
00:00 Question
00:28 Accepted answer (Score 90)
01:00 Answer 2 (Score 28)
01:22 Answer 3 (Score 19)
01:46 Answer 4 (Score 10)
02:06 Thank you

--

Full question
https://superuser.com/questions/835848/h...

Question links:
[Device Manager]: http://en.wikipedia.org/wiki/Device_Mana...

Answer 3 links:
https://todbot.com/blog/2012/03/02/listc.../

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#commandline #serialport #comport

#avk47



ACCEPTED ANSWER

Score 96


In the command prompt use

mode

Used without parameters, mode displays all the controllable attributes of the CON (console) and the available COM devices (and LPT as well).

Accepts /? switch for basic help:

mode /?




ANSWER 2

Score 30


I know the question has been answered, but this is another method.

In command prompt, use:
chgport
in windows Vista and up. Lists your ports and which device they are.




ANSWER 3

Score 20


In the command prompt use:

C:\>wmic path Win32_SerialPort

In PowerShell, run as administrator:

PS> Get-WMIObject Win32_SerialPort | Select-Object Name,DeviceID,Description

Or, for raw data:

PS> Get-WMIObject Win32_SerialPort

Hope this helps.




ANSWER 4

Score 9


Using mode most of the time I don't see the devices that are not connected.

I prefer to use this solution with Python:

python -c "import serial.tools.list_ports as ls; print([p.device for p in ls.comports()])"

So I can see anything plugged in even if the connection is closed.

serial.tools.list_ports is from package pyserial.