Automatically Ending Non-Responsive Tasks

Start Regedit
Go to HKEY_CURRENT_USER\Control Panel\Desktop\AutoEndTasks
Set the value to be 1
In the same section, change the WaitToKillAppTimeout to the number of milliseconds you want.