How get system start up event in windows service c#?

941 Views Asked by At

I am writing a windows service. I want to do some functions on system start up, system lock, shutdown. How to get the start up,lock and shutdown events in the windows service ?

1

There are 1 best solutions below

0
On

Try with Microsoft.Win32.SystemEvents class.