# Leapwork Silent Install - Commands breakup

A silent install is the installation of a software program that requires no user interaction. It is a convenient way to streamline the installation process of a desktop application like Leapwork Studio, Leapwork Controller, or the Leapwork Agent.

The Leapwork installer is based on MSI, and can be used from the command-line like this:

**msiexec.exe [MSI COMMAND] [MSI INSTALLER FILE PATH] [MSI COMMAND OPTIONS] [INSTALLER PACKAGE PARAMETERS]**

- **[MSI COMMAND]**
  - _/i --_ normal installation;
  - _/x --_ uninstall the package.
    - /quiet
      - quiet mode (there is no user interaction)
- **[MSI INSTALLER FILE PATH]:**
  - _a (quoted if contains spaces) path to the installer file;_
- **[MSI COMMAND OPTIONS]:**
  - _/qn --_ queit/no UI installation;
  - _/norestart --_ no restart;
  - _/forcerestart --_ forced restart;
  - _/l*v --_ enables verbose logging;

**[INSTALLER PACKAGE PARAMETERS]:** An optional list of the package parameters. It may contain a list of required "features" and other parameters like ports, shortcuts, paths &, etc. Any parameter's value should be quoted if it contains spaces.

### List of features
- _AgentFeature_-- the agent;
- _ControllerFeature_-- the controller;
- _StudioFeature_-- the studio.

#### Common Properties
- _ADDLOCAL_-- a comma-separated list of features to be installed. Default: all features;
- _LEAPWORK_AGENT_PORT_-- a TCP port to be used by the Agent. Possible values: any valid TCP port. Default: 6777;
- _LEAPWORK_AGENT_FIREWALLEXCEPTION_-- indicates whether to create a rule for the Agent's port in the firewall. Possible values: true/false. Default: true;
- _LEAPWORK_AGENT_PASSWORD_-- a password that secures the connection to the Agent. Possible values: any string. Default: empty string;
- _LEAPWORK_CONTROLLER_PORT_-- a TCP port to be used by the Controller. Possible values: any valid TCP port. Default 9000.
- _LEAPWORK_CONTROLLER_API_PORT_– an HTTP port for Public REST API endpoints. Possible values. Default 9001.
- _LEAPWORK_CONTROLLER_PASSWORD_– initial password for LEAPWORK administrator by default called as "admin".
- _LEAPWORK_CONTROLLER_FIREWALLEXCEPTION_-- indicates whether to create a rule for the Controller's port in the firewall. Possible values: true/false. Default: true;
- _LEAPWORK_ASSETS_DIR_-- a path to a folder where all assets will be stored. Possible values: string, any valid path. Default: C:\Program Files\Leapwork\Assets\;
- _LEAPWORK_MEDIA_DIR_-- a path to a folder where video and screenshots files of flows will be stored. Possible values: string, any valid path. Default: C:\Program Files\Leapwork\Assets\;
- _LEAPWORK_STUDIO_SHORTCUT_-- indicates whether to create shortcuts for the Studio on the desktop and in the Start menu. Possible values: true/false. Default: true;
- _LEAPWORK_LOGS_DIR_-- a path to a folder where all application log will be written. Possible values: string, any valid path. Default: C:\Program Files\Leapwork\Logs\.  
- _API_ACCESS_KEY_-- An API access key value. Value length must be 16 or more symbols, must contain lower and upper cases of English alphabet only and numbers;
- _LICENSE_KEY_-- Leapwork License key for the controller (and agent). Agents-only license is not supported.
- _GENERATE_REQ_FILE_-- This field should accept the path where the user wants to generate and save the REQ file using the LicenseSpring SDK. Default: "C:\Temp\Req"
- _UPLOAD_LIC_FILE_-- This field should accept the path to the location on the computer where the user has placed the LIC file for upload. Default: "C:\Temp\Lic"

#### Enterprise Properties
- _LEAPWORK_SELECT_DB="MSSQL"_ – Database to be used;
- _LEAPWORK_MSSQL_ASSET_DB_NAME_ – A name for Assets database; Default: Asset;
- _LEAPWORK_MSSQL_REPORT_DB_NAME_ – A name for Report database; Default: Report;
- _LEAPWORK_MSSQL_CONNECTION_TYPE_-- Type of connection to a database. Possible variants:
  - StandardSecurity
  - TrustedConnection
