Use the Leapwork Flow CLI installer to install, update, repair, or uninstall Flow from PowerShell. The installer uses an executable (.exe) and a ZIP file (.zip). You can select which Flow components to install, configure their properties, and run installer operations from scripts.
Before you begin
-
Run PowerShell as an administrator.
-
Download the CLI installer executable and its matching ZIP file.
-
Make both files available on the machine where you’ll run the installation.
-
Decide which components and optional add-ons to install.
-
Prepare any required license, database, and authentication details.
-
Replace placeholder values in the examples before running them.
The executable and ZIP file must have the same version.
Set up the installer paths
Replace the placeholders with the folder and file names for your downloaded installer files.
$downloadsDir = "C:\Users\<USER_NAME>\Downloads"
$artifactBaseName = "<DOWNLOADED_FILE_NAME_WITHOUT_EXTENSION>"
$installer = Join-Path $downloadsDir "$artifactBaseName.exe"
$package = Join-Path $downloadsDir "$artifactBaseName.zip"
$installDir = "C:\Program Files\Leapwork"
$logsDir = "$installDir\.leapwork-installer\logs"
Add --log-file to a command to save its output to a specific file. Add --verbose for more detailed output.
Select components
Use --component to specify the components to install. You can repeat the option to select multiple components.
|
Component ID |
Description |
|---|---|
|
|
Controller service and server files |
|
|
Agent service and files |
|
|
Flow desktop application |
Optional components include:
|
Component ID |
Description |
|---|---|
|
|
GreenScreen files for Agent |
|
|
GreenScreen files for Studio |
|
|
SAP SolMan files for Studio |
When you specify components, the installer includes their required dependencies. If you omit --component, the installer uses the package’s default components and dependencies.
Install Flow
This example installs Controller, Agent, and Studio:
& $installer install $package `
--install-dir $installDir `
--component controller `
--component agent `
--component studio `
--property "package.logsDir=$installDir\Logs" `
--property "controller.assetsDir=$installDir\Assets" `
--property "controller.mediaDir=$installDir\Media" `
--log-file "$logsDir\install-flow.log" `
--verbose
To include optional components, add their IDs. This example adds GreenScreen for Agent and Studio, and SAP SolMan for Studio:
& $installer install $package `
--install-dir $installDir `
--component controller `
--component agent `
--component agent-greenscreen `
--component studio `
--component studio-greenscreen `
--component studio-sapsolman `
--property "package.logsDir=$installDir\Logs" `
--property "controller.licenseKey=<LICENSE_KEY>" `
--property "controller.assetsDir=$installDir\Assets" `
--property "controller.mediaDir=$installDir\Media" `
--property "controller.databasePassword=<SQLITE_DB_PASSWORD>" `
--property "agent.useSystemAuthentication=true" `
--log-file "$logsDir\install-flow-with-addons.log" `
--verbose
Configure Agent authentication
Windows authentication is the default. To use Agent password authentication, set agent.useSystemAuthentication to false and provide an Agent password:
--property "agent.useSystemAuthentication=false" `
--property "agent.agentPassword=<AGENT_PASSWORD>"
Do not provide agent.agentPassword when using Windows authentication.
Configure Studio
The studio component installs the Flow desktop application. Studio properties can set its log directory, shortcuts, local Controller connection, and mobile firewall ports.
The Studio configuration file is created in the profile of the user running the installer. If a deployment tool runs the installation as SYSTEM, specify the target user profile as required by your deployment process.
Configure the Controller database
Trial and Platform Controller installations use SQLite. Existing SQLite files are not overwritten.
Enterprise Controller installations can use:
-
Microsoft SQL Server with Standard Security
-
Microsoft SQL Server with a Trusted Connection
-
Azure SQL
Microsoft SQL Server with Standard Security
Provide the database type, server, SQL credentials, and database names:
--property "controller.licenseType=ENTERPRISE" `
--property "controller.databaseType=MSSQL" `
--property "controller.mssqlConnectionType=StandardSecurity" `
--property "controller.mssqlServerAddress=<SQL_SERVER>" `
--property "controller.mssqlInitialCatalog=master" `
--property "controller.mssqlAssetDatabaseName=<ASSET_DATABASE>" `
--property "controller.mssqlReportDatabaseName=<REPORT_DATABASE>" `
--property "controller.mssqlUserName=<SQL_USER>" `
--property "controller.mssqlPassword=<SQL_PASSWORD>"
For a Trusted Connection, configure the Windows account used for the SQL connection and Controller service. For Azure SQL, provide the required Azure client ID, client secret, and tenant ID.
Install an Enterprise Controller without a license key
Use --force-silent-enterprise-install to install an Enterprise Controller without providing a license key:
& $installer install $package `
--install-dir $installDir `
--component controller `
--force-silent-enterprise-install `
--property "controller.controllerPassword=<CONTROLLER_ADMIN_PASSWORD>" `
--property "controller.assetsDir=$installDir\Assets" `
--property "controller.mediaDir=$installDir\Media" `
--property "package.logsDir=$installDir\Logs" `
--property "controller.databaseType=MSSQL" `
--property "controller.mssqlConnectionType=StandardSecurity" `
--property "controller.mssqlServerAddress=<SQL_SERVER>" `
--property "controller.mssqlInitialCatalog=master" `
--property "controller.mssqlAssetDatabaseName=<ASSET_DATABASE>" `
--property "controller.mssqlReportDatabaseName=<REPORT_DATABASE>" `
--property "controller.mssqlUserName=<SQL_USER>" `
--property "controller.mssqlPassword=<SQL_PASSWORD>" `
--log-file "$logsDir\install-enterprise-controller.log" `
--verbose
This option applies to the Controller. Do not combine it with controller.licenseKey, controller.licenseFilePath, or a non-Enterprise controller.licenseType.
If the Controller was installed with this option, include it in later update and repair commands. Do not use it with a normally licensed Controller.
Use a property file
Use --property-file when you need to supply many properties. JSON and TOML files are supported. You can repeat the option; later files override values from earlier files. Explicit --property values override values in the files.
For example:
& $installer install $package `
--install-dir $installDir `
--component controller `
--property-file ".\common.properties.json" `
--property-file ".\controller-trial.properties.toml" `
--property "controller.mssqlPassword=<OVERRIDE_SQL_PASSWORD>" `
--log-file "$logsDir\install-controller.log" `
--verbose
Property files are supported for install, install --use-configuration, and update. They are not supported for repair, uninstall, or generate-req-file.
Update Flow
Use update to change properties or components in an existing installation. Specify the installation directory and the installer package:
& $installer update $package `
--install-dir $installDir `
--component controller `
--component agent `
--component studio `
--property "controller.assetsDir=$installDir\Assets" `
--log-file "$logsDir\update-flow.log" `
--verbose
You can use update to add, replace, or exclude components, and to change supported property values. Follow the component and property guidance for your deployment.
If the Controller was installed using --force-silent-enterprise-install, include that option in the update command. Do not use it for a normally licensed Controller.
Repair Flow
Use repair to repair an existing installation:
& $installer repair `
--install-dir $installDir `
--log-file "$logsDir\repair-flow.log" `
--verbose
If the Controller was installed using --force-silent-enterprise-install, include that option in the repair command. Repair does not use an installer package.
Reinstall using the saved configuration
Use install --use-configuration to reinstall Flow with the saved configuration:
& $installer install --use-configuration `
--install-dir $installDir `
--log-file "$logsDir\reinstall-flow.log" `
--verbose
Activate Flow offline
The installer can create a license request file (.REQ) and install a license file (.LIC) without an internet connection.
Create the request file:
& $installer generate-req-file `
--install-dir $installDir `
--output-file "C:\Temp\leapwork-license.req" `
--verbose
Provide the .REQ file to your Leapwork representative to obtain a license file. Then install the license:
& $installer install $package `
--install-dir $installDir `
--component controller `
--property "controller.licenseFilePath=C:\Temp\leapwork-license.lic" `
--log-file "$logsDir\install-with-license-file.log" `
--verbose
Uninstall Flow
Use uninstall to remove the installation:
& $installer uninstall `
--install-dir $installDir `
--log-file "$logsDir\uninstall-flow.log" `
--verbose
Uninstall removes installed files, registry values, configuration files, services, firewall rules, and shortcuts. Back up any data or configuration you need before uninstalling.
Set service timeouts
Use these options to set the maximum time the installer waits for a service to reach a state:
-
--service-start-timeout-seconds <seconds>sets the maximum wait for a service to reachRUNNING. -
--service-stop-timeout-seconds <seconds>sets the maximum wait for a service to reachSTOPPED.
Both values must be positive whole numbers.
Export installer state for diagnostics
Use get-state to export diagnostic information about the installed configuration. Sensitive values are redacted in the output file.
& $installer get-state `
--install-dir $installDir `
--output-folder "C:\Temp\LeapworkDiagnostics"
The command creates leapwork-state.json in the output folder. Review the file before sharing it with Support.
Troubleshooting
If an operation fails:
-
Review the command output and the log file specified with
--log-file. -
Confirm that the
.exeand.zipfiles have the same version. -
Confirm that PowerShell is running as an administrator.
-
For update, repair, and uninstall, confirm that
--install-dirpoints to the intended installation. -
For a force-silent Enterprise Controller, include
--force-silent-enterprise-installfor update and repair. Do not use it with a normally licensed Controller.