To set your computer to automatically end tasks that are not responding, open the registry and look for this string:
Right-click on the 'AutoEndTask' key and select 'Modify'. Change the Value Data to 1. Now right click on the 'WaitToKillAppTimeout' key and select 'Modify'. Enter the time in seconds you want the unresponsive program to be automatically shut down. Exit the registry and reboot your computer for the changes to take effect.