How do I add files that preinstall to an installation in an .EXE wrapper?
Successful installation deployment often depends upon preinstalling files or executing support programs before the main .MSI executes. Some commonly pre-installed applications are
- .NET Framework runtimes
- Windows Installer runtimes
In the past, pre-installation required a WiseScript .EXE wrapper or other solution to ensure that the destination computer has the necessary files to run the installation or application. However, with Wise for Windows Installer 6.0, you can quickly create an installation that pre-installs required files with the Prerequisites page. This page provides support for several pre-configured pre-install options and lets you add your own requirements.
Note: You must select an .EXE option from the Build Options page to enable the Prerequisites page.
To add a runtime to an installation:
- Open Wise for Windows Installer and click the Installation Expert tab.
- Click the Build Options link in the Release Definition group.
- From .EXE Options, select an .EXE option.
- Click the Prerequisites link in the Release Definition group.
- To require a specific runtime for the installation, select the runtimes to be pre-installed.
- Normally the pre-installation of a Windows Installer runtime requires a reboot. To delay the reboot until after the complete installation runs, mark Delay Windows Installer runtime reboot until after product installation.
If you have selected to pre-install a Windows Installer runtime, the files included in your installation depend on the operating system of the destination computer.
Runtime for Windows version File included in installation
- 9X InstMsi.exe
- NT InstMsiW.exe
- 2000/XP/2003 (runtime earlier than 3.0) InstMsiW.exe
- 2000/XP/2003 (runtime 3.0 or later) InstMsi3.exe
If you have selected to pre-install Microsoft's .NET framework runtime, dotnetfx.exe is added to the installation.
To add prerequisite files to an installation:
- On the Prerequisites page in Installation Expert, click Add on the bottom half of the page and choose Prerequisite. The Prerequisite Details dialog appears.
- Complete the information as follows:
- File Path: Enter the path to the program you want to run.
- Command Line: Specify command line options to apply to the prerequisite file at runtime.
- To add launch conditions for the prerequisite, click Add Launch Conditions. The Prerequisite Launch Conditions dialog appears.
- Use the drop-down lists to specify operating system, display, and security rights launch conditions. Click Add to add the condition.
Note: If your prerequisite file is an .msi, you cannot add launch conditions. However, any launch conditions in that .msi appear in the Prerequisite Launch Conditions dialog.
- Click OK.
- To abort the installation if the destination computer does not meet the prerequisites launch conditions, mark If the prerequisite's launch conditions fail, stop the .MSI installation.
- Click OK.
- The prerequisites appear in installation order on the Prerequisites page. By default, .msi launch conditions are checked after the installation of any runtimes but before any additional prerequisite programs execute. If the launch conditions in your installation depend upon the execution of the prerequisite programs, mark Don't check the launch condition of the MSI installation until after running the prerequisites.
Each prerequisite file adds scripting code to the WiseScript that creates the installation .exe. To enhance the functionality of the prerequisite program, edit the script.
Some prerequisites may be a dual process install. One example of this is MSDE. If you are attempting to install MSDE as a prerequisite, and have additional prerequisites, your installation may attempt to install the second prerequisite without MSDE finishing.
If this is the case you will need to edit the script, and a Pause Action, (keep in mind the Pause Action is in milliseconds 1000 milliseconds = 1 second), just after the Execute Program action that installs MSDE or your other prerequisites. The pause may need to vary depending on the system you are installing on.
Note: Once you make changes to the WiseScript, you cannot add any other prerequisites. Click Reset Script to remove customizations and add more prerequisites.
Use the Prerequisites page to specify and configure programs that must execute before your main installation .msi. Adding prerequisites helps ensure your program installs and runs successfully.