cbooth
Posts: 14
Joined: Tue Jan 04, 2011 9:37 pm

Prereq install based on other prereq result

Hello,

I've got a rather complicated situation that I am trying to figure out how to accomplish. Hopefully, I can explain this properly.

* I have a feature-based prereq for MSSQL 2012 to upgrade existing MSSQL 2005 instances if they are detected (using registry entries in the prereq Install Conditions tab)

* I have another feature-based prereq for MSSQL 2012 to install on new machines (if MSSQL does not exist OR our MSSQL instance is not installed, again using the prereq Install Conditions)

These are separate prereqs because the command lines need to be different for install and upgrade.

These each work individually just fine. However, if I include both prereqs and run the install on a machine that already has our instance of MSSQL 2005 installed, both prereqs execute when only the Upgrade prereq should run. I thought that the install prereq wouldn't execute because the condition on that one checks to see if the MSSQL 2012 registry entry exists, which it should after the Upgrade prereq runs.

My guess is that the Install Conditions are checked and set before ANY of the prereqs are executed, so both get scheduled to run. Is this the case? If so, how can I condition the Install prereq to check its conditions AFTER the upgrade prereq executes?

Thanks!
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prereq install based on other prereq result

Hi,
My guess is that the Install Conditions are checked and set before ANY of the prereqs are executed, so both get scheduled to run. Is this the case? If so, how can I condition the Install prereq to check its conditions AFTER the upgrade prereq executes?
Indeed, the install conditions are checked and set before the installation of any prerequisite and I'm afraid that we don't have support for installing a prerequisite based on another prerequisite.

However, you can change the install conditions for the install prerequisite, so that, it will be installed only if none of the "MSSQL" versions are installed on the machine (if "MSSQL 2005" is detected, it means that the upgrade prerequisite will be installed, so the install prerequisite should not run anymore).

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”