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