I need to (force) reboot Windows from inside a Windows Service written in C#. The ordinary way of doing it, from a desktop application, shutdown.exe, will probably not work at all? I assume I cannot run an EXE file from inside a service..
Asked
Active
Viewed 581 times
2 Answers
1
Look at the Win32 API InitiateSystemShutdown() and/or InitiateSystemShutdownEx() function.
Also refer to this MSDN article: Shutting Down.
Remy Lebeau
- 555,201
- 31
- 458
- 770