Dinesh Ambaliya

Dinesh Ambaliya

  • NA
  • 42
  • 80k

Windows Services OnShutDown() event is not firing

Feb 26 2013 2:46 AM
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