Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 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 > Nul
  32. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableBehaviorMonitoring" /t REG_DWORD /d "1" /f > Nul
  33. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableOnAccessProtection" /t REG_DWORD /d "1" /f > Nul
  34. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableScanOnRealtimeEnable" /t REG_DWORD /d "1" /f > Nul
  35. Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableRealtimeMonitoring" /t REG_DWORD /d "1" /f > Nul
  36.  
  37. Cls & Mode CON LINES=5 COLS=49 & Color 0E & Title - WARNING -
  38. Echo.
  39. Echo.
  40. Echo Windows Defender Disabled
  41. Ping -n 5 localhost > Nul
  42. Cls
  43. Goto :Reboot
  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. Reg.exe delete "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableRealtimeMonitoring" /f > Nul
  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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement