The Computer Oracle

How to view serial COM ports but not through Device Manager

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
and get $2,000 discount on your first invoice
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Mysterious Puzzle

--

Chapters
00:00 How To View Serial Com Ports But Not Through Device Manager
00:20 Answer 1 Score 20
00:38 Accepted Answer Score 96
01:01 Answer 3 Score 30
01:18 Answer 4 Score 9
01:38 Thank you

--

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

--

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.