Which Windows process is has the COM port open, and is blocking other processes from using the serial port?

Yes you read that right.. COM ports and serial line communications. Serial line communication, whether it is the RS-282 og RS-485 standards, is still in use at thousands, if not more, industrial plants and ships all around the world.

A frequent problem when accessing Windows COM ports by software is that the port is already open and in use by another application. Quite a similar problem as when another process has a IP port open!

Cut to the chase: Sysinternals Process Explorer comes to the rescue yet again! This amazing piece of software can easily find processes which have particular COM ports open. You could probably find this information by manually entering WMI-queries (a SQL-like language for querying Windows about all sorts of system information), but it is so much easier with Process Explorer.

It’s easy as pie:

Ctrl+F in Process Explorer (Find -> “Find by handle or DLL”).

In the search box type “\Device\Serial”. All processes with open Serial lines will appear in the search results!

Searching for a single COM port is of course equally simple, COM1 = \Device\Serial0, and so on.

Note one caveat: if you have this search box open while you are launching a process, then Process Explorer will show “<Non-existent Process>” instead of the proper process name. Simply close the search box and open it again, and Process Explorer will refresh it’s internal state and show the correct process name. As long as the process is alive of course.

Happy process hunting!