The type of nested installation action is specified in the Type box of the CustomAction table. Depending on the custom action type, the package for the nested application can reside in "substorage" of the main package, as a file at a location specified by a property, or as an advertised application on the user's computer.
|Custom action type||Description|
|Custom action type 7||Nested installation of a product residing in the installation package.|
|Custom action type 23||Nested installation of an installer package within the current source tree.|
|Custom action type 39||Nested installation of an advertised installer package.|
- Use the Msidb tool (this tool is packaged with the Windows Installer SDK) to add the Nest.msi package as a "substorage" of the Basic.msi file. The command line is: Msidb -d Basic.msi -r Nest.msiThis will add Nest.msi to the Basic.msi file as substorage. No dialog box will appear to confirm that this was successful, but the file size for Basic.msi will increase.
Note You cannot add Nest.msi as substorage by using the Binary table in Orca. When you add a file to an MSI through the Binary table, the file is added as a binary stream, not as substorage. Files added by the Binary table cannot be referenced by the source column of the CustomAction table.
- Use Orca to open Basic.msi. Locate the CustomAction table and type the information for the custom action. If you need to pass any public properties to the nested package, you can use the Target box for this. There will be two custom actions, one for install and one for uninstall (which has a target of "REMOVE=ALL"). The following is an example CustomAction table:
Action Type Source Target InstallNest 7 Nest.msi UnInstallNest 7 Nest.msi REMOVE=ALL
- Schedule the custom action in the InstallExecuteSequence table. There are conditional statements for both the Install and Uninstall actions in the InstallExecuteSequence table. The condition will tie to a component for the Install (>2) and Uninstall (<=2). You could also tie these actions to a feature or another property. The nested installation custom action must be placed before InstallFinalize. If you use a component or a feature as a condition, the custom action must be placed after CostFinalize. The following is an example InstallExecuteSequence that assumes there is a component in Basic.msi named "Comp_1" and conditions the nested installation based on the state of Comp_1):
Action Condition Sequence InstallNest $Comp_1>2 3110 UnInstallNest $Comp_1<=2 3120
- Nested Installations cannot share components.
- An administrative installation cannot contain a nested installation.
- Patching and upgrading will not work with nested installations.
- The installer will not correctly cost a nested installation.
- Integrated ProgressBars cannot be used with nested installations.
- Resources that are to be advertised cannot be installed by the nested installation.
- A package that performs a nested installation of an application should also uninstall the nested application when the parent product is uninstalled.
Article ID: 306439 - Last Review: Jun 19, 2014 - Revision: 1