Advertisement
FreeBooter

DisableWindowsDefender.bat

Nov 4th, 2016
579
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.69 KB | None | 0 0
  1. @Echo Off
  2. Title Reg Converter v1.0 & Color 1A
  3. cd %systemroot%\system32
  4. call :IsAdmin
  5.  
  6.  
  7. :_Start
  8. Cls & Mode CON  LINES=11 COLS=60 & Color 0D &Title Created By FreeBooter
  9. Echo.
  10. Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
  11. Echo       º Type (D) letter to Disable Windows Defender º  
  12. Echo       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
  13. Echo.
  14. Echo.
  15. Echo       ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»  
  16. Echo       º Type (E) letter to Enable Windows Defender  º  
  17. Echo       ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ  
  18.  
  19.  
  20.  
  21. Set /p input= RESPONSE:
  22. If /i  Not %input%==D (Goto :_Ex) Else (Goto :_Disbale)
  23.  
  24. :_Ex
  25. If /i  Not %input%==E  (Goto :_Start) Else (Goto :_Enable)
  26.  
  27.  
  28.  
  29.  
  30.  
  31. :_Disbale
  32. :: Disable Windows Defender with  Group Policy.
  33. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /t REG_DWORD /d "1" /f > Nul
  34. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableBehaviorMonitoring" /t REG_DWORD /d "1" /f > Nul
  35. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableOnAccessProtection" /t REG_DWORD /d "1" /f > Nul
  36. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableScanOnRealtimeEnable" /t REG_DWORD /d "1" /f > Nul
  37.  
  38. Cls & Mode CON  LINES=5 COLS=48 & Color 0C & Title - WARNING -
  39.  Echo.
  40.  Echo.
  41.  Echo            Windows Defender Disabled
  42. Ping -n 5  localhost > Nul
  43. Exit
  44.  
  45.  
  46. :_Enable
  47. :: Enable Windows Defender with  Group Policy.
  48. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /t REG_DWORD /d "0" /f > Nul
  49. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableBehaviorMonitoring" /t REG_DWORD /d "0" /f > Nul
  50. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableOnAccessProtection" /t REG_DWORD /d "0" /f > Nul
  51. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableScanOnRealtimeEnable" /t REG_DWORD /d "0" /f > Nul
  52.  
  53.  
  54. Cls & Mode CON  LINES=5 COLS=48 & Color 0C & Title - WARNING -
  55.  Echo.
  56.  Echo.
  57.  Echo            Windows Defender Enabled
  58.  
  59. Ping -n 5  localhost > Nul
  60. Exit
  61.  
  62.  
  63.  
  64. :IsAdmin
  65. Reg.exe query "HKU\S-1-5-19\Environment"
  66. If Not %ERRORLEVEL% EQU 0 (
  67.  Cls & Mode CON  LINES=5 COLS=48 & Color 0C & Title - WARNING -
  68.  Echo.
  69.  Echo.
  70.  Echo  YOU MUST HAVE ADMINISTRATOR RIGHTS TO CONTINUE
  71.  Pause > Nul & Exit
  72. )
  73. Cls
  74. goto:eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement