Advertisement
FreeBooter

AutoEndTasks.bat

Sep 2nd, 2017
499
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.96 KB | None | 0 0
  1. @Echo Off
  2. Color 1A
  3.  
  4. Cd %systemroot%\system32
  5.  
  6. Call :NoAdmin
  7.  
  8.  
  9. :_Ask
  10. Cls & Mode CON  LINES=11 COLS=90 & Color 0D & Title Created By FreeBooter
  11. Echo.
  12. Echo.
  13. Echo.
  14. Echo       ノヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘサ
  15. Echo       コ Do You Want To Close Programs That Is Not Reponding During Shutdown (Y/N)? コ  
  16. Echo       ネヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘシ
  17. Echo.
  18. Echo.
  19.  
  20.  
  21. Set /p input= RESPONSE:
  22. If /i  Not %input%==Y (Goto :_Ex) Else (Goto :_Start)
  23.  
  24. :_Ex
  25. If /i Not %input%==N  (Goto :_Ask) Else (Goto :EOF)
  26.  
  27.  
  28.  
  29. :_Start
  30.  
  31. Reg add "HKCU\Control Panel\Desktop"  /v HungAppTimeout   /t REG_SZ  /d 1000  /f 2>&1 >nul
  32.  
  33. Reg add "HKCU\Control Panel\Desktop"  /v WaitToKillAppTimeout  /t REG_SZ  /d 2000  /f 2>&1 >nul
  34.  
  35. Reg add "HKCU\Control Panel\Desktop"  /v AutoEndTasks  /t REG_SZ /d 1  /f 2>&1 >nul
  36.  
  37. Reg add "HKU\S-1-5-19\Control Panel\Desktop" /v "AutoEndTasks" /t REG_SZ /d "1" /f 2>&1 >nul
  38.  
  39. Reg add "HKU\S-1-5-19\Control Panel\Desktop" /v "HungAppTimeout" /t REG_SZ /d "1000" /f 2>&1 >nul
  40.  
  41. Reg add "HKU\S-1-5-19\Control Panel\Desktop" /v "WaitToKillAppTimeout" /t REG_SZ /d "2000" /f 2>&1 >nul
  42.  
  43. Reg add "HKU\S-1-5-20\Control Panel\Desktop" /v "AutoEndTasks" /t REG_SZ /d "1" /f 2>&1 >nul
  44.  
  45. Reg add "HKU\S-1-5-20\Control Panel\Desktop" /v "HungAppTimeout" /t REG_SZ /d "1000" /f 2>&1 >nul
  46.  
  47. Reg add "HKU\S-1-5-20\Control Panel\Desktop" /v "WaitToKillAppTimeout" /t REG_SZ /d "2000" /f 2>&1 >nul
  48.  
  49. Reg add "HKEY_USERS\.DEFAULT\Control Panel\Desktop" /v "AutoEndTasks" /t REG_SZ /d 1 /f 2>&1 >nul
  50.  
  51. Reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control"  /v "WaitToKillServiceTimeout" /t REG_SZ /d "2000" /f 2>&1 >nul
  52.  
  53. Cls & Mode CON  LINES=11 COLS=80 & Color 0D &Title Created By FreeBooter
  54. Echo.
  55. Echo.
  56. Echo.
  57. Echo       ノヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘサ
  58. Echo       コ Automatically Terminating User Processes During Shutdown Enabled コ  
  59. Echo       ネヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘヘシ
  60. Echo.
  61. Echo.
  62. ping -n 8 localhost >nul
  63. Exit
  64.  
  65.  
  66. :NoAdmin
  67. Reg query "HKU\S-1-5-19\Environment"
  68. If Not %ERRORLEVEL% EQU 0 (
  69.  Cls & Mode CON  LINES=5 COLS=48 & Color 0C &  Title  .....................- WARNING -.......................
  70.  Echo.
  71.  Echo.
  72.  Echo  YOU MUST HAVE ADMINISTRATOR RIGHTS TO CONTINUE
  73.  Pause >Nul & Exit
  74. )
  75.  Cls
  76.  Goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement