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

933 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 answers

0
Khurshid On

Try with Microsoft.Win32.SystemEvents class.