Search code examples
windowsshutdown

shutting down Windows with warning to the user


I see that shutdown.exe can be used to shutdown or restart a machine. However, the warning given to the user doesn't offer any way to cancel the shutdown (other than doing "shutdown /a" in a command line prompt).

Is there a different way of shutting down Windows that offers the user some easy way to cancel out?


Solution

  • Write your own program that calls ExitWindowsEx. It can allow any cancel operations you want.