Click here to Skip to main content
15,888,908 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys, how can i trigger a window service using a window service if it was stopped.

What I have tried:

i already search and i already got to monitor if the window service is stopped or not the only i don't have is how can I trigger it using a window service also.
Posted
Updated 14-Apr-20 22:53pm
Comments
Richard Deeming 16-Apr-20 8:56am    
NB: Having multiple services monitoring each other to prevent any of them from being stopped is the sort of behaviour often seen in malware. It's likely to make your software look very suspicious.

1 solution

Just use ServiceController and Start(), see example here: c# - Start Windows Service programmatically - Stack Overflow[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900