0
Answer

Windows Services OnShutDown() event is not firing

Ask a question
I want to create a service which note the time of OS in OnStart event and save that start time and end time in OnShutDown event. But onShutDown() event is not firing. Same code is running in OnStop event.

Me.ServiceProcessInstaller1.Account =System.ServiceProcess.ServiceAccount.LocalSystem Me.ServiceInstaller1.StartType = System.ServiceProcess.ServiceStartMode.Automatic

Next Recommended Forum