How to Run the Installer Unattended

Description

The Universal Installer can be run without a UI when an automated installation is needed.

Discussion

The Universal Installer can be run in unattended mode with a JSON configuration file containing the options that would normally be set in the Universal Installer UI.

This can be useful if an automated process is used to deploy a new server or update one or more servers.

Create a text file for the unattended JSON configuration.

The Universal Installer will use the options in the JSON configuration file in place of the prompts in the UI when running in unattended mode. The content of the file is as follows:

Example unattended JSON configuration
{
	"mode": "install",
	"productName": "Developer Edition",
	"installationFolder": "c:\\TestDE_8485",
	"buildType": "nightly",
	"version": "8485",
	"shutdownRestartRunningProcesses": false,
	"killProcessesNotRespondingToShutdown": false,
	"retryCountOnFileDownloadError": 5,
	"overwrite": true
}

The possible values for each option are:

Option

Description

Values

mode

The operation the Universal Installer is to perform.

  • install
  • update
  • reinstall
  • uninstall

productName

The name of the product on which the Universal Installer operation is to be performed.

  • Developer Edition
  • Application Server for IIS
  • Application Server
  • Runtime

installationFolder

The location for or of the product on which the Universal Installer operation is to be performed.

buildType

The type of build for the product on which the Universal Installer operation is to be performed.

  • nightly
  • preview
  • stable

version

The version/build number of the product on which the Universal Installer operation is to be performed.

shutdownRestartRunningProcesses

The Universal Installer checks if there are any running processes from the installationFolder. If any processes are found to be running from the installationFolder, the Universal Installer will ask to stop and restart them. This option is the answer to whether processes are stopped and restarted.

true or false. Default is false.

killProcessesNotRespondingToShutdown

When a process is being shutdown due to having been found running from the installationFolder, it may not respond to the shutdown request. In that case, the process can be killed if this option is set to true. The process will be restarted as part of the normal operation of the shutdownRestartRunningProcesses option.

true or false. Default is false.

retryCountOnFileDownloadError

If an error occurs during a file download, the Universal Installer can retry downloading the file. The Universal Installer will wait 5 seconds between each retry.

A value between 0 and 60 inclusive. The default value is 5 if this option is not included in the JSON configuration file.

overwrite

If the mode option is set to "install" and the Universal Installer list of installed products already includes a product installed in installationFolder, this option set to true will allow the "install" to overwrite the existing install.

true or false. Defaults to false.

How to run the Universal Installer in unattended mode.

The Universal Installer can be run in unattended mode by using the /unattended command line switch specifying an unattended configuration file. /unattended="C:\temp\unattended.json"

The Universal Installer will output log messages to the console as well as writing the log messages to the log file. If you do not want log messages written to the console use the /silent command line switch.

An offline installer package can also be used in unattended mode by including the /OfflinePackage switch as you would without the /unattended switch.

The following are example command lines
InstallAlphaAnywhere /unattended="C:\temp\unattended.json"
			
InstallAlphaAnywhere /unattended="C:\temp\unattended.json" /silent

InstallAlphaAnywhere /unattended="C:\temp\unattended.json" /OfflinePackage="C:\packages\AlphaAnywhereDE_8029.zip"

Universal Installer unattened mode exit codes

Code

Description

0

Success

1

An unattended install configuration JSON file was not specified with the /unattended command line parameter.

2

The unattended install configuration JSON file was not found.

3

The unattended install configuration JSON file is empty.

13

The installer operation failed.

23

The installer operation was partialy successful. A reboot is required to complete the installer operation.

33

The installer operation was canceled.

53

There was a problem running the installer in offline mode.

73

No installer steps were defined. No operations were performed.

99

The unattended install configuration JSON was in error.

999

An unhandled exception occured running the installer.

It is best to run the Universal Installer in unattended mode from a batch file in order to handle exit codes for the result of the installer operation.

Example batch file for running in unattended mode.
InstallAlphaAnywhere /unattended="C:\temp\unattended.json"
if %errorlevel% EQU 999 (
	echo An unhandled exception occured running the installer.
) else if %errorlevel% EQU 99 (
	echo The unattended install configuration JSON was in error.
) else if %errorlevel% EQU 73 (
	echo No installer steps were defined. No operations were performed.
) else if %errorlevel% EQU 53 (
	echo There was a problem running the installer in offline mode.
) else if %errorlevel% EQU 33 (
	echo The installer operation was canceled.
) else if %errorlevel% EQU 23 (
	echo The installer operation was partialy successful. A reboot is required to complete the installer operation.
) else if %errorlevel% EQU 13 (
	echo The installer operation failed.
) else if %errorlevel% EQU 3 (
	echo The unattended install configuration JSON file is empty.
) else if %errorlevel% EQU 2 (
	echo The unattended install configuration JSON file was not found.
) else if %errorlevel% EQU 1 (
	echo An unattended install configuration JSON file was not specified with the /unattended command line parameter.
) else if %errorlevel% EQU 0 (
	echo Success
) else (
	echo Unknown exit code %errorlevel%
)