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 entitled 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 the InstallShield help topic Creating the Response File.
To author the response file, follow these steps:
- Make a text file named Setup.iss using any text editor.
- Enter the silent header into Setup.iss.
See the InstallShield help topic Response File Silent Header. - Enter the application header into Setup.iss.
See InstallShield help topic Response File Application Header. - Enter the dialog sequence into Setup.iss.
See the InstallShield help topic Response File Dialog Sequence. - Enter the dialog data into Setup.iss.
See the InstallShield help topic Response File Dialog Data. - Save and close Setup.iss.
See the 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:
| Return Value | Description |
|---|---|
| 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, 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.
Related Articles
Successfully Authoring a Patch 3Number of Views ISDEV : warning -6487: If You Intend to Distribute this Upgrade as a Patch, You Should Author the 'Patch Optimization' Set… 4Number of Views Oracle Inventory Patch for "No Oracle instance was successfully inventoried on host xxx" reported even partial services su… 5Number of Views Generating InstallAnywhere Build Log for Windows and Linux 14Number of Views Warning-7065 Windows Installer 3.1 Engine could not be found, while creating a patch and "Error reading setup initializati… 11Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago