In my previous article Mode Condition? What the Heck Is a Mode Condition? I described mode conditions, how the Suite engine uses them and how they appear in a Suite project.
Starting with InstallShield 2012 Spring, the format used in the project file (.issuite) for mode conditions has changed for what we now call Suite/Advanced UI projects (in the Premier edition of InstallShield), as well as Advanced UI projects (in the Professional edition of InstallShield). For ease of reading I am going to use the term Suite to refer to both Suite/Advanced UI projects and Advanced UI projects throughout this article. The XML snippet below is what you would see today for a mode condition in a typical Suite project file, as viewed in a text editor:
DetectPrimary is a shorthand way of determining if any of the primary packages from the current project are installed on the target machine. This new syntax makes life easier: if you want to modify the default behavior, you can add to the condition without having to rewrite complex conditions by hand.
We also introduced the concept of SuiteInstalled which takes the following form:
<SuiteInstalled SuiteId="*" Version="*" Compare="NotEqual"/>
The SuiteInstalled condition is a pseudo condition type in that the Suite engine never sees this exact condition at run time. Instead it is translated at build time into one of the standard condition types. All SuiteInstalled elements are replaced with registry compare conditions based on the Uninstall registry key the Suite creates to register itself. So this condition is used to determine if the current Suite has been run, and more importantly, registered on the current target machine. Using this in the mode condition allows us to support a wide range of Suite upgrade scenarios. So if you intend to support Suite upgrades of any description you should ensure that you register on the target machine by setting Show Add or Remove Programs Entry to Yes in the General Information view. Also as the SuiteInstalled condition checks for equality you will also want to increment the Suite version with every release of your application.
At a very high level the default mode condition now indicates that if the Suite has not been run on a machine and none of the primary packages are present, the Suite installation runs as a first-time installation.
For information on additional new functionality in InstallShield, see the What’s New in InstallShield 2012 Spring Webinar.