I am trying to make a window service application which takes care a specified application. I meant, the widnow service should start the application in OnStart event and it stop the application in OnStop event. It should also take care the application never stop/hang. If the application goes stop/hang it should restart the application.
questions: * what is that application? * how could you determine that it is hang (stopped is easy...) * why not make that application a service itself?
I meant, the widnow service should start the application in OnStart event and it stop the application in OnStop event. this is easy, just use the processes class , you can start or kill the process.
It should also take care the application never stop/hang. If the application goes stop/hang it should restart the application. this will more trouble, you cannot get the program stop/hang from other program. unless you send out the data from the program