Wix fragment: I am setting a property FEATURE_IS_SELECTED
<SetProperty Id="FEATURE_IS_SELECTED" Value="1" After="InstallFiles" Sequence="execute"><![CDATA[&MyFeature=3]]></SetProperty>
then calling a Custom Action:
<Custom Action="ConfigureMyXml" Before="InstallFinalize">NOT Installed OR MaintenanceMode="Modify"</Custom>
Custom action:
public const string IsFeatureSelected = "FEATURE_IS_SELECTED";
[CustomAction]
public static ActionResult ConfigureMyXml(Session session)
{
string value;
MessageBox.Show("I will check if value is set");
if (session.CustomActionData.TryGetValue(IsFeatureSelected, out value))
{
//do sth here
}
return ActionResult.Success;
}
When debugging this, the action is called, but the if condition is not true. Why the FEATURE_IS_SELECTED is not set ? and //do sth here does not execute?