@echo off
reg add HKLM\SOFTWARE\Classes\Directory\shell\defender\ /ve /d "Exclude from Windows Defender" /f
reg add HKLM\SOFTWARE\Classes\Directory\shell\defender\Command /ve /d "powershell start-process powershell -argumentlist '-noprofile Add-MpPreference -ExclusionPath \"%%V\"' -verb runas" /f
reg add HKLM\SOFTWARE\Classes\*\shell\defender\ /ve /d "Exclude from Windows Defender" /f
reg add HKLM\SOFTWARE\Classes\*\shell\defender\Command /ve /d "powershell start-process powershell -argumentlist '-noprofile Add-MpPreference -ExclusionPath \"%%V\"' -verb runas" /f
exit
