The following five steps are used to generate a silent installation of MicroStation TriForma . These instructions were developed for an InstallShield 6 installer used by Version 08.05.01.xx of MicroStation TriForma.
In the case of MicroStation TriForma versions lower than 08.05.01.xx, the generated *.iss file will generate an internal error and is therefore unusable. You may be able to remove the error after Step 2 below, by changing the following lines for the AskPath dialog from:
szText=[path value]
Result=1
to:
szPath=[path value]
Result=1
Note that for every new release for which you wish to use a silent installation, you must develop a new silent install. The response file (.iss) is specific to each release of the product.
Steps for Developing a Silent Installation
- Confirm that the correct environment is present.
It is assumed that you wish to use the silent installs to install the product to a machine where it is not already present. Also, it is assumed that there is only one version of the required base product on the machine(s) you are installing to. So for generating a silent install of MicroStation TriForma, then the environment should have:
- No existing installation of MicroStation TriForma.
- Just one installation of MicroStation of sufficient version.
- Develop a silent response file (.iss)
From the command line, run the setup.exe with the parameter "-r" or "/r", to begin a normal UI install. During the install, make those installation choices that you will want the silent installation to perform. At the conclusion of the installation, the file setup.iss will be generated in the %windir% directory, typically: c:\windows\setup.iss
- Remove the previous installation
You must first uninstall the product which you just installed to generate the .iss file. In the case of MicroStation TriForma, you will also need to remove the following file/folders which are not necessarily removed by an uninstall.
- Any MicroStation TriForma-specific pcf file(s) and project(s) folders in Bentley\Workspace\Projects\Examples
- Any product-specific dataset folders in Bentley\Workspace\TriForma\
- The folder Bentley\Program\TriForma\
To confirm that you have completely removed all traces of the previous installation, you should run a normal UI installation, and stop after you accept the License Agreement. If the next window after the License Agreement states "TriForma project files present" and offers Remove and Backup options, then there are still parts of your previous installation present. Cancel your install and remove those parts, repeating the process until the "project files present" window no longer appears.
- Test the silent response file (.iss)
After confirming that you have completely uninstalled the product, then perform a silent installation using the .iss file you generated. From the command line, run the setup.exe with the two parameters: "-s" and "-f1<path to setup.iss>"
For example, if you left the setup.iss at the location it was generated at, then the command line would be: "setup.exe -s -f1c:\windows\setup.iss" No installation window will appear during the silent installation, although you may notice signals of the silent installation such as a busy cursor.
- Verify the result of the silent installation
To determine whether the silent installation completed successfully, open the log file generated in the %windir% directory, typically c:\windows\setup.log. A successful silent installation will generate the following section in the log file:
[ResponseResult]
ResultCode=0
and of course you should have a correctly-installed product.
Troubleshooting
The most typical failure is:
[ResponseResult]
ResultCode=-3
In this case, the silent installation probably discovered dialogs which were not listed in the setup.iss file. For example, if you correctly developed an .iss file for an environment without the product being present, but ran that .iss in an environment in which the product was in fact not completely uninstalled, then a "...project files present" dialog would be called. Because this dialog would not have been registered in the setup.iss file, the install would fail with the above -3 error.
Result Codes
| Result Code |
Result Code Values |
| -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 |
Dialog boxes are out of order |
| -51 |
Cannot create the specified folder |
| -52 |
Cannot access the specified file or folder |
| -53 |
Invalid option selected |