在 win8.1 右键菜单加上“使用 Windows Defender 扫描”

    xiaoxiao2021-03-25  109

    将以下代码拷贝到文本编辑器(记事本),保存为 .reg 文件(注册表脚本),运行即可

    Windows Registry Editor Version 5.00 ; 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 echo NOTE: Please use args with ASCII charaters only, if there is no scan report with the sentence 'found xx threads'. & cmd.exe /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 echo NOTE: Please use args with ASCII charaters only, if there is no scan report with the sentence 'found xx threads'. & cmd.exe /c \"\"C:\\Program Files\\Windows Defender\\MpCmdRun.exe\" -scan -scantype 3 -SignatureUpdate -file \"%1 \"\" & pause"

    注意: 添加的 右键菜单 只能够处理 路径无中文 的情况,分以下两种情形:

    扫描文件夹 文件夹的路径不可出现中文,但文件夹内 可以 有用中文命名的文件。 扫描文件 文件的路径不可出现中文,这意味着该文件 不可以 用中文命名。

    我猜想这或许是因为,MpCmdRun.exe 不能正确处理 合法的 带 非 ASCII 字符 的路径。(嗯,我就是想说 路径中要都是以拉丁字母及一些合法的符号(如,. _ - 等)命名的文件夹 )。所以我想除了文字使用英文的机子,这个脚本在使用其他的文字机子应该都不行的。:)

    扫描的结果会显示发现威胁的文件个数:found 0 threads 当然,扫描的过程没有进度条,没有界面,只有光标,win8.1 下就凑合着用吧,右击菜单扫描一般用来对下载的文件扫描下而已。win 10 下 Windows Defender 扫描选项默认已经集成在右键菜单了。

    参考资料: 图形化操作注册表 注册表脚本操作

    转载请注明原文地址: https://ju.6miu.com/read-6839.html

    最新回复(0)