The company I work for makes hardware that communicates to the computer though a serial port. Third party companies write software that communicates with our hardware.
There are times when I need to diagnose our hardware. However, a third party software app connects to the serial port when Windows starts up, blocking any other connection. I don't know the name of this application/service and it's not always the same one.
Is there any way to either:
vb.net preferably, but I'll take a language agnostic answer as well.
Simply open the Process Explorer application and search for the term " serial" by using ctrl-f. In the above example the user had left open putty on COM1. This would stop Zetafax from being able to open COM1. We now know to kill putty.exe (PID:3024)using Task Manager to end the process and unlock the port.
Serial ports are also used to connect equipment together, e.g. modems of one type or another (PSTN, 3G, satellite), GPS units, telescopes, sensors, power inverters, and many type of industrial control equipment.
You can use the process explorer tool also from SysInternals to search for open handles. In this case you would want to search for 'Serial' since it uses device names that may not map to com port numbers. (e.g. COM1 is \Device\Serial0 on my system).
If you want to take control of the serial port from another app I think you would need co-operation of the driver.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With