PDA

View Full Version : HOWTO conditionally install feature based on user-select of conflicting feature?



jelion
11-03-2005, 08:18 AM
I am using InstallShield MSI (not InstallScript). My Installer contains a feature A with two subfeatures A1 and A2. Features A and A1 are user-selectable; feature A2 is hidden and must be installed whenever A is selected and A1 is not selected. (Furthermore, A1 and A2 are broken down into 2 further subfeatures, a 32-bit and 64-bit variant, subject to appropriate release flags - these subfeatures contain the actual components for A1 and A2.)

I have not been able to write a condition on A2 or any of its components that cause the A2 components to install if and only if feature A1 is not selected. I have found references to a condition "&A1<3" that supposedly means "if the Install State of Feature A1 is not "Install Feature", but I am not getting the desired behavior; the components are either always installed or never installed regardlless of the user's selections.

It appears to me that the condition is evaluated before the User Dialogs are displayed, so that changes to the selection state of A2 in the Custom 'Select Features' dialog do not cause a re-evaluation of "&A1<3" on A2 when it comes time to actually install the features. (I have tried applying the condition both as a Feature Condition, specifying level '0' as the resulting INSTALLLEVEL, and as a Component Condition.) I gather this comes down to statements I've seen elsewhere, that 'CostFinalize is evaluated before any dialogs are displayed.'

Certainly this must be something do-able in InstallShield. What is the magic to conditionally install A2's components (understanding that they are in subfeatures A2-32 and A2-64) based on whether A2's 'sibling' feature A1 is user-selected (A2 should be installed if A1 is not selected, and A2 should not be installed if A2 is selected)?

Thank you,
John Elion
GDC4S