[wix-users] CA Based Feature Installations

Marc Beaudry mbeaudry at matrox.com
Tue Mar 30 07:47:42 PDT 2021


Good morning all,

I have basic functionality that I can't get to work correctly, can someone point me to documentation which will explain why, what I am doing is wrong. If this is the wrong place to post this type of question apologies, where is the correct place?

I have two features, but only one can be installed at a time, based on the result of a custom action. If I hard code the property value "INSTALLFEATURE" my MSI behaves correctly, but if I set the value through a CA then none of my features get installed. The MSI can be ran silently, which is why I chose InstallExecuteSequence and not InstallUISequence. My guess is that it's a sequencing issue, but I am running my CA as early as possible.

Here are the wix portions I am referring to: I left the two versions of my condition syntax in case it helps.

<Property Id="INSTALLFEATURE" Value='A' />

<Feature Id="MYFEATURE_A" Title="Feature_A" AllowAdvertise="no" Absent="allow" Display="hidden" Level="0">
  <ComponentGroupRef Id="FeatureAComponentsA"/>
  <Condition Level="1"><![CDATA[INSTALLFEATURE = "A"]]></Condition>
</Feature>

<Feature Id="MYFEATURE_B" Title="Feature_B" AllowAdvertise="no" Absent="allow" Display="hidden" Level="0">
  <ComponentGroupRef Id="FeatureAComponentsB"/>
  <Condition Level="1">INSTALLFEATURE="B"</Condition>
</Feature>

<CustomAction Id="CADllUpdateFeatureProperty"
          BinaryKey="CADllBinaryID"
          DllEntry="UpdateFeatureProperty"
          Execute="immediate"
          Impersonate="no"
          Return="check" />
          
<InstallExecuteSequence>
    <Custom Action="CADllUpdateFeatureProperty" Before="LaunchConditions"></Custom>
</InstallExecuteSequence>

Besides many google searches here is a reference I found:
https://medium.com/@willfsays/fun-with-wix-toolset-conditional-features-ab1134b53dd5

Regards,
Marc



More information about the wix-users mailing list