Wix major upgrade

前端 未结 3 1125
天涯浪人
天涯浪人 2021-02-04 10:47

How do I use WIX to prevent overwriting a config file during a \'Major Upgrade\'?

I want the file to be installed on the initial install, removed on uninstall, and left

3条回答
  •  感动是毒
    2021-02-04 11:30

    The most straight forward way would be to schedule your RemoveExistingProducts after InstallExecute or InstallFinalize. That way the config file is not removed and then installed again (like if you schedule before InstallInitialize). Of course, scheduling RemoveExistingProduct so late means you need to be very careful about your Component Rules.

    My personal favorite is to treat configuration like "user data" and not have the installtouch it at all. You ship defaults with the application but any changes are made by the user in their private user profile. Gets you out of all kinds of nasty migration problems that just aren't solved well during setup.

提交回复
热议问题