I have a WiX installer which has 3 Projects. 2 Creates Merge Moduels, 1 Creates the installer. The code in the mergemodules should only be executed if the corresponding feature is selected. Is there any chance to get this to work with custom actions?
From my experience the custom actions are always called - wether or not a certain feature is selected...
Code in the Podoct:
<Feature Id="Complete" Title="SDK Setup" Description="Installs the sdk" Display="expand" Level="1" ConfigurableDirectory="INSTALLLOCATION">
<Feature Id="SDK" Title ="SDK" Description="" Level ="1">
....
In the Merge Module I call some custom actions, e.g.:
<CustomAction Id='CustomAction' BinaryKey='CaDll' DllEntry='CaEntry' Execute='deferred' />
<CustomAction Id="CustomAction.SetProperty" Return="check" Property="CustomAction" Value='test' Execute='immediate' />
<InstallExecuteSequence>
<Custom Action='CustomAction.SetProperty' After='CostFinalize'>(NOT Installed) AND (NOT UPGRADINGPRODUCTCODE) </Custom>
<Custom Action='CustomAction' After='InstallFiles'>(NOT Installed) AND (NOT UPGRADINGPRODUCTCODE) </Custom>