A moderator at answer.microsoft.com tried to post this question on my behalf, but it appears at learn.microsoft .com with corrupted formatting. She suggested that I try re-posting, so here goes (fingers crossed).
To remove `Scan with Windows Defender` from Windows Explorer's context menu, I obtained `remove Scan with Windows Defender.reg` from here:
https://winaero.com/download-remove-scan-with-windows-defender-context-menu-in-windows-10
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 confirm 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 (https://superuser.com/questions/1532962/malwarebytes-re-installation-removes-single-file-scan-from-context-menu), `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 removed the item from the *folder* context menu (even though the corresponding `shellex` key remains!)
I also tried the procedure at https://www.intowindows.com/how-to-remove-scan-with-windows-defender-from-context-menu-of-windows-10, which requires removal of key `HKEY_CLASSES_ROOT\CLSID\{09A47860-11B0-4DA5-AFA5-26D86198A780}`. On my machine, this does not appear under `CLSID`.
The page https://www.ampercent.com/remove-scan-windows-defender-context-menu-windows-10/17882 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."
Following the success at https://superuser.com/a/1214921/767015, 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.
I tried posting this to learn.microsoft.com, but when I submit it, I get a page entitled "404 - Page not found"..
*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.