Here's a more complicated solution, which you could add a monitor layer and a service layer in app.exe
. The monitor layer is responsible for collecting internal variables status, and the service layer is responsible for providing internal status to whom issuing a GetStatus
request.
Whenever monitor.exe
is executed, it issues a GetStatus
service request to app.exe
, and get the response of what is going on from inside of app.exe
.
The disadvantage is that you must create a connection between app.exe
and monitor.exe
, and the latter must know the service port of all app.exe which deployed on the local machine.