views:

49

answers:

2
+1  Q: 

Windows services

I have a windows application and I need to change it into a windows service, How can I check whether the windows service is running or not without using any external service to keep a check on the main service.

Is there any way to check it within the main service as I have tried work on it but if the windows service is stopped then there is no way I can check on it.

Do I have to implement the thread(keep alive thread) for this, if so then how to do it?

+3  A: 

If your main service is not running, how can it check anything?

You have to have a second monitoring service of some kind.

Oded
+3  A: 

Have a look at

astander
And this is also implemented _externally_ to the monitored service.
Oded
Yes, this is true.
astander