- Tamper protection needs to be disabled
- Disable Tamper Protection.
- Run Disable.bat to disable Windows Defender.
- Reboot.
- Run it once (maybe more, thanks Microsoft) again so it can actually disable Windows Defender. Console output will say "SUCCESS" instead of "ERROR" when it actually disables it.
- Once there's no "Antimalware Service Executable" in the Task Manager - it's disabled.
- (Optional) Reboot once more, because sometimes Windows still manages to enable Defender by itself and you have to do everything from the start again.
- Run Enable.bat.
- Reboot so that Windows can start services again.
- Open Windows Security and check all the options (Real-time protection, Tamper Protection and etc.).
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run" /v "SecurityHealth" /f
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\Run" /v "SecurityHealth" /f
reg add "HKLM\Software\Classes\*\shellex\ContextMenuHandlers\EPP" /ve /t REG_SZ /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f
reg add "HKLM\Software\Classes\Drive\shellex\ContextMenuHandlers\EPP" /ve /t REG_SZ /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f
reg add "HKLM\Software\Classes\Directory\shellex\ContextMenuHandlers\EPP" /ve /t REG_SZ /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f
reg delete "HKCR\*\shellex\ContextMenuHandlers\EPP" /f
reg delete "HKCR\Directory\shellex\ContextMenuHandlers\EPP" /f
reg delete "HKCR\Drive\shellex\ContextMenuHandlers\EPP" /f
reg add "HKLM\System\CurrentControlSet\Services\SgrmBroker" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKLM\System\CurrentControlSet\Services\SecurityHealthService" /v "Start" /t REG_DWORD /d "4" /f