Code
:: Add or Remove "Scan with Windows Defender" Context Menu in Windows 10
@Echo Off & Cls
net sess>nul 2>&1||(powershell start cmd -ArgumentList """/c %~0""" -verb Runas & exit)
Cls & Mode CON LINES=11 COLS=75 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo.
Echo Remove "Scan with Windows Defender" from Context Menu (Y/N)?
Echo.
Echo.
Echo.
Set /p input= RESPONSE:
If /i Not %input%==Y (Goto :_Ex) Else (Goto :_Start)
:_Ex
If /i Not %input%==N (Goto :EOF) Else (Goto :_RegRestore)
:_Start
Reg.exe delete "HKCR\*\shellex\ContextMenuHandlers\EPP" /f > Nul
Reg.exe delete "HKCR\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f > Nul
Reg.exe delete "HKCR\Directory\shellex\ContextMenuHandlers\EPP" /f > Nul
Reg.exe delete "HKCR\Drive\shellex\ContextMenuHandlers\EPP" /f > Nul
Cls & Mode CON LINES=11 COLS=75 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo.
Echo Removing "Scan with Windows Defender" from Context Menu
Echo.
Echo.
Echo.
Ping -n 6 localhost >Nul
Exit
:_RegRestore
Reg.exe add "HKCR\*\shellex\ContextMenuHandlers\EPP" /ve /t REG_SZ /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f > Nul
Reg.exe add "HKCR\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}\InprocServer32" /ve /t REG_SZ /d "C:\Program Files\Windows Defender\shellext.dll" /f > Nul
Reg.exe add "HKCR\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}\InprocServer32" /v "ThreadingModel" /t REG_SZ /d "Apartment" /f > Nul
Reg.exe add "HKCR\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}\Version" /ve /t REG_SZ /d "10.0.18362.1" /f > Nul
Reg.exe add "HKCR\Directory\shellex\ContextMenuHandlers\EPP" /ve /t REG_SZ /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f > Nul
Reg.exe add "HKCR\Drive\shellex\ContextMenuHandlers\EPP" /ve /t REG_SZ /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f > Nul
Cls & Mode CON LINES=11 COLS=75 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo.
Echo Adding "Scan with Windows Defender" to Context Menu
Echo.
Echo.
Echo.
Ping -n 6 localhost >Nul
Exit
