The cause for problem is because the Windows will try to properly and gracefully terminate all running processes, tasks and programs before shutting down the Windows. If Windows kernel unable to to terminal a not responding or hanged programs, then Windows will wait until time out, and ask the user whether to end the frozen task or continue to wait for the process to respond.
If you don’t want to wait for default time out and want to force exit or force close any unresponsive programs automatically, just set the value of “AutoEndTasks” to 1.
- Click on Start Menu -> Run.
- In the Run text box, type regedit and then click OK or press Enter.
- In the Registry Editor, navigate the following branch:
- On the right panel of Registry Editor, search for AutoEndTasks registry key.
If not found, add a string value of the same name.
- Double click on the key and modify the Value data to 1.
- Click on OK when done.
- Restart the Windows, the change will be effective.
Warning: Modifying the Windows registry may cause your computer to stop functioning. Backup and handle with care.
To undo the changes, just change back the Value data of the Registry key to 0.
If you want to shorten the time out period that Windows wait for frozen programs and fasten the waiting duration in which Windows will declare a program as unresponsive, just change the value date setting of “WaitToKillApp” registry key in the same registry branch as above. “WaitToKillApp” control sets the timeout delay in milliseconds (the default is 2000, or 20 seconds) and it can be changed speed up the shutdown process by waiting shorter for not responding processes.