Kaspersky
Solved

antivirus command line parameters: How? what is the syntax?


Userlevel 1
Badge
Hi I have downloaded kaspersky antivirus trial, i´m doing some testing for a project and need an antivirus that could run/execute from windows 10 command prompt and scan/clean/desinfect a usb pendrive inserted in the computer,
1.- how this can be done?
2.- what is the syntax?

best regards
icon

Best answer by Schulte 12 July 2019, 22:43

You can use the following command for a first test. You have to customize the path, I don't know which product is used. (and don't forget the quote marks)

code:
"C:\Program Files (x86)\Kaspersky Lab\[Path to your KL produkt]\avp.com" SCAN F: /MEMORY /i8 /fa /R:%homepath%/desktop/ReportScanF.txt




The command scans drive F and the system memory, a log file named 'ReportScanF.txt' is stored on the desktop.

Finally an overview of the parameters, then you can experiment with the settings.



code:
Usage: SCAN [] [/all][/memory][/startup][/mail][/remdrives]
[/fixdrives][/netdrives][/apprules] [/@:]
[/i<0-4,8,9>] [-e:a|s|b|m||]
[/R[a]:] [/C:] [/hlevel ]
Scan area:
List of files and/or folders delimited with space.
Long path names must be enclosed in quotes.
/ALL Scan my computer
/MEMORY Scan computer memory
/STARTUP Scan startup-objects
/MAIL Scan mailboxes
/REMDRIVES Scan removable media
/FIXDRIVES Scan hard drives
/NETDRIVES Scan network drives
/apprules Categorization of the executable files
/@: Scan files in specified list file

Action with infected files:
/i0 Report only
/i1 Disinfect object,
skip if disinfection is impossible.
/i2 Disinfect object,
delete object if disinfection is impossible,
dont't delete objects from containers,
delete containers with executable header.
/i3 Disinfect object,
delete object if disinfection is impossible,
delete containers if objects can not be deleted.
/i4 Delete infected objects,
delete containers if objects can not be deleted.
/i8 (default) Ask me immediately
/i9 Ask me when scan is finished
File types:
/fe Quick check
/fi Smart check (default)
/fa All files
Excludes:
-e:a Skip archives
-e:b Skip e-mail databases
-e:m Skip plain text e-mail
-e: Skip files by mask
-e: Skip files scanned longer than
-es: Skip files greater than
Reports:
/R: Save only critical events
/RA: Save all events
Additional settings:
/iChecker= Enable/disable iChecker technology
/iSwift= Enable/disable iSwift technology
/C: Specifies configuration file
/hlevel Specifies heuristic level [1-1000]

Examples:
avp.com SCAN /R:log.txt /MEMORY /STARTUP /MAIL "C:\Documents and Settings\All Users\My Documents" "C:\Program Files" C:\Downloads\test.exe
avp.com SCAN /MEMORY /@:objects2scan.txt /C:scan_settings.txt /RA:scan.log
View original

11 replies

Userlevel 7
Badge +7
Hi @Faustocg, welcome to the new forum.

Scans and other functions are controlled by 'AVP.COM'. It is located in the Kaspersky applications directory (do not confuse it with 'AVP.EXE'!).
With 'AVP.COM Help' you can get a list of the parameters or you can check them with e.g. 'AVP.COM Help Scan'.
Userlevel 1
Badge
Thank you for your help, could post an example and a list of parameters, I want to scan and vaccinate a pendrive with letter F: in my system

best regards
Userlevel 7
Badge +7
You can use the following command for a first test. You have to customize the path, I don't know which product is used. (and don't forget the quote marks)
code:
"C:\Program Files (x86)\Kaspersky Lab\[Path to your KL produkt]\avp.com" SCAN F: /MEMORY /i8 /fa /R:%homepath%/desktop/ReportScanF.txt


The command scans drive F and the system memory, a log file named 'ReportScanF.txt' is stored on the desktop.
Finally an overview of the parameters, then you can experiment with the settings.

code:
Usage: SCAN [] [/all][/memory][/startup][/mail][/remdrives]
[/fixdrives][/netdrives][/apprules] [/@:]
[/i<0-4,8,9>] [-e:a|s|b|m||]
[/R[a]:] [/C:] [/hlevel ]
Scan area:
List of files and/or folders delimited with space.
Long path names must be enclosed in quotes.
/ALL Scan my computer
/MEMORY Scan computer memory
/STARTUP Scan startup-objects
/MAIL Scan mailboxes
/REMDRIVES Scan removable media
/FIXDRIVES Scan hard drives
/NETDRIVES Scan network drives
/apprules Categorization of the executable files
/@: Scan files in specified list file

Action with infected files:
/i0 Report only
/i1 Disinfect object,
skip if disinfection is impossible.
/i2 Disinfect object,
delete object if disinfection is impossible,
dont't delete objects from containers,
delete containers with executable header.
/i3 Disinfect object,
delete object if disinfection is impossible,
delete containers if objects can not be deleted.
/i4 Delete infected objects,
delete containers if objects can not be deleted.
/i8 (default) Ask me immediately
/i9 Ask me when scan is finished
File types:
/fe Quick check
/fi Smart check (default)
/fa All files
Excludes:
-e:a Skip archives
-e:b Skip e-mail databases
-e:m Skip plain text e-mail
-e: Skip files by mask
-e: Skip files scanned longer than
-es: Skip files greater than
Reports:
/R: Save only critical events
/RA: Save all events
Additional settings:
/iChecker= Enable/disable iChecker technology
/iSwift= Enable/disable iSwift technology
/C: Specifies configuration file
/hlevel Specifies heuristic level [1-1000]

Examples:
avp.com SCAN /R:log.txt /MEMORY /STARTUP /MAIL "C:\Documents and Settings\All Users\My Documents" "C:\Program Files" C:\Downloads\test.exe
avp.com SCAN /MEMORY /@:objects2scan.txt /C:scan_settings.txt /RA:scan.log
Userlevel 1
Badge
Thank you
Userlevel 1
Badge
thank you very much
Userlevel 1
Badge
Hi, I know that the above information applies to windows version of avp.com, can I do the same in Linux? what will be the app I need to execute? and what will be the parameters I could apply?

best regards
Userlevel 7
Badge +7
Hi @Faustocg,

a version for Linux is only available under a business license.
Tasks can also be created/started there via the command line, unfortunately I don't know more.

https://support.kaspersky.com/KIS4Mac/16.0/en.lproj/pgs/26820.htm

 

Note: To run a virus scan, you can also use tasks created in the application by starting one from the command line. The task is started with the parameters that are specified in the Kaspersky Internet Security interface.

 

How can I run this? I’m getting the 404 error when clicking on the link in the quote.

Userlevel 7
Badge +9

Hello @don_dolarson,

Welcome!

  1. Where is the quoted link from? 
  2. Have you followed @Schulte’s guidance?
  3. Is your operating system MAC or Windows? 

Thank you:pray_tone3:

Flood:whale:

It's from your support page which I've linked to? Did you even checked it? However, I've found what I've asked for. No need for more of your nonsense answers.

Userlevel 7
Badge +9

Hello @don_dolarson,

:joy:

You’re most welcome, and yes, we did, that’s why we asked for clarification

 

Thank you:pray_tone3:

Flood:whale:

Reply