You can specify the following actions that Kaspersky Security will perform on detecting infected files:
Inform (i0). Upon detecting infected files, Kaspersky Security informs you about the detection.
Disinfect (i1). Kaspersky Security automatically attempts to disinfect all infected files that are detected. If disinfection fails, the application leaves such files unchanged.
Disinfect. Delete if disinfection fails. Skip compound files if they cannot be disinfected or deleted (i2). Kaspersky Security automatically attempts to disinfect all infected files that are detected. If disinfection fails, the application removes them. If the infected file is part of a compound file and cannot be deleted, the application leaves this file unchanged.
Disinfect. Delete if disinfection fails (i3). Kaspersky Security automatically attempts to disinfect all infected files that are detected. If disinfection fails, the application removes them. If the infected file is part of a compound file and cannot be deleted, the application deletes the entire compound file. This action is performed by default.
Delete (i4). Kaspersky Security automatically deletes the infected file, having first created a backup copy of the file. If the infected file that is part of a compound file cannot be deleted, the application deletes the entire compound file.
To specify actions to take on infected files, execute the following command:
lightagent scan [<path to file or folder>] [--i<0-4>]
where:
<path to file or folder> – path to file or folder that you want to scan for viruses and other malware. If you do not specify the paths to files or folders, the application scans all objects of the file system of the protected virtual machine.
i0 – on detecting infected files, perform the Inform action.
i1 – on detecting infected files, perform the Disinfect action.
i2 – on detecting infected files, perform the Disinfect action. Delete if disinfection fails. Skip compound files if they cannot be disinfected or deleted.
i3 – on detecting infected files, perform the Disinfect action. Delete if disinfection fails. This action is performed by default.
i4 – on detecting infected files, perform the Delete action.