Wednesday, February 6, 2013

Auto End Tasks Windows 8 at shutdown

iTunes is such a badly designed app for Windows. Whenever you use the Home Sharing feature of it, you cannot shut down the PC without listening to its whine. There have been times when I have simply pressed the power button of the PC and went away, only to find out that the PC has not been shutdown. The shutdown process has been interrupted by iTunes. It drives me insane just to wait and see if the PC has been properly shutdown when I am in a hurry (that happens always) to go to work.

But there is always one thing you can turn to in situations like this: Windows Registry. There is a setting in the Windows Registry where once you enable it, the blocking tasks will be automatically terminated when you send the shutdown signal, after a specific time. It is not enabled by default because Microsoft doesn't know what your use-case is. You might actually need the PC not to be able to be turned off if you are running a certain looong task in the background like a video encode job or a rendering job which you might have forgotten that it is running - especially with these multicore CPUs. (Remember how it was like when you had single-core CPU doing video encode jobs? It would bog down the PC so much that it will never go unnoticed.)

IMG_1283

The easiest thing to do is to copy the following code to notepad, save as a .reg file and run it. You can experiment with the timeout threshold. I have set 2500ms. A shorter timeout delay will shutdown the PC faster but the apps that are properly being terminated might crash and corrupt its files and longer timeout such as 5000ms will obviously slow down the shutdown.


Windows Registry Editor Version 5.00

[HKEY_USERS\.DEFAULT\Control Panel\Desktop]
"AutoEndTasks"="1"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control]
"WaitToKillServiceTimeout"="2500"


Related Posts Plugin for WordPress, Blogger...