Windows Defender (現 Microsoft Defender) 預設無右鍵掃描單一檔案/資料夾功能。透過匯入註冊表檔,即可在右鍵選單新增「使用 Windows Defender 掃描」選項,支援檔案與資料夾。
Add_WD_Scan.reg)Windows Registry Editor Version 5.00
; Created by: winaero (https://winaero.com)
; Folder Scan
[HKEY_CLASSES_ROOT\Folder\shell\WindowsDefender]
"Icon"="%ProgramFiles%\\Windows Defender\\EppManifest.dll"
"MUIVerb"="使用 Windows Defender 掃描"
[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"="使用 Windows Defender 掃描"
[HKEY_CLASSES_ROOT\*\shell\WindowsDefender\Command]
@="cmd.exe /s /c \"\\\"C:\\Program Files\\Windows Defender\\MpCmdRun.exe\\\" -scan -scantype 3 -SignatureUpdate -file \\\"%1 \\\"\" & pause"
Add_WD_Scan.reg → 是 → 確定。
Scan starting... → Scan finished,偵測到威脅會顯示詳細資訊。
-scan -scantype 3:自訂掃描 (指定路徑)。-SignatureUpdate:掃描前先更新病毒碼。-file \"%1\":傳入右鍵點選的檔案/資料夾完整路徑。& pause:掃描結束暫停視窗,方便閱讀結果。Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Folder\shell\WindowsDefender]
[-HKEY_CLASSES_ROOT\*\shell\WindowsDefender]
存為 Remove_WD_Scan.reg 匯入即可移除右鍵項目。