Using from Command Line

Qt Installer Framework 4.0.0 introduces a new command line interface workflow. Most of the end user use cases can now be performed using a text based interface, either interactively, or unattended by specifying the desired options beforehand. This topic describes the basic use cases. For more information about the syntax and a description of all supported options, see Command Line Interface.

Installing Components

Both the installer and the maintenance tool support installation of new components from command line. The following will install the components given as an argument and their respective dependencies:

maintenancetool.exe install componentA componentB componentC

If no components are specified, the default set of components will be installed instead. This includes components with elements <Default> or <ForcedInstallation> set to true. The default installation can be only done with an installer binary. The --root option can be used to select an installation target directory:

installer.exe --root "C:\Users\MyUser\MyInstallation" install

Checking for Available Updates

To print information about available component updates, run the check-updates command with the maintenance tool:

maintenancetool.exe check-updates

Updating Components

Running update without arguments will update all components that have an update available. Essential components are always updated first, same way as it is done when launching updater from GUI. To update only a specific subset of installed components, they can be provided as an optional argument for update:

maintenancetool.exe update componentA componentB

Uninstalling Components

The remove command can be used to uninstall selected components. This will automatically uninstall their children and other components depending on the components about to be uninstalled:

// This would also automatically uninstall componentC.subcomponent1, componentC.subcomponent2,...
maintenancetool.exe remove componentC

Listing Installed Components

To get a list and print additional information about currently installed components, run the list command with the maintenance tool:

maintenancetool.exe list

Searching for Available Components

The search command can be used to search components from available repositories, or from integrated binary content in case of an offline installer. It can be used with no arguments to list all available components or with a regular expression to get a list of only components matching the pattern:

installer.exe search "expression"

Performing Full Uninstallation

To uninstall all components and remove the program directory, including maintenance tool, run purge command:

maintenancetool.exe purge

Unattended Usage

By default, the generated installers may ask for additional information during installation, which requires user attention. Unattended usage is possible by providing all information beforehand with appropriate options:

installer.exe --root "C:\MyInstallation" --accept-licenses --default-answer install componentA

In this example, --accept-licenses is used to automatically accept all license agreements required by components to be installed. The --default-answer option is used to answer all message queries with their default answer. Alternatively, --accept-messages and --reject-messages can be used to accept or reject all message queries. To provide unique answers for individual queries, for example to confirm overwriting of an existing directory, you could use --auto-answer OverwriteTargetDirectory=Yes. Automatic answers are shown on the console output and installation log.

© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.