Guidelines for Defining Conditions in an Advanced UI or Suite/Advanced UI Project

InstallShield 2016

Project • This information applies to the following project types:

Advanced UI
Suite/Advanced UI

Edition • The Advanced UI project type is available in the Professional edition of InstallShield. The Suite/Advanced UI project type is available in the Premier edition of InstallShield. For information about the differences between these two project types, see Advanced UI Projects vs. Suite/Advanced UI Projects.

Following are some guidelines on defining conditions in an Advanced UI or Suite/Advanced UI project.

Define an Eligibility Condition for Each .exe Package to Prevent Downgrades

InstallShield automatically handles an empty eligibility condition as a request to ensure that a later version of the package is not already present on target systems. You can augment this, for example with a Platform condition to prevent installation on unsupported platforms, without losing the automatic behavior.

For .exe packages, create an appropriate eligibility condition to ensure that the Advanced UI or Suite/Advanced UI installation does not downgrade your product by allowing an earlier version to install over a later version.

Note that if your product supports side-by-side versions of, for example, version 3 with version 4 on the same system, ensure that your conditions support this. If your product does not support these versions on the same system, ensure that your conditions block this scenario.

Consider Defining an Eligibility Condition for Each Package to Check for Requirements and Dependencies

A package may fail to install or the product may not run as expected on target systems that do not meet its requirements (such as the minimum operating system version) or that do not have its dependencies (such as the .NET Framework, Microsoft SQL Server, or a third-party library). To prevent the Advanced UI or Suite/Advanced UI package from attempting to download (if applicable) and launch packages on a target system on which they will fail, define an eligibility condition that checks for requirements and dependencies. And whenever you have a package that contains one or more launch conditions, ensure that you add corresponding eligibility conditions to the package.

Because .msp packages require their target .msi package to be present, create an eligibility condition that checks target systems for the presence of the product that you want to update.

Review the Default Exit Condition for Relevance

By default, when you create a new Advanced UI or Suite/Advanced UI project, InstallShield automatically creates an exit condition that aborts the Advanced UI or Suite/Advanced UI installation if none of the primary packages are eligible for installation. The exit condition has an Eligible Package type of condition check, and it uses an asterisk (*) in the condition’s package ID setting as a placeholder for each primary package’s ID.

You can indirectly control this default exit condition by modifying the eligibility condition of each package.

The default exit message assumes that your eligibility conditions only prevent downgrades. If any of the primary packages in your project have an eligibility condition that checks for something else, you may need to edit the default message to properly reflect the reason for the Advanced UI or Suite/Advanced UI installation aborting.

For example, if your Advanced UI or Suite/Advanced UI project includes one 64-bit primary package, this package may have an eligibility condition that checks for an x64 architecture. In this case, you may need to edit the exit message and condition to account for the fact that the package is not eligible on a 32-bit target system. However, if your Advanced UI or Suite/Advanced UI package includes one 64-bit primary package and one 32-bit primary package, and you configure the eligibility conditions for these packages so that the appropriate one is launched on target systems that have the corresponding architecture, the default exit message and condition may be suitable as is.

Define a Detection Condition for Each .exe Package

Every .exe package in an Advanced UI or Suite/Advanced UI project must have at least one defined detection condition. The detection condition should evaluate whether the package is already installed on target systems. At build time, InstallShield combines the detection conditions from all of the primary packages in an Advanced UI or Suite/Advanced UI project to form part of the mode conditions of the Advanced UI or Suite/Advanced UI installation.

The Advanced UI or Suite/Advanced UI Setup.exe file can determine whether .msi packages and InstallScript packages in the Advanced UI or Suite/Advanced UI installation have already been installed on target systems. It can also determine whether an .msp package in the Advanced UI or Suite/Advanced UI installation has already been applied to an earlier version of the product. Similarly, it can determine whether a UWP app package (.appx) in the Suite/Advanced UI installation have already been installed on target systems. Therefore, manually defining a detection condition for these three types of packages is not a requirement.

Be Very Explicit

Make sure that you are creating conditions for all of the possible results; that way, you have full control over the appropriate behavior. For example, if you are checking for a specific version of a file or for a particular registry value, make sure to also check for the existence of the file or registry entry. Sometimes a missing file is fine but a given version number of a file is bad; sometimes a missing file is bad.

Test, Test Some More, and Then Test Again

Test your conditions on various target systems and under different scenarios to make sure that the Advanced UI or Suite/Advanced UI installation behaves as expected. Use clean machines, machines that have earlier versions of your products, and machines that have the current version. Also consider building a future version of your product to test that your current installation does not downgrade future versions.

See Also