Advertisement
FreeBooter

Disable Windows Defender

Apr 7th, 2024
806
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.89 KB | Source Code | 0 0
  1. @Echo Off
  2.  
  3. net sess>nul 2>&1||(powershell start cmd -ArgumentList """/c %~0""" -verb Runas & exit)
  4.  
  5. :_Start
  6. Cls & Mode CON  LINES=11 COLS=60 & Color 0E &Title Created By FreeBooter
  7. Echo.
  8. Echo.      
  9. Echo         Type (D) letter to Disable Windows Defender  
  10. Echo.      
  11. Echo.
  12. Echo.
  13. Echo.        
  14. Echo         Type (E) letter to Enable Windows Defender    
  15. Echo.        
  16.  
  17.  
  18.  
  19. Set /p input= RESPONSE:
  20. If /i  Not %input%==D (Goto :_Ex) Else (Goto :_Disbale)
  21.  
  22. :_Ex
  23. If /i  Not %input%==E  (Goto :_Start) Else (Goto :_Enable)
  24.  
  25.  
  26.  
  27.  
  28.  
  29. :_Disbale
  30. :: Disable Windows Defender with  Group Policy.
  31. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /t REG_DWORD /d "1" /f
  32. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableRealtimeMonitoring" /t REG_DWORD /d "1" /f
  33. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableBehaviorMonitoring" /t REG_DWORD /d "1" /f
  34. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableOnAccessProtection" /t REG_DWORD /d "1" /f
  35. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableScanOnRealtimeEnable" /t REG_DWORD /d "1" /f
  36. Gpupdate /Force
  37.  
  38. Cls & Mode CON  LINES=5 COLS=49 & Color 0E & Title - WARNING -
  39.  Echo.
  40.  Echo.
  41.  Echo            Windows Defender Disabled
  42. Ping -n 5  localhost > Nul
  43. Cls
  44. Goto :Reboot
  45.  
  46.  
  47. :_Enable
  48. :: Enable Windows Defender with  Group Policy.
  49.  
  50. Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /f
  51. Gpupdate /Force
  52.  
  53.  
  54.  
  55. Cls & Mode CON  LINES=5 COLS=49 & Color 0E & Title - WARNING -
  56.  Echo.
  57.  Echo.
  58.  Echo            Windows Defender Enabled
  59.  
  60. Ping -n 5  localhost > Nul
  61. Cls
  62.  
  63.  
  64.  
  65. :Reboot
  66. CHOICE /C YN /M "Press Y to Reboot, N for exiting script."
  67.  
  68.  
  69. If %errorlevel% == 1 ( Shutdown /r /t 0) Else (Exit)
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement