Advertisement
FreeBooter

Disable_Windows_Defender_Win11

Dec 25th, 2023
1,847
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 3.90 KB | Source Code | 0 0
  1. :: How to Permanently Disable Windows Defender Antivirus in Windows 11
  2.  
  3. @Echo Off & Cls
  4.  
  5. net sess>nul 2>&1||(powershell start cmd -ArgumentList """/c %~0""" -verb Runas & exit)
  6.  
  7. :_Start
  8. Cls & Mode CON  LINES=11 COLS=60 & Color 0E &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=^>
  22. If /i  Not %input%==D (Goto :_Ex) Else (Goto :_Disable)
  23.  
  24. :_Ex
  25. If /i  Not %input%==E  (Goto :_Start) Else (Goto :_Enable)
  26.  
  27.  
  28.  
  29.  
  30.  
  31. :_Disable
  32.  
  33. PowerShell Checkpoint-Computer -Description "Enable Windows Defender" -RestorePointType "MODIFY_SETTINGS"
  34.  
  35.  
  36. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /t REG_DWORD /d "1" /f
  37. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableRealtimeMonitoring" /t REG_DWORD /d "1" /f
  38. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableAntiVirus" /t REG_DWORD /d "1" /f
  39. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableSpecialRunningModes" /t REG_DWORD /d "1" /f
  40. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableRoutinelyTakingAction" /t REG_DWORD /d "1" /f
  41. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "ServiceKeepAlive" /t REG_DWORD /d "0" /f
  42. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "ServiceStartStates" /t REG_DWORD /d "1" /f
  43. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableBehaviorMonitoring" /t REG_DWORD /d "1" /f
  44. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableOnAccessProtection" /t REG_DWORD /d "1" /f
  45. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableScanOnRealtimeEnable" /t REG_DWORD /d "1" /f
  46. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableRealtimeMonitoring" /t REG_DWORD /d "1" /f
  47. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Signature Updates" /v "ForceUpdateFromMU" /t REG_DWORD /d "0" /f
  48. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" /v "DisableBlockAtFirstSeen" /t REG_DWORD /d "1" /f
  49.  
  50.  
  51. Cls & Mode CON  LINES=5 COLS=48 & Color 04 & Title - WARNING -
  52.  Echo.
  53.  Echo.
  54.  Echo            Windows Defender Disabled
  55. Ping -n 5  localhost > Nul
  56.  
  57. Goto :Reboot
  58.  
  59.  
  60. :_Enable
  61.  
  62. Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware"  /f
  63. Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableRealtimeMonitoring"  /f
  64. Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableAntiVirus"  /f
  65. Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableSpecialRunningModes" /f
  66. Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "DisableRoutinelyTakingAction"  /f
  67. Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "ServiceKeepAlive" /f
  68. Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "ServiceStartStates" /f
  69. Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /f
  70. Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Signature Updates"  /f
  71. Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet"  /f
  72.  
  73.  
  74.  
  75.  
  76.  
  77. Cls & Mode CON  LINES=5 COLS=48 & Color E0 & Title - WARNING -
  78.  Echo.
  79.  Echo.
  80.  Echo            Windows Defender Enabled
  81.  
  82. Ping -n 5  localhost > Nul
  83.  
  84.  
  85. :Reboot
  86. Cls & Mode CON  LINES=11 COLS=42 & Color 0E & Title FreeBooter
  87. Echo.
  88. Echo.
  89. Echo    THIS COMPUTER WILL REBOOT
  90. Echo.
  91. Echo.
  92. Echo    PLEASE SAVE ALL WORK IN PROGRESS
  93. Echo.
  94. Echo.
  95. Echo    PRESS 'ENTER' KEY TO RESTART COMPUTER
  96. Pause >Nul
  97.  
  98. Shutdown  -r  -t 5  -c "REBOOTING SYSTEM" 2>&1 > Nul
  99.  
  100. Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement