STUB MSI
STUB MSI can be used to uninstall the previous version and install the new version. This involves nested installation of package. A nested installation is a type of Custom Action that installs or removes another .msi package (sometimes called the child MSI) within a running installation (called the parent MSI).
Properties of Nested Installs
- Nested installations do not display a user interface.
- A child product generally does not appear in the user's Add/Remove Programs panel, and is not automatically uninstalled when the parent product is uninstalled.
To use the STUB MSI concept for upgrade we need to configure the Parent MSI in a defined way. STUB MSI uses the Nested install concept to perform the uninstall and install of packages. You must know the product code of all previous versions to support uninstall.
Configuring STUB MSI
In MSI Script section, configure the following:
In ExecuteDeffered Tab of MSI Script section, comment the following Standard Action:
- RegisterUser
- RegisterProduct
- PublishComponents
- MSIPublishAssemblies
- PublishFeatures
- PublishProduct
In User interface Tab of MSI Script section configure the following:
1. Uninstalling all Previous Versions
- Click the MSI Script tab and then click the User Interface tab.
- Scroll down to the ExecuteAction script line in the Installation Sequence pane. It's the last line in the script.
- Select the blank line below the ExecuteAction action then double-click the Install MSI From Destination action in the Actions pane. The Install MSI from Destination dialog appears.
- Fill in the fields as follows:
- Custom Action Name: Enter a name for this custom action.
- Product Code: Enter the Product Code of previous version
- Property Settings: REMOVE=ALL
- Click OK.
Follow the same process to include all the previous version product code.
- Double-click the If Statement action in the Actions pane. Then If Settings dialog appears.
- Enter Not Installed in the If Condition field, and then click OK.
- Select the blank script line below the new custom action.
- Double-click the End Statement action in the Actions pane.
Processing option should be synchronous- Ignore exit code. Scheduling Options should be configured for Always Execute.
2. Installing New Version
- Click the MSI Script tab, and then click the User Interface tab.
- Select the blank line below the Uninstall Custom action. Then double-click the Execute Program from Destination action in the Actions pane. The Execute Program from Destination dialog appears.
- Fill in the fields as follows:
- Working Directory: SystemFolder
- Exe and Command Line: msiexec /I "[SOURCEDIR][MSINAME]" /QB-!
- Click OK.
- Double-click the If Statement action in the Actions pane. The If Settings dialog appears.
- Enter Not Installed in the If Condition field, and then click OK.
- Select the blank script line below the new custom action.
- Double-click the End Statement action in the Actions pane.
Processing option should be synchronous - Ignore exit code. Scheduling Options should be configured for Always Execute.
Define a property MSINAME with your packageed msi as public property in property section.
Cheers
Deepu

MSI Stubs / Nested msi installations
Hi,
Don't want to be the one that pees on your bonfire, but nested instalaltions are a deffinat no-no.
Have a look at the Windows Installer Best Practices "http://msdn2.microsoft.com/en-us/library/bb204770.aspx"
Cheers
Phil
Not to be encouraged
As Phil syas, DON'T go down this road...
Yes in a corporate
Yes in a corporate environment, we chould no go \ adapt nested Installation as it is very tough to monitor or maintain the child applications .
Upgrade prespective is too tough , even uninstallation is difficult to handle
Wiseuser
Altiris Certified Professional
Would you like to reply?
Login or Register to post your comment.