Is there a variable that I can query to find out if a function to install in FeatureDlg has been selected

I use a custom deviation from WixUI_Advanced, which uses FeatureDlg to select which components will be installed. One of the components requires a custom action to install it, but I do not want to run this custom action if I do not install this function. Is there a way to request an installation session or something else and create a condition for my user action so that it only works when this function is selected?

Edit: I have to clarify that I'm looking for a language that I can use in .wxs to determine if this feature has been selected. Something like this, only real code that I haven't drawn:

      <!--NOT REAL CODE-->
  <Custom Action="ThingToDoIfFeatureSelected"  Before="InstallFinalize">
    $(sys.MyFeatureSessionInformation.Level) > 1
  </Custom>

I know that this information must exist in the session at runtime, or the installer will not be able to install the correct functions, but I cannot find references to the WIX language that references this session information. I cannot change the code in a custom action, so I need to check this condition in the WIX markup.

+3
source share
2 answers

I have found my answer. The markup required for this condition was as follows:

<Custom Action="ThingToDoIfFeatureSelected"  Before="InstallFinalize">
  <![CDATA[ADDLOCAL >< "MyFeatureName"]]>
</Custom>

ADDLOCAL , . , , ><, , , true, . CDATA ><. >< &gt;&lt;

, : InstallDefault="local". , ADDLOCAL, . , , :

<Custom Action="ThingToDoIfFeatureSelected"  Before="InstallFinalize">
  <![CDATA[ADDLOCAL >< "MyFeatureName" OR ADDSOURCE >< "MyFeatureName" OR ADDDEFAULT >< "MyFeatureName"]]>
</Custom>



: , "-". &MyFeatureName=3 , , ( , ). , MyFeatureName=2 , ( ​​, ).

.

+4

Feature Component . , , .

0

All Articles