You will need to set a Condition for the action and this condition needs to evaluate if the feature is marked for installation.
You will need to use global variable ADDLOCAL that holds a coma separated list of the all features to be installed locally.
You will need to use global variable ADDLOCAL that holds a coma separated list of the all features to be installed locally.
new ManagedAction("MyAction", Return.check, When.After, Step.InstallInitialize, Condition.NOT_Installed) { Condition = Condition.Create("ADDLOCAL >< \"your_feature_name\"") }