Enabling start of On-Demand Scan task from context menu
You can enable the start of On-Demand Scan task for one or several files from a context menu in Microsoft Windows Explorer.
To enable the start of On-Demand Scan task from a context menu:
- Create the following REG files:
Windows Registry Editor Version 5.0.0
[HKEY_CLASSES_ROOT\Directory\shell\ksws\command]
@="C:\\Temp\\scan.cmd \"%1\""
[HKEY_CLASSES_ROOT\*\shell\ksws\command]
@="C:\\Temp\\scan.cmd \"%1\""
[HKEY_CLASSES_ROOT\Directory\shell\ksws]
@="Scan with Kaspersky Security for Windows Server\"
"Icon"="\"C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Security for Windows Server\\kavtrayr.dll\",0"
[HKEY_CLASSES_ROOT\Directory\shell\ksws\DefaultIcon]
@="\"C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Security for Windows Server\\kavtrayr.dll\",0"
[HKEY_CLASSES_ROOT\*\shell\ksws]
@="Scan with Kaspersky Security for Windows Server\"
"Icon"="\"C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Security for Windows Server\\kavtrayr.dll\",0"
[HKEY_CLASSES_ROOT\*\shell\ksws\DefaultIcon]
@="\"C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Security for Windows Server\\kavtrayr.dll\",0"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Program Files (x86)\\Kaspersky Lab\\Kaspersky Security for Windows Server\\kavshell.exe"="~ RUNASADMIN"
You need to specify the actual location of the Kaspersky Security for Windows Server installation folder.
- Create the
scan.cmd
file with the following content:@echo off
set LOGNAME=%RANDOM%
"C:\Program Files (x86)\Kaspersky Lab\Kaspersky Security for Windows Server\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
The
scan.cmd
file must contain the following information:- The location of
kavshell.exe
file. - The location of temporary file containing the scan results.
- Parameters for the
KAVSHELL SCAN
command. - The timeout value for closing the console window when the task is finished.
- The location of
- Copy the
scan.cmd
file to the folder specified in the[HKEY_CLASSES_ROOT\Directory\shell\ksws\command]
REG file.The
C:\Temp
folder is used in example.
You don't need to restart the operating system.