Response Files

InstallAnywhere 2015

Response files are installer properties files that are generated by capturing the default variable values and user responses from the execution of an installer. The record of these responses can be used to control subsequent installer executions. Typically, response files use the default name installer.properties and provide settings to support an installer running in silent mode. Response files are essentially just text files that can provide settings for an installer.

Generating Response Files

You can choose to generate a response file by selecting an option in the Advanced Designer or by using the -r command-line switch.

Selecting an option in the Advanced Designer—You can specify that a response file is generated each time an installation is run by selecting Yes in the Always Generate Response File setting (Project page > General Settings view > Project Information area).

If you generate a response file by selecting this option, the response file is always named installer.properties or [installername].properties and will be created in the same directory as the installer.

Using the -r command-line switch—You can also generate a response file when running an installation via command line by using the -r command-line switch followed by the path and file name of the response file you want to generate, such as:

install.exe -r "/Users/MyName/myresponse.properties"

If you do not specify the path and file name of the response file, it will be named installer.properties or [installername].properties and will be created in the same directory as the installer.

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
UTF-16 little endian

For Linux-based and OS X–based 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.

Using Response Files

Response files can be used to drive an installer in one of two ways:

Put in same directory as installer—Place a response file named installer.properties in the same directory as the installer, and the installer will attempt to use that file as input to the installer.
Specify using the -f command-line switch—Use the -f command-line switch when you run the installer to specify a response file for the installer to use.

Choose Install Sets Variables

The Choose Install Set panel/console variables are recorded in response files. Here is an example:

#Choose Product Features

#----------------------

CHOSEN_FEATURE_LIST=Application,Help

CHOSEN_INSTALL_FEATURE_LIST=Application,Help

CHOSEN_INSTALL_SET=Typical

Sample Response File

The following is a sample installer.properties file:

# Mon Jul 14 17:45:12 CDT 2010

# Replay feature output

# ---------------------

# This file was built by the Replay feature of InstallAnywhere.

# It contains variables that were set by Panels, Consoles or Custom Code.

 

#Choose Install Folder

#---------------------

USER_INSTALL_DIR=C:\\Program Files\\OfficeSuite

 

#Choose Shortcut Folder

#----------------------

USER_SHORTCUTS=C:\\Program Files\\OfficeSuite\\OfficeSuite

 

#Choose Product Features

#----------------------

CHOSEN_FEATURE_LIST=Application,Help

CHOSEN_INSTALL_FEATURE_LIST=Application,Help

CHOSEN_INSTALL_SET=Typical

 

#Set Eclipse Location

#--------------------

USER_INPUT_RESULT_0=C:\\Eclipse

 

#Install

#--------------------

-fileOverwrite_c\:\\progfile.txt=Yes

Recording User Response to File Overwrite Prompts in Response File

If you set a file’s If the file already exists on the end user’s system option in the Install File customizer of the Install view on the Sequence page to Always prompt user, the overwrite choice that the user makes is recorded in the response file using the -fileOverwrite command.

When the Always prompt user option is selected and a file overwrite situation occurs during installation, the user is then prompted to select one of the following options: Yes, Yes to All, No, or No to All.

The selection that the user makes in response to being prompted for file overwrite behavior is recorded in the response file by the -fileOverwrite command using the following syntax:

-fileOverwrite_<name of file>=value

where value would be one of the following:

YesToAll
Yes
No
NoToAll

For example:

-fileOverwrite_c\:\\abc.txt=Yes

When an application is installed for the first time, the -fileOverwrite command for each file is set to Yes.

See Also