@echo off
setlocal

echo.
echo Removing 'Exclude from Windows Defender' context menu entries...
echo.

:: --- Inline PowerShell to delete registry keys (including subkeys) ---
powershell -NoProfile -ExecutionPolicy Bypass -Command "Remove-Item -LiteralPath 'Registry::HKEY_CURRENT_USER\Software\Classes\*\shell\Exclude from Windows Defender' -Recurse -Force -ErrorAction SilentlyContinue; Remove-Item -LiteralPath 'Registry::HKEY_CURRENT_USER\Software\Classes\Folder\shell\Exclude from Windows Defender' -Recurse -Force -ErrorAction SilentlyContinue; Write-Host 'Successfully removed Defender context menu.'"

echo.
pause
endlocal
