I am using a custom deviation from WixUI_Advanced which uses the FeaturesDlg to choose what components will be installed. One of the components requires a Custom Action for its installation, but I do not want to run that Custom Action if I am not installing that feature. Is there some way to query the installer session or something and build a condition for my Custom Action so that it only fires if this feature has been selected?
Edit: I should clarify that I'm looking for language that I can use in a .wxs to determine if the feature has been selected. Something like this, only real code that I didn't make up:
<!--NOT REAL CODE-->
<Custom Action="ThingToDoIfFeatureSelected" Before="InstallFinalize">
$(sys.MyFeatureSessionInformation.Level) > 1
</Custom>
I know this information must exist in the session at run-time, or the installer wouldn't be able to install the correct features, but I cannot find any reference to WIX language that references this session info. I cannot change the code in the Custom Action itself, so I need to test this condition in the WIX markup.