Use NotifyServiceStatusChangeW and re-start it with StartService when you receive SERVICE_NOTIFY_STOPPED
how to restart the windows service automatically with 5 seconds, if it is stopped manually?
Elanchezhiyan P
100
Reputation points
Hi Team,
I have a windows service that should run on the client's system 24*7 (local server system). If the client tries to stop the service manually, how do I invoke the service within 5-10 seconds? I have already placed the startup type as automatic. But, this feature works only when the system is restarted.
Windows for business Windows Client for IT Pros User experience Other
28,655 questions
Developer technologies C#
11,568 questions