cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
enanrum
Level 9

using property in Conditioin question.

Using Basic MSI:

I have 2 products that get delivered separately, say MainProduct and ProductB.

When the MainProduct is installed I set a registryKey of its install location.

When a user installs ProductB - I use a "System Search" and set it to a Property MPPATH.

For ProductB I use a setProperty Custom Action to set the INSTALLDIR = MPPATH with the condition being MPPATH (which will be null if the reg key does not exist)

I also use a setProperty to set a property MPINSTALLED using the same MPPATH - this property I use in the conditions for the features that can only be installed when the MainProduct is installed.
FeatureA
Level; Condition
0; NOT MPINSTALLED
1; MPINSTALLED

This all works fine: my problem is when the user changes the destination how do I unset the MPINSTALLED so the conditions for the features are still valid. Will setting MPINSTALLED=0 make this condition true: 'NOT MPINSTALLED'

Sorry so long - thanks,
Tom
Labels (1)
0 Kudos
(3) Replies
TsungH
Level 12

You will have to unset the property, i.e., by setting it to NULL. Setting the property to 0 does not unset the property.
0 Kudos
enanrum
Level 9

Thanks Tsung I was doing that but realized that it was not taking place becuase it was after CostFinalize. So after adding a DoAction CostFinalize in the Next Button - it worked! Not sure if that is the right way to go about it since this is not documented!

Thanks,
Tom
0 Kudos
TsungH
Level 12

CostFinalize action queries the Condition table to determine which features are scheduled to be installed. I have never tried running it the second time in UI Sequence, not sure of its unintended side effects.

Typically, one can fiddle with feature's install level, and evoke SetInstallLevel ControlEvent conditionally to control selected features for installation. AddLocal ControlEvent does something similar, but not as flexible.
0 Kudos