I’m trying to write a program which waits for a specific app (matlab in my case) to launch and does stuff when the app launches.
I see that I had to write a windows service application and managed get this working. I can see the service in Service Manager and can start-stop it. But I don’t know how can “listen” or understand if Matlab (or any other app.) is launched. I’m kinda newbie when it comes to Windows Programming. Can you help me in this?
I’m using c++ with visual studio 2013.
1
I believe this answer on Stack Overflow may help.
https://stackoverflow.com/questions/1591342/c-how-to-determine-if-a-windows-process-is-running
You just need to know what the process name is for Matlab.
Also, just Google:
“windows check if process is running c++”