从上下文菜单中启用按需扫描任务的启动

2023年2月20日

ID 194306

您可以从 Microsoft Windows 资源管理器的上下文菜单中启用针对一个或多个文件的按需扫描任务的启动。

要从上下文菜单启用按需扫描任务的启动:

  1. 创建以下 REG 文件:

    Windows Registry Editor Version 5.0.0

    [HKEY_CLASSES_ROOT\Directory\shell\kess\command]

    @="C:\\Temp\\scan.cmd \"%1\""

    [HKEY_CLASSES_ROOT\*\shell\kess\command]

    @="C:\\Temp\\scan.cmd \"%1\""

    [HKEY_CLASSES_ROOT\Directory\shell\kess]

    @="Scan with Kaspersky Embedded Systems Security\"

    "Icon"="\"C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Embedded Systems Security\\kavtrayr.dll\",0"

    [HKEY_CLASSES_ROOT\Directory\shell\kess\DefaultIcon]

    @="\"C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Embedded Systems Security\\kavtrayr.dll\",0"

    [HKEY_CLASSES_ROOT\*\shell\kess]

    @="Scan with Kaspersky Embedded Systems Security\"

    "Icon"="\"C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Embedded Systems Security\\kavtrayr.dll\",0"

    [HKEY_CLASSES_ROOT\*\shell\kess\DefaultIcon]
    @="\"C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Embedded Systems Security\\kavtrayr.dll\",0"

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]

    "C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Embedded Systems Security\\kavshell.exe"="~ RUNASADMIN"

    您需要指定 Kaspersky Embedded Systems Security 安装文件夹的实际位置。

  2. 创建具有以下内容的 scan.cmd 文件:

    @echo off
    set LOGNAME=%RANDOM%

    "C:\Program Files (x86)\Kaspersky Lab\Kaspersky Embedded Systems Security\kavshell.exe" scan "%~1" /W:c:\temp\%LOGNAME%.txt

    echo Scanning is in progress...
    type c:\temp\%LOGNAME%.txt
    del c:\temp\%LOGNAME%.txt

    timeout /t -1

    scan.cmd 文件必须包含以下信息:

    • kavshell.exe 文件的位置。
    • 包含扫描结果的临时文件的位置。
    • KAVSHELL SCAN 命令的参数。
    • 用于在任务完成后关闭控制台窗口的超时值。
  3. scan.cmd 文件复制到 [HKEY_CLASSES_ROOT\Directory\shell\kess\command] REG 文件中指定的文件夹。

    示例中使用了 C:\Temp 文件夹。

您无需重新启动操作系统。

Did you find this article helpful?
What can we do better?
Thank you for your feedback! You're helping us improve.
Thank you for your feedback! You're helping us improve.