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.

  • Unclear what help you need. Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it’s hard to tell what problem you are trying to solve or what aspect of your approach needs to be corrected or explained. See the How to Ask page for help clarifying this question. – gnat May 7 '15 at 13:13

I believe this answer on Stack Overflow may help.


You just need to know what the process name is for Matlab.

Also, just Google:

"windows check if process is running c++"

Not the answer you're looking for? Browse other questions tagged or ask your own question.