go to: HKEY_CURRENT_USER\Control Panel\Desktop
locate DWORD value
default value might be
this value represents the time(in milisecond) taken by window to end program when it is not
change it to 0
and prevent your computer by hanging.