1, open Notepad, enter the following code:
Windows Registry Editor Version 5.00
; Folder Scan
[Hkey_classes_root\folder\shell\windowsdefender]
"Icon" = "%programfiles%\\\\windows Defender\\\\eppmanifest.dll"
"MUIVerb" = "Use Windows Defender Scan"
[Hkey_classes_root\folder\shell\windowsdefender\command]
@= "cmd.exe/s/C \" "C:\\Program Files\\Windows defender\\mpcmdrun.exe\"-scan-scantype 3-signatureupdate-file \ "%1 \" \ "& Pause"
; File Scan
[Hkey_classes_root\*\shell\windowsdefender]
"Icon" = "%programfiles%\\\\windows Defender\\\\eppmanifest.dll"
"MUIVerb" = "Use Windows Defender Scan"
[Hkey_classes_root\*\shell\windowsdefender\command]
@= "cmd.exe/s/C \" "C:\\Program Files\\Windows defender\\mpcmdrun.exe\"-scan-scantype 3-signatureupdate-file \ "%1 \" \ "& Pause"
2, Save the code as "All Files" (save type), the name itself, but the suffix must be ". Reg", the path is arbitrary, the following figure-
3, double-click to run the file, the above content was added to the registry, right-click menu to add success, as shown below-
After that, you can use Windows Defender to scan specific files, folders, or partitions without having to open the Windows Defender interface.