Simple XP tip: show COM ports

As a developer, it’s annoying how XP hides advanced features way down deep.

For instance, I often use USB-serial devices, and when I need to check which port one of them’s attached to, here’s the 7-stage clickfest:


  1. Start
  2. Settings
  3. Control Panel
  4. System
  5. Hardware
  6. Device Manager
  7. Ports (COM & LPT)

Well, it can be much simpler than that. Simply put the following lines in a file called ports.bat and drag it to your quick launch bar:

reg query HKLM\hardware\devicemap\serialcomm

Voila! Every time you click it, you get a nice list of all your COM ports in Lucida Console.

Feel free to drop your own XP developer tips in the comment box.

21 May 2008 by Berwyn    11 comments

11 comments (oldest first)

Doug 5 Mar 2009, 11:44 link

Awesome, that simple script was extremely helpful. Thanx from South Dakota, USA.

Bob McCracken 27 Jul 2009, 04:07 link

Right on, that makes life easier. Thanx a lot. From calgary Alberta Canada.

Bikerpete 10 Jun 2010, 19:31 link

Nice – that made my day :-) Time for a coffee …

srand() 17 Jul 2010, 01:17 link

Wow. I’ve looked for something like this for what seems like years. Thanks for making my day!

Karl Gilding 1 Jun 2011, 04:20 link

Hrmm that was bizarre, my comment acquired eaten. Anyway I needed to say that it’s good to know that someone else also mentioned this as I had bother finding the identical data elsewhere. This was the primary place that instructed me the answer. Thanks.

FiFou 22 Dec 2011, 20:24 link

It’s so clever since it is so simple! Greetings from Greece.

stamatis 5 Jun 2012, 19:05 link

Very good idea help me to my work ..thanks

Fork 7 Jul 2012, 17:04 link

thanks, nice short cut

Sanjay Suthar 21 Aug 2012, 23:04 link

Great Idea….. Thanks a lot…

James Holt 17 Apr 2013, 01:10 link

Thanks for this, I use it at work cause they lock everthing down and I have no access to the control panel. They dont understand how difficult it is when you plug into a PLC and cant see which port it is hooked to.. Thanks again

tina 3 Feb 2015, 11:57 link

I still cant find my ports…please help.

Add a comment

We reserve the right to edit or remove your comment if it’s spammy, offensive, unintelligible, or if you don’t give a valid email address. :-)

We’ll never share your email address.