Hi!
Is it possible to "hard" restart Windows, without waiting for closing applications, etc.?
Hi!
Is it possible to "hard" restart Windows, without waiting for closing applications, etc.?
Try http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/8a8bbd4b-9a80-4785-afc7-1e8e6daa3d42. Call ExitWindowsEx with EWX_REBOOT and EWX_FORCEIFHUNG.
As an alternative to the SHUTDOWN
tool command, to eliminate completely the waiting time for closing applications, under
HKEY_CURRENT_USER\Control Panel\Desktop
, set WaitToKillAppTimeout
value to 0
, and set AutoEndTasks
value to 1
,
WaitToKillAppTimeout value determines how long the system waits for user processes to end after the user attempts to log off or to shut down Windows. When the time specified in this entry expires, the End Task dialog box appears, stating that the process did not respond. If the value of AutoEndTasks
is 1
, the system ends the process automatically.
The trick here is to manipulate the registry value-data of both value-names before calling ExitWindowsEx()
, and schedule a task that will restore the value-names to their original value-data on the next restart of Windows.