Open registry by typing the regedit in the Run Dialog box.
Browse to: HKEY_CURRENT_USER\Control Panel\Desktop
locate DWORD value "WaitToKillAppTimeout" which have a default value as
"WaitToKillAppTimeout"="20000"
This value represents the time(in milisecond) taken by window to end program when it is not responding. Change it to 0 and prevent your computer by hanging.
Browse to: HKEY_CURRENT_USER\Control Panel\Desktop
locate DWORD value "WaitToKillAppTimeout" which have a default value as
"WaitToKillAppTimeout"="20000"
This value represents the time(in milisecond) taken by window to end program when it is not responding. Change it to 0 and prevent your computer by hanging.

