Running Connect installer in Silent Mode

Updating from Connect versions predating 2019.1

In order to update PlanetPress Connect to 2021.2 from Connect versions prior to 2019.1 it is first necessary to update the Connect License.
For details on how to upgrade the Connect License see Users of Connect prior to 2019.1

Required and optional properties

PlanetPress Connect can be installed in a so called "silent mode" to allow an automated setup during a company wide roll-out or comparable situations. The trigger for the Connect Installer to run in silent mode is a text file with the fixed name install.properties, which is located either in the same folder as the PlanetPress_Connect_Setup_x86_64.exe or in the unpacked folder of the installer.exe.

Only the installation can be run silently. Silent Mode does not apply to uninstalling, modifying, or updating Connect. Any previous version of Connect must be uninstalled before using the Silent Installer (see: Uninstalling).

The required properties file has the following attributes:

  • Comment Lines, starting with # (e.g. # The options to configure an external database)
  • Key = Value pairs (e.g. install.product.0 = Connect Designer)

For supported keys, please refer to the next paragraph.

The install.properties file notation must follow commons configuration rules. Please refer to Properties files for more details.

Required and optional properties

Required properties depend on the specified product. Only fields related to that specified product must be entered. If no product is mentioned, properties must be specified for all valid Connect products.

Here is an example of an install.properties file.

# Verbose logging
logging.verbose = true

# Product selection
install.product.0 = Connect Designer
install.product.1 = Connect Server
# Do NOT install/upgrade the Update Manager
UPDATEMANAGER=0

# Server settings
server.runas.username = Localadmin
server.runas.password = admin

# Database configuration
database.type = mysql
database.host = 192.168.116.10
database.port = 3308
database.username = root
database.password = admin
database.schema = my_ol

Verbose logging (optional)

By default, the Silent Installer will log the same way as the GUI installer. That means logging of error and warnings, and certain information during database configuration. A more verbose logging can be switched on by using logging.verbose = true.

Product selection (optional)

By default, if nothing is entered for the products to be installed (install.product), Silent Installer will install all products which are visible to the user for the respective brand.

PlanetPress defaults
install.product.0 = Connect Designer
install.product.1 = Connect Server
install.product.2 = MySQL

The values of install.product properties must contain the exact product names.

Omit the Update Manager from installation (optional)

When specified, this switch instructs the installer not to install the Update Manager.
If it is not specified, or if it has any value other than 0, then it gets installed as usual.

UPDATEMANAGER=0

This entry is case sensitive and must be entered entirely in capitals, as seen here: UPDATEMANAGER

Installation folder (optional)

To select an installation folder other than the default during a silent installation:

install.directory=C:/Program Files/Preferred/Directory

This file is a Java properties file. You must use either use forward slashes as shown above, or double backslashes. Using only a single backslash will result in failed installations.

If the property is not set, the default path will be used.

Server configuration (required if Server is selected for install)

For Server, the following properties need to be provided:

server.runas.username = <username>
server.runas.password = <password>

Server Extension configuration (required if Server Extension is selected for install)

For Server Extension, the following properties need to be provided:

server.runas.username = <username>
server.runas.password = <password>
server.master.host = <IP or name>
server.master.port = <port>
server.master.authenticate = true or false
server.master.username = <username for the Connect Server>
server.master.password = <password>

Database configuration

Case 1: MySQL is among the selected Connect products to be installed (new MySQL installation)

If MySQL is selected and there is no previous MySQL configuration on the machine, the following properties should be defined:

database.password = <password> (required and must meet the rules)
database.port = <port> (3306 is the default port value)
database.unlocked = true or false (the default value is false, optional)

The unlocked option should only be used when the database requires an external access.

If the Silent Installer runs with the default product selection, MySQL is included, and hence the database.unlocked = true property may be optionally set if MySQL on this machine is intended to serve as the central database also for remote machines.

If the Silent Installer runs with the explicit installation of a stand-alone (install.product.0 = Connect Server), the database.unlocked property is irrelevant.

The port will be defined automatically for the MySQL installation. All connect products selected in the Silent Installer will automatically be configured to use the MySQL running under the port defined by the database.port property, regardless of the default port 3306 or any other user defined port.

A different port is required if 3306 is already taken on that machine by another application.

Case 2: The Connect Server is selected and MySQL is not selected

In this case, an external database must be configured for the Server (and other Connect products included in the Silent installation) to be used.

2a: Configuring an external MySQL database

To configure an external MySQL database, the following properties should be defined:

database.type = mysql (required)
database.host = <host> (default value is localhost, otherwise required)
database.port = <port> (default value is 3306, otherwise required)
database.username = <username> (default value is root, otherwise required)
database.password = <password> (required)
database.schema = <schema name> (default value is objectiflune, optional)
database.usessl = true/false (select whether to deploy using a secure database connection (SSL)or not)
2b: Configuring an external Microsoft SQL Server database

Since PlanetPress Connect version 1.6 the minimum required version of the MS SQL Server is SQL Server 2012.

To configure an external Microsoft SQL Server database, the following properties should be defined:

