[Incident]: Some users report they are unable to access the case portal. Please see this community notice for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Authoring a Silent Installation

Authoring a Silent Installation

Summary

A silent installation runs on its own, without any end-user interaction. This article steps through how to author a silent installation for InstallScript and InstallScript MSI projects

Synopsis

A silent installation runs on its own, without any end-user interaction. There is no need for a user to monitor the installation and provide input via dialog boxes.

You can launch a silent installation with the Setup.exe -s command line parameter. To comply with Windows Logo requirements, a silent installation must generate a response file in which the default installation options are selected.

You can run your setup with the Setup.exe -r parameter to select setup options and automatically record the Response File, or you can generate your own from scratch.

To view a real world example of a response file, refer to the Setup.iss file located on InstallShield installation's Disk1. In addition, a description of the response file format is provided in the section of this article on generating the response file.


Discussion

Follow these steps to author a silent installation:

1. Authoring the Setup

Author the setup program in a typical manner. Compile and test the script in the normal (non-silent) manner.

You can easily modify your setup script logic to include flow control based on whether or not InstallShield Silent is running. InstallShield provides a system variable called MODE which contains the installation's current mode.

See the InstallShield help topic MODE .

Note: All InstallShield built-in and Sd dialogs automatically handle the values stored in the InstallShield Silent Response File (.iss file). If you are authoring custom dialogs, you will need to call SilentReadData to handle the dialog box's return values in silent mode.

2. Generating the response file

A normal (non-silent) installation receives the necessary input from the user in the form of responses to dialog boxes. However, since a silent installation does not prompt the user for input, a silent install must get its user input from a InstallShield Silent Response File (.iss file).

A response file contains the responses to dialog boxes as if it were running non-silently. InstallShield Silent reads the response file at run time in order to know how to proceed with a given dialog..

The format of response files resembles that of an .ini file, but response files have .iss extensions. A response file is a plain text file consisting of sections containing data entries.

There are two ways in which you can generate an InstallShield Silent Response File: you can run the setup and have InstallShield record and generate the response file for you, or you can write the response file from scratch.

See InstallShield help topic Creating the Response File.

Follow these steps to author the response file:

  1. Make a text file named Setup.iss using any text editor.
  2. Enter the silent header into Setup.iss.

    See InstallShield help topic Response File Silent Header

  3. Enter the application header into Setup.iss.

See InstallShield help topic Response File Application Header.

4. Enter the dialog sequence into Setup.iss.

See InstallShield help topic Response File Dialog Sequence.

5. Enter the dialog data into Setup.iss.

See InstallShield help topic Response File Dialog Data.

6. Save and close Setup.iss.

See InstallShield help topic Sample Response File.

3. Play back the silent installation

After you have authored the installation and the response file, you are ready to run the installation in silent mode using InstallShield Silent. When running an installation in silent mode, be aware that no messages are displayed. Instead, a log file named Setup.log captures installation information, including whether the installation was successful. You can review the log file and determine the result of the installation.

To launch InstallShield Silent, run Setup.exe with the -s option.

InstallShield also provides the -f1 and -f2 switches so you can specify the name and location of the response file and the location of the log file. See the examples under Setup usage examples.

To verify if a silent installation succeeded, look at the ResultCode value in the [ResponseResult] section of Setup.log. InstallShield writes an appropriate return value after the ResultCode keyname.

4. Using the Setup.log to Check for Errors

Setup.log is the default name for the silent installation log file, and its default location is Disk1 (in the same folder as Setup.ins). You can specify a different name and location for Setup.log using the -f1 and -f2 switches with Setup.exe.

The Setup.log file contains three sections. The first section, [InstallShield Silent], identifies the version of InstallShield Silent used in the silent installation. It also identifies the file as a log file.

The second section, [Application], identifies the installed application's name and version, and the company name.

The third section, [ResponseResult], contains the result code indicating whether or not the silent installation succeeded. An integer value is assigned to the ResultCode keyname in the [ResponseResult] section. InstallShield places one of the following return values after the ResultCode keyname:

0 Success.
-1 General error.
-2 Invalid mode.
-3 Required data not found in the Setup.iss file.
-4 Not enough memory available.
-5 File does not exist.
-6 Cannot write to the response file.
-7 Unable to write to the log file.
-8 Invalid path to the InstallShield Silent response file.
-9 Not a valid list type (string or number).
-10 Data type is invalid.
-11 Unknown error during setup.
-12 Dialogs are out of order.
-51 Cannot create the specified folder.
-52 Cannot access the specified file or folder.
-53 Invalid option selected.


Additional Information

Basic MSI projects neither generate nor read response files. To launch a Basic MSI setup silently, please refer to the article entitled Perform Silent Install for a Basic MSI
For the most up-to-date installation technology, users should consider upgrading to the latest version of InstallShield.
Was this article helpful? Yes No
0% helpful (0/1)
Comments

You mention the -f1 and -f2 flags, but give no further information. "see examples under setup usage examples" is no help if you don't link to the examples.

Version history
Last update:
‎Jul 13, 2018 10:08 PM
Updated by: