installer - How do I create a conditional property in WiX? (Almost like an If-Then) -


I have a WiX project that installs some XE files is a 'main' executable and diagnoses other problems. To support the programs are supported.

The main executable is optional, and support programs will run on their own. Often, the end user will establish a third-party program instead of my main executable.

At the end of the WiX installer, I have to keep a 'launch program' checkbox that will run the program as soon as the installer closes.

I can hide the check box based on the INSTALLLEVEL property, but it only changes when the user has selected 'specific' or 'full' installs. I want to hide it if the main executable feature is installed or not.

Something like this would be:

  & lt; Feature ID = 'Mainprogram' title = 'Mainexe' description = 'This application shows and displays information from our hardware.' Configurable Directory = 'Installed' Level = '4' Allow = 'No' & gt; & Lt; ComponentRef ID = 'Main Executable' / & gt; & Lt; ComponentRef Id = 'SQLLibrary' / & gt; & Lt; ComponentRef id = 'Program Icon' / & gt; & Lt; ComponentRef Id = 'RemovePluginsFolder' / & gt; & Lt; Property ID = 'ShowFinalCheckbox' & gt; 1 & lt; / Property & gt; # & Lt; - This will not work, but I like it. & Lt; / Feature & gt;  

SetProperty element to be used to change the value of the property after one or the other Action can To set a value based on the installation status of the executable, I will use a combination of component states which are documented in. You have to play with this example, but I think it will stop you.

  & lt; SetProperty id = "ShowFinalCheckBox" after value = "1" = "CostFinalize" & gt; ? Main Challenging Conference & gt; 2 or $ Main Challenging Component & amp; 2; 2 & lt; / SetProperty & gt;  

All the magic present in it is explained in the link above of MSI SDK.


Comments