database.type = Microsoft SQL Server (required)
database.host = <host> (default value is localhost, otherwise required)
database.port = <port> (default value is 1433, otherwise required)
database.username = <username> (default value is sa, otherwise required)
database.password = <password> (required)
database.schema = <schema name> (default value is objectiflune, optional)
database.usessl = true/false (select whether to deploy using a secure database connection (SSL)or not)

As of PlanetPress Connect 2020.2 the silent installer no longer requires a valid connection to a database in order to complete. This allows a system administrator to adjust the database connection post-installation, rather than at installation time.
The installation log records whether the installer tested the database connection or not, allowing verification post-installation.

Repository selection

The Connect installation process requires a repository from which the installer copies (locally) or downloads (online installation) all selected Connect products.

In Silent Installer mode, the installation process looks for the property product.repository in the install.properties file and then proceeds with the following steps:

  1. If the property exists, and its value contains an existing file location with a repository, the installer will attempt to install from that repository.

  2. If the property exists, and its value starts with http://, the installer will attempt to install from that location. It will fail if no repository can be found at this location.

  3. If none of the conditions mentioned in the previous steps are met, the installer will look next for a local "repository" folder (located in the same folder as the running Installer (Setup) executable file). If a repository is found, the installer will attempt to install from that repository.

  4. As a last resort, the installer will attempt to install from the default Connect Update Site URL.

Examples
product.repository = http://192.168.79.73/Connect/Version_01/repository
product.repository = C:\\iso\\2.0.0.39695_unpacked\\repository

Locale definition

It is possible to define the Locale which affects the installation language and installed locale for Connect products by using the following properties in the install.properties file:

user.language
user.country
Locales supported by Connect

The Connect Setup supports a dedicated list of Locales, which is saved in the preinstall.ini file. Each entry consists of a language tag and a country tag, formatted by the pattern:

<language>-<country>

The current list of supported Locales is found below, but it may be enhanced in future releases:

  • en-US (English, US)

  • de-DE (German, Germany)

  • fr-FR (French, France)

  • ja-JP (Japanese, Japan)

  • zh-CN (Chinese, China)

  • zh-HK (Chinese, Hongkong)

  • zh-MO (Chinese, Macau)

  • zh-TW (Chinese, Taiwan)

  • it-IT (Italian, Italy)

  • pt-BR (Portuguese, Brazil)

  • es-419 (Spanish, Latin America)

Locale selection by defining user.language and user.country

If both user.language and user.country are defined in the install.properties file, the combination must match exactly one of the supported locales, otherwise the Installer will exit with an error.

For example, user.language = fr and user.country = CA will cause an error since fr-CA is not in the list of supported Locales.

Locale selection by defining only user.language

If only user.language is defined in the install.properties file, the Installer will attempt to find a Locale in the list which starts with the given language code. The first match is selected for installation. If no match is found, the Installer will exit with an error.

For example:
  • user.language = zh, will result in an installation with the Locale zh-CN

  • user.language = no, will result in an error

Default Locale selection

If neither user.language nor user.country is defined in the install.properties file, the Installer will select a default Locale:

  1. If the System Locale is in the list of supported Locales, it will be selected.

  2. Otherwise, if there is an entry in the list of supported Locales, which matches the System language, it will be selected (e.g. on a fr-CA system, fr-FR is selected).

  3. As last resort, the first Locale in the preinstall.ini is selected (usually that should be en-US).

Getting the exit code of a silent installation

If getting the exit code of a silent installation is desirable, use the following procedure.

  1. Create a new local folder on the machine (or VM) on which Connect shall be installed and copy/extract the contents of the Connect ISO into this folder.

  2. Open a command prompt with Administrator privileges and use the "cd" command to access this local folder.

  3. Run this command to unpack the contents of the Connect Setup executable (as a sample, we use the PReS Connect brand):

    PReS_Connect_Setup_x86_64.exe -nr -gm2 -InstallPath=".\\"
  4. In the local folder, the repository subfolder should now be located next to the preinstall.exe, installer.exe and other Installer files.

  5. Create the install.properties file for silent installation in the local folder.

  6. With a batch file calling preinstall.exe and then querying the %errorlevel%, silent installation can be started and the exit code can be evaluated. See the sample batch file below.

Exit codes

  • 0 = Success

  • 1 = General Error in preinstall (e.g. not supported settings for user.language / user.country, for reason see preinstall_err.log)

  • 2 = Unknown Error in preinstall

  • 10 = General Error in Installer application (for reason see OL_Install_<timestamp>.log)

Sample batch file

@echo off
preinstall.exe

if errorlevel 10 goto err_installer
if errorlevel 2 goto err_unknown
if errorlevel 1 goto err_preinstall

echo Success
goto:eof

:err_installer
echo "Installer error - see OL_Install_<timestamp>.log"
goto:eof

:err_unknown
echo "Unknown preinstall error - see preinstall_err.log"
goto:eof

:err_preinstall
echo "Preinstall error - see preinstall_err.log"
goto:eof