[wix-users] CA Based Feature Installations

Rob Mensching rob at firegiant.com
Tue Mar 30 08:17:38 PDT 2021


You probably want it scheduled in both sequences and you can run it in only the first sequence (assuming you make the property secure as well). Log file will show.


---
Full commercial support for the WiX provided at http://www.firegiant.com/


-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Marc Beaudry via wix-users
Sent: Tuesday, March 30, 2021 7:48 AM
To: 'WiX Toolset Users Mailing List' <wix-users at lists.wixtoolset.org>
Cc: Marc Beaudry <mbeaudry at matrox.com>
Subject: [wix-users] CA Based Feature Installations

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


____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list