[wix-users] Show a message when no features are selected

Rob Hamflett robworksn at outlook.com
Thu Nov 19 01:36:09 PST 2015


Hi,

I'm currently doing the same thing and the following seems to be working 
for me.

I have some preprocessor properties defined like this:
<?define Feature1SelectedOrAlreadyInstalled = (&Feature1=3 OR 
(!Feature1=3 AND NOT &Feature1=2))?>
<?define Feature2SelectedOrAlreadyInstalled = (&Feature2=3 OR 
(!Feature2=3 AND NOT &Feature2=2))?>
<?define Feature3SelectedOrAlreadyInstalled = (&Feature3=3 OR 
(!Feature3=3 AND NOT &Feature3=2))?>
<?define FeatureSelected = ($(var.Feature1SelectedOrAlreadyInstalled) OR 
$(var.Feature2SelectedOrAlreadyInstalled) OR 
$(var.Feature3SelectedOrAlreadyInstalled))?>

In the above, "Feature1", "Feature2" and "Feature3" are the values from 
the Feature at Id entries.
The condition for each feature is:
"feature selected for installation" OR ("feature is already installed" 
AND NOT "feature is going to be removed")

I then have the following elements as children of the SelectionTree 
control and the "reset" PushButton control:
<Publish Property="FEATURE_SELECTED" Value="1" Order="1">
   <![CDATA[$(var.FeatureSelected)]]>
</Publish>
<Publish Property="FEATURE_SELECTED" Value="0" Order="2">
   <![CDATA[NOT $(var.FeatureSelected)]]>
</Publish>

Finally, the "next" button opens the next dialog if 
FEATURE_SELECTED="0", or a warning dialog if FEATURE_SELECTED="1".

I hope this was useful,
Rob

On 18/11/2015 15:16, Kaveesh Dashora wrote:
> Hi,
>
> I have created a msi using wix 3.9. There are two features in the MSI... In
> the current implementation, the installation succeeds even if there are no
> features selected... Is there a way through which I can show a message when
> no features are selected. The install button should only work when there is
> atleast one feature selected.
>
> Regards,
> Kaveesh
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list