To remove Scan with Windows Defender from Windows Explorer's context menu, I obtained remove Scan with Windows Defender.reg from here
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\EPP]
[-HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\EPP]
The first command removes Scan with Windows Defender from the file context menu. The second removes it from the folder context menu.
I ran the above *.reg file from an administrator account without regedit running. I then fired up regedit and checked that the second key is gone, rebooted the laptop, and confirmed that Scan with Windows Defender is gone from the folder context menu.
Perplexingly, however, it is still present in the file context menu. Furthermore, the folder key HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\EPP still exists, containing value (Default) set to {09A47860-11B0-4DA5-AFA5-26D86198A780}.
I went back through years of computer housekeeping and found that in 2020, Scan with Windows Defender was added to the following shell keys rather than the above shellex keys:
HKEY_CLASSES_ROOT\*\shell\WindowsDefender
HKEY_CLASSES_ROOT\*\shell\WindowsDefender\Command
The asterisk makes it impossible to track down manually. Is this why Scan with Windows Defender remains in the file context menu?
Before answering, please note from the above 2020 page that Scan with Windows Defender was also added to the folder context menu via a corresponding shell key. However, the above command specifying a shellex key seemingly removed the item from the folder context menu (even though the corresponding shellex key remains!)
I also tried this procedure, which requires removal of key HKEY_CLASSES_ROOT\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}. On my machine, this does not appear under CLSID.
This page additionally says to try regsvr32 /u "C:\Program Files\Windows Defender\shellext.dll", but it generates a RegSvr32 popup error The module "c:\Program Fileis\Windows Defender\shellext.dll" was loaded but the call to DllUnregisterServer failed with error code 0x8002801c. For more information about this problem, search online using the error code as a search term.
I found a bit more about this last solution. Following the success of this user, I installed before uninstalling, but it didn't work (I got similar error messages after both commands):
regsvr32 /i "C:\Program Files\Windows Defender\shellext.dll"
regsvr32 /u "C:\Program Files\Windows Defender\shellext.dll"
What else can I try to remove Scan with Windows Defender? I suspect that I will have to install Windows Defender before the above solutions can work. I can no longer find up-to-date information on installing the old Windows Defender. I suspect that even if I could find it, it will be tricky to replaces the current Microsoft Defender with Windows Defender.
After doing that, I will take the next step of installing Scan with *Microsoft* Defender on Windows Explorer's context menu. Microsoft Defender is my current antivirus.
I tried posting this to learn.microsoft.com, but when I submit it, I get a page entitled "404 - Page not found"..