View Full Version : Abort prereq install if system conditions not met?

02-13-2006, 03:20 PM
We'd like to check for the presence of certain things on the system that we aren't providing--our users can get these components, but we're not going to provide them in our distribution.

We have a several prerequisites that we do supply, so our installation begins with the installation of several prerequisites.

If I put a condition check on our MSI, the effect on the user is that they watch (and watch...) while several prerequisites are installed, and then the installation fails because these other things we don't supply are missing.

This is ugly. We'd like to have the installation fail up front, i.e. the user tries the installation and the first thing that happens is that we tell them about these other components and how to get them. In other words, I want a sort of launch condition that is applied when the prerequisites start, rather than after the prerequisites when our MSI starts.

I can't think of a way to do this. I have considered making a sort of null prerequisite and hooking the launch conditions on it. But then IS will present the dialog saying "It looks like installation of the prerequisite failed. Do you want to continue the installation?" with Yes and No buttons. I just want the top level SETUP.EXE to exit.

As a result of an earlier question, I know that the InstallShield 11 SETUP.EXE actually does exit if the prerequisite is a bare .MSI file and the exit code from msiexec is 1602, which means the user cancelled the installation. But again I don't want the user to hit cancel, I want it to fail without user interaction after giving a message if certain conditions aren't met.

Can anybody think of a way to do this, short of building my own bootstrapper?