Tech. Note 7: Console and Silent Installers

Guiffy installers support Console and Silent mode options.

Console Installers

Console mode mimics the default GUI steps provided by InstallAnywhere, and uses standard input and output. The biggest advantage to console mode is that UNIX/Linux users don't need X-windows (X11) to run their installers. Console mode allows for text to be output to the console line-by-line. It does not allow for any formatting, clearing of the screen, or positioning of the cursor.

+---------------------------------------------------------+
| CHOOSE ALIAS, LINK, SHORTCUT FOLDER                     |
|                                                         |
| Where would you like to create application shortcuts?   |
|                                                         |
| 1) In the Start Menu     | | 2) On the Desktop          |
| 3) Don't create shortcuts                               |
|---------------------------------------------------------|
| Please make a selection [1, 2, or 3], and then          |
| press ENTER.                                            |
|---------------------------------------------------------|
To trigger a console installer from the command line, type the following command:
installername -i console

Behavior of Console Launchers

If an installer is bundled with a console launcher, the behavior of the installer varies depending on how the installer was launched. The following table identifies how the console launcher will behave in each situation (Launch Type).
Default Windows
UI Mode
Launch Type Ctrl Key
Pressed
Expected Result
GUI Double-click No There will not be any console sub-window.
GUI Double-click Yes A console sub-window will display.
GUI Console with switch No There will not be any console sub-window.
GUI Console with switch Yes There will not be any console sub-window.
GUI Console without switch No There will not be any console sub-window.
GUI Console without switch Yes There will not be any console sub-window.
Console Double-click No A console window will display.
Console Double-click Yes A console window will display.
Console Console with switch No There will not be any console sub-window.
Console Console with switch Yes There will not be any console sub-window.
Console Console without switch No There will not be any console sub-window.
Console Console without switch Yes There will not be any console sub-window.
Silent Double-click No There will not be any console sub-window.
Silent Double-click Yes A console window will display.
Silent Console with switch No There will not be any console sub-window.
Silent Console with switch Yes There will not be any console sub-window.
Silent Console without switch No There will not be any console sub-window.
Silent Console without switch Yes There will not be any console sub-window.
Note the following regarding the information in this table:

Silent Installers

Silent mode, which enables an installer to run without any user interaction, is fully supported on all UNIX/Linux platforms. A near silent mode is possible on Windows and macOS X. InstallAnywhere and end user-defined variables may be set through command-line parameters or a properties file.

To trigger a silent installer from the command line, type the following command:
installername -i silent

You may also call a properties file from the command line:
installername -f properties file

You can also use response files and silent installers.

About Response Files and Silent Installers

InstallAnywhere's silent UI mode is useful for silently deploying to enterprise desktops. You can specify that you want to run a silent installation by using the -i command-line switch (to set the installer interface mode) with the silent argument, such as:
install.exe -i silent

In silent mode, the installer has no-end user interaction, and runs by using either of the following: A response file contains a record of a specific installation session. The installer creates the file when the installation is complete, storing the values of the applicable properties in the file.

Generating a Response File

You can choose to generate a response file by using the -r commandline switch.
Important: A response file must be saved with the appropriate encoding.

For Windows-based target systems, the response file must be saved in one of the following encodings: UTF-8 without a BOM or UTF-16 little endian

For Unix/Linux and MacOS X target systems, the response file must be UTF-8 without a BOM.

If an unsupported encoding is used, the installer is unable to read the file properly.

Specifying the Response File to Use

When performing a silent installation, the installer automatically checks the directory in which it resides for a file named installer.properties or [installername].properties. If you want to use a response file that has a different name or is in a different location, you can use the -f command-line switch to set the name and location of a response file for the installer to use, such as:
myinstall.exe -f c:\tmp\installer.properties

Contents of a Response File

Response files use a simple key=value format. For example, if a console installer that you have previously built has effectively one real option, the installation directory, the properties file might look like this:
INSTALLER_UI=silent
USER_INSTALL_DIR=C\:\\Program Files\\OfficeSuite\\

INSTALLER_UI lets you specify the installer mode in the properties file, negating the need to use the -i silent commandline switch.

Documentation by Guiffy Software, Inc. 2019