PDA

View Full Version : Prerequisites Conditions dont work



man@dis.cc
06-12-2012, 07:43 AM
I have a prerequisite for MSMQ and the actual <conditions> tag of the prq file looks like this

<conditions>

<condition Type="2" Comparison="32" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Setup" FileName="msmq_CoreInstalled" ReturnValue="1"></condition>

<condition Type="2" Comparison="32" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Setup" FileName="msmq_MulticastInstalled" ReturnValue="1"></condition>

<condition Type="2" Comparison="32" Path="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSMQ\Setup" FileName="msmq_TriggersInstalled" ReturnValue="1"></condition>

</conditions>

I've been toiling for 5 hours now and getting nothing but incosistent outcomes. I expect the result to be that if either of the registry values

msmq_CoreInstalled
msmq_MulticastInstalled
msmq_TriggersInstalled

have a value diffrent from 1
or are plain missing, the prerequisite is installed. The prerequisite is not a feature prerequisite.
I've been using Regedit.exe to experiement with the registry values.

The outcome has more or less been like coin flips, WHAT am i missing?.

hidenori
06-14-2012, 03:08 PM
InstallShield prerequisites are installed on the target machine if the following are true:


The target machine meets any of the operating system conditions and all of the other conditions that are listed on the Conditions tab.
For feature prerequisites only (that is, an InstallShield prerequisite that is associated with one or more features in the main installation)—The feature that contains the feature prerequisite must be installed. Thus, if the feature has a condition that is not met on the target system, or if the end user chooses not to install the feature, the feature is not installed. As a result, none of its associated feature prerequisites are installed, unless the feature prerequisites are also associated with other features that are installed.

Therefore, your prerequisite runs when all of your registry conditions are true. In order to accomplish your requirements, you might want to consider using a Advanced UI or Suite/Advanced UI project (http://helpnet.flexerasoftware.com/installshield19helplib/Default.htm#StartTopic=helplibrary/SuiteProjects.htm)that offers more flexible package conditions.