MSI Application Packaging

Monday, January 24, 2005

Conditionally Installing a Feature

Well it is Monday so I thought it best to easu back into the week with a nice easy blog :o)
The INSTALLLEVEL is a Property that can be used to define which Feature are to be installed. The default level for INSTALLLEVEL is 1, this in my experience is best changed to something much higher - you can go up to 32,767 but 100 will be fine.
Now any Feature which has an INSTALLLEVEL of less than 100 will by default be installed, that is assuming you are installing silently in a managed deployment environment which I believe 99% of the time most installations are.
To conditionally install a feature in Installshield, set the application INSTALLLEVEL to 100.
Now choose a feature you wish to conditionally install and set its Install Level to 50
Now click the elipses on the Condition row for the feature to start the Feature Condition Builder. Set the level to 200 and create your condition, for example Not AdminUser. This way when Windows Installer is running its Install actions, it will reach this Feature, see that in the first instance the Install Level is less than the Application INSTALLLEVEL but then notice that there is a condition on the feature. After the condition has been run (assuming that the user installing it is not an AdminUser) the INSTALLLEVEL will have become 200 and Windows Installer will then ignore it for installation.

1 Comments:

  • Thank you SO much, that was a very useful and easy to understand post, at least for someone like me, that has a developer background.

    It solved my problem, and now I finally understand INSTALLLEVEL.

    By Anonymous Kim Bach, at 8:23 am  

Post a Comment

<< Home