Kaspersky Standard | Plus | Premium

How to manage general application settings on the command line

General application settings define the operation of the application as a whole and the operation of individual functions.

You can manage general application settings using special management commands:

  • Output the current values of general application settings to the console or to a configuration file.
  • Edit general application settings using a configuration file containing all general settings, or using command line options in the <setting name>=<setting value> format.

Using general settings, you can:

In this section

How to output general application settings to the console or into a configuration file

How to modify general application settings on the command line

Page top
[Topic 287602]

How to output general application settings to the console or into a configuration file

You can output the current values of general application settings to the console or to a configuration file that you can use to edit task settings.

To output the current values of general application settings to the console, execute the following command:

kfl-control --get-app-settings [--json]

where --json is specified to output the settings in JSON format. If the --json option is not specified, the settings are output in the INI format.

To output the current values of general application settings to a configuration file, execute the following command:

kfl-control --get-app-settings --file <configuration file path> [--json]

where:

  • --file <configuration file path> is the path to the configuration file into which general settings of the application will be written. If you specify the name of a file without its path, the file will be created in the current directory. If a file already exists in the specified path, it will be overwritten. If the specified directory does not exist, the configuration file will not be created.
  • --json is specified to output the settings in JSON format. If the --json option is not specified, the settings are output in the INI format.

    Example:

    Display the general application settings to a file named kfl_config.ini. Save the created file in the current directory:

    kfl-control --get-app-settings --file kfl_config.ini

Page top

[Topic 290468]

How to modify general application settings on the command line

On the command line, you can edit the general application settings by using the kfl-control --set-app-settings command:

  • You can edit all general settings using the configuration file that contains the general application settings. You can get the configuration file using the command for displaying general settings.
  • You can edit individual settings using command line options in the <setting name>=<setting value> format. You can get the current values of general application settings using the command for displaying general settings.

To edit values of general application settings using a configuration file:

  1. Output the general application settings to a configuration file.
  2. Edit the values of the necessary parameters in the file and save the changes.
  3. Execute the command:

    kfl-control --set-app-settings --file <configuration file path> [--json]

    where:

    • --file <path to configuration file> is the full path to the configuration file with the general application settings. If you delete any parameter in the configuration file, the default value for that parameter will be displayed after the command is executed.
    • --json: specify this option if you are importing settings from a configuration file in JSON format. If the --json option is not specified, the application attempts to import from an INI file. If the import fails, an error is displayed.

All the values of the general settings defined in the file will be imported into the application.

To edit general application settings using command line options, execute the following command:

kfl-control --set-app-settings <setting name>=<setting value> [<setting name>=<setting value>]

where <setting name>=<setting value> is the name and value of one of the general application settings.

The values of the specified general settings will be changed.

Examples:

Import general settings into the application from the /home/test/kfl_config.ini configuration file:

kfl-control --set-app-settings --file /home/test/kfl_config.ini

Set the detail level for the trace file to low:

kfl-control --set-app-settings TraceLevel=NotDetailed

Add a mount point that you want to exclude from interception of file operations:

kfl-control --set-app-settings ExcludedMountPoint.item_0000="/data"

Page top

[Topic 290469]