RFC: Vitality

The msidbFileAttributesVital File attribute bit says to Windows Installer that the file is vital to the operation of the installation and if it can’t be installed, the installation should fail. In an installation showing user interface, if a file can’t be installed, MSI shows a dialog box to let the user retry, ignore, or cancel the install. If a file is marked vital, however, the ignore option is taken away.

Generally, if a file can’t be installed, it’s bad news; most apps don’t react well to missing files. You might wonder why it’s not the default. Yeah, well, join the club. Unfortunately, it’s not the default and if you want “file vitality” in WiX, you need to set the Vital attribute to “yes” on every File element.

Providing better defaults is part of our ongoing attempts to make the WiX language easier to use and understand. Unfortunately, simply making Vital=”yes” the default would be a change in behavior. Granted, it’s a good change in behavior but we’re at a point in WiX v3 development and use where we generally avoid changes in behavior.

A minor new feature I added to WiX in the latest weekly release is the ability to indicate that all files should have the msidbFileAttributesVital bit set by default. If you use MSBuild projects, the FilesVitalByDefault property can be set for the whole project. If you use Candle directly, you have to specify -fdvital on every Candle command line invocation.

An alternative would be to reverse it: Set the msidbFileAttributesVital bit by default and let you turn off that behavior with another command-line switch or MSBuild property.

So we’re looking for feedback. Would it be disruptive to your use of WiX v3 to have the msidbFileAttributesVital bit set by default? Would it be preferable to using the new -fdvital switch or FilesVitalByDefault property?

Please post your votes/comments/questions/criticisms/concerns/praise here or via mail to the wix-users mailing list.

6 Replies to “RFC: Vitality”

  1. I’d say just make it easier to change in bulk. Maybe set it on a componentGroup element.

  2. I’d say just make it easier to change in bulk. Maybe set it on a componentGroup element.


    <componentGroup ... unspecifiedVital="yes">

  3. If setting Vital to yes by default is the way forward, then that should be done with the option to switch the default to false via the switch -fdvital as you mentioned. If this is well communicated it will not break existing code, but will help achieve the correct result on new installers by the better default.

  4. I have no objection to making it vital by default. I think it’s a good idea.

  5. I agree with Matthew …

    Vital=”yes” by default is fine, as long as there is a way to override this setting from a command line [& within MSBuild].

Comments are closed.