I've got an MSI built in WiX defined as below:
<Feature Id="Core"
Display="0"
Absent="disallow"
ConfigurableDirectory="INSTALLDIR"
AllowAdvertise="no"
Level="1">...</Feature>
I have a 'commit' custom action that loops through all the features of the MSI and determines their install-state. The log file shows this "Core" feature as installed 'Local', but MsiGetFeatureState returns INSTALLSTATE_ADVERTISED. I thought that was impossible given I set:
AllowAdvertise="no"
FWIW, MsiGetFeatureState correctly returns INSTALLSTATE_LOCAL for all other installed features and INSTALLSTATE_ABSENT for all other not-installed features.
Edit for more info:
- This occurs during a fresh install.
- I do not set the ADVERTISE property (I still don't fully understand what it's for)
- The "Core" feature is a parent feature with children that all have the wix attribute InstallDefault="followParent".
- The "Core" feature (as well as its children) all have components attached to them.
- All the child features are marked as INSTALLSTATE_ADVERTISED as well.
- I have a commit custom action (scheduled before InstallFinalize) that queries the installed feature states ([ProductCode] is passed in via CustomActionData). I assumed that a commit action was the right choice since the MSI is officially installed by that point.