For reasons I don't think I need to go into, I have a program that needs to run following installation that exists in two versions, one (primarily for older Windows OSes) created using V3.0 of .NET, and the other created using V4.5. There are a couple of other conditions, on the basis of which I choose which one to run. If I could use Installer Properties to determine the choice, there would be no problem, but the only conditionals allowed by the Prerequisites dialog which are usable for my purposes depend on information in the Registry that has been specified by the installer. Having jumped backwards through hoops to define conditionals that would do what I wanted when tested manually, I found that the Installer was still trying to run both program versions. When I checked the Registry settings after the completion of the install they were correct, and it took me a lot of head scratching to discover the problem. It appears that although the post-install prerequisites run after installation has completed, the registry conditionals that are used to determine which version is run are loaded and/or evaluated before the installation creates the key which I need to use. Is there any way of running programs selectively after installation based on the values of Installer Properties?
To achieve what you want you can simply condition the feature installation of the related prerequisites. Each of the feature-based and post-install prerequisite items has an associated feature in "Organization" page. When the prerequisite associated feature is not selected for installation the prerequisite item will be skipped.
Thanks, that works! However, it really is dreadfully confusing to have independent conditionals affecting the installation and/or running of a particular component of the installer set in multiple different places, particularly when you have to set conditionals dependent on one type of parameter in one place and conditionals dependent on another in another. In this instance, I think that you should at least have a warning adjacent to the conditions dialog on the relevant Prerequisites tab that their activation is also potentially dependent on conditions specified for them on the Organization page.
Indeed, there is enough room for us to improve our current UX for feature-based and post-install prerequisites. Thank you for your feedback. I'll forward it to our development team and maybe an improvement will be available in the future.
FOLLOW US
Get the latest news in Application Packaging