Custom InstalledFileActions

Oct 11, 2015 at 10:03 PM
Hi Oleg,

On April 24, you committed a change that causes the ProjectValidator to emit warnings if an InstalledFileAction is given a schedule other than When.After Step.InstallExecute.

We have an executable that must run during install and uninstall. When using the default scheduling, it runs just fine during install but does not run during uninstall. However, using When.After Step.InstallInitialize during uninstall works just fine.

Scheduling custom actions in MSIs is clearly a great big can of worms, but it seems that this warning is too broad and warns about options that work.

Would it be possible to make this warning more precise or in the alternative to relax it?

Thanks,
Joshua Lawrence
Oct 12, 2015 at 1:21 PM
Hi Joshua,

The objective of this specific validation was to warn user about the attempt to execute the file before it's been installed. And you are right the validation completely overlooks the uninstall scenario.

My immediate impulse was fix it by analysing the action condition and distinguishing install and uninstall scenarios. However now I am leaning towards completely removing this validation. The problem is that no condition analysis can be accurate enough as the condition can be a way more complicated than just 'NOT Installed'. In fact the combined condition can be flooded with user defined 'sub-conditions'.

> Scheduling custom actions in MSIs is clearly a great big can of worms...
Cannot agree more. That is why I introduced the simplified CLR events based model:
project.UIInitialized += ...
project.Load += ...
project.BeforeInstall += ...
project.AfterInstall += ...
This relatively recent feature has also made the validation less critical.

Thank you for the feedback. I will reflect it in the next release.
Oct 12, 2015 at 10:06 PM
Thanks. Removing the warning suits us. I'll look into those events too.

You may be interested to know there's a team down here in New Zealand using Wix# for several dozen installers.

Joshua
Oct 13, 2015 at 12:44 AM
> You may be interested to know there's a team down here in New Zealand using Wix# for several dozen installers.
Great! It's particularly pleasant to know that your neighbours enjoy your work. I am from Melbourne :)