- _LEAPWORK_MSSQL_INITIAL_CATALOG_-- Database initial catalog. Default: master;
- _LEAPWORK_MSSQL_SERVER_ADDRESS_-- IP address or hostname where MSSQL server is running;
- _LEAPWORK_MSSQL_INTEGRATED_SECURITY_-- Security type specification for StandardSecurity connection type. Default: SSPI;
- _LEAPWORK_MSSQL_USER_NAME_-- User name for accessing the database using StandardSecurity connection type.
- _LEAPWORK_MSSQL_PASSWORD_-- Password for accessing the database using StandardSecurity connection type.
- _LEAPWORK_WINDOWS_USERNAME_-- Windows user name for accessing the database using Trusted Connection connection type. Must be with domain or machine name, like SystemDomain\User1 or AUTOMATIONMachine\User2
- _LEAPWORK_WINDOWS_PASSWORD_-- Windows user password for accessing the database using Trusted Connection connection type.

#### Silent install using the previous configuration from the registry
- _USE_CONFIGURATION_FROM_REGISTRY_-- A special flag that allows using previous configuration values from the registry in case of previous LEAPWORK installation. Possible values: true and false. The default value is false and you don’t need to add it as a parameter if you don’t want to use values from the registry.

### Examples
**Example of download REQ file command in offline installation:**
```shell
msiexec /i "C:\Users\UserName\Downloads\Leapwork_Experimental_x64_2024.1.850.msi" /qn /norestart /L*V "C:\Temp\msilog.log" LICENSE_KEY="XXXX-XXXX-XXXX-XXXX" GENERATE_REQ_FILE="C:\Temp\req"
```

**Example of upload LIC file command in offline installation in trial version:**
```shell
msiexec /i "C:\Users\UserName\Downloads\Leapwork_Experimental_x64_2024.1.850.msi" /qn /norestart /L*V "C:\Temp\msilog.log" LICENSE_KEY="XXXX-XXXX-XXXX-XXXX" UPLOAD_LIC_FILE="C:\Temp\lic\ls_activation.lic"
```

**Example of upload LIC file command in offline installation in enterprise version:**
```shell
msiexec /i "C:\Users\UserName\Downloads\Leapwork_Experimental_x64_2024.1.850.msi" /qn /norestart /L*V "C:\Temp\msilog.log" API_ACCESS_KEY="XXXXXXXXXXXXXXXX" LEAPWORK_AGENT_PORT="6777" LEAPWORK_CONTROLLER_PORT="9000" LEAPWORK_CONTROLLER_API_PORT="9001" LEAPWORK_MSSQL_ASSET_DB_NAME="Asset" LEAPWORK_MSSQL_REPORT_DB_NAME="Report" LEAPWORK_MSSQL_CONNECTION_TYPE="StandardSecurity" LEAPWORK_MSSQL_INITIAL_CATALOG="master" LEAPWORK_MSSQL_INTEGRATED_SECURITY="SSPI" LEAPWORK_MSSQL_SERVER_ADDRESS="WIN-19XX/SQL" LEAPWORK_CONTROLLER_PASSWORD="admin" LEAPWORK_MSSQL_USER_NAME="admin" LEAPWORK_MSSQL_PASSWORD="*****" LICENSE_KEY="XXXX-XXXX-XXXX-XXXX" UPLOAD_LIC_FILE="C:\Temp\Lic\ls_activation.lic"
```

**Example of silent install command with logging and access key with all default values:**
```shell
msiexec /i "C:\Users\localadmin\Downloads\LEAPWORK_Experimental_x64_2019.1.1265.msi" /qn /norestart /L*V "C:\Users\localadmin\Downloads\example.log" API_ACCESS_KEY="yYjxcgMdT53ueZOc"
```

**Example of how to uninstall Leapwork in silent mode without user interaction:**
```shell
msiexec /x "C:\Users\localadmin\Downloads\LEAPWORK_Experimental_x64_2019.1.1265.msi" /quiet /qn /norestart /L*V "C:\Users\localadmin\Downloads\example.log"
```

#### Notes
Windows 7 and Windows Server 2008 require a restart after installation, which can be done manually or by adding a restart command in your command line script.
