Deny C # Service Shutdown

I have a Windows user service with my own register handler, how can I prevent it from stopping when it receives a stop command from the service manager? I have established a connection between the service and the GUI, and I only want to stop it from the GUI when I send the Windows service a β€œstop” message when I try to stop it from the Windows Service Manager. I work in c #

+5
source share
2 answers

Does this answer your question?

http://bytes.com/topic/c-sharp/answers/444965-prevent-service-stopping

CanStop false. , . (, ), , . , "CanStop" true, ServiceController "Stop".

+11

( DACL), (, , SYSTEM) .

Service Control Manager , , , - .

0

All Articles