I had just fixed a problem and realized there might be a better way.
What I did to get my Windows Service installed:
- Based on user selection I either installed FeatureA or FeatureB and made a note of the selection in a global property.
- During the InstallExecuteSequence under InstallServices I was executing a CustomActionProperty based on whether FeatureA or FeatureB was installed (by checking the global property)
- The problem was update was failing because the user couldn't select FeatureA or FeatureB and my global property was "lost". So to fix that problem i wrote it to the registry and the loaded it during an update.
- But then I realized I could probably better do this by using !MyFeature=3 (INSTALLSTATE_LOCAL) for my Execution Condition.
The problem is, this didn't work. Looking at the logs my guess is that maybe at the time my Action is run in the update condition, the feature isn't technically installed. Bummer.
Am I thinking about this problem right? Is there some place else I should be doing this? It turns out my CustomAction is a WixCA so technically doesn't need to have the product installed. If I put it in the Commit stage my system rebooted which is not desirable.
So, is there a way I can leverage the Feature tag to perform a CustomAction based on said Feature condition without introducing a reboot to my update?
Thanks
FOLLOW US
Get the latest news in Application Packaging