Wix重大升级 [英] Wix major upgrade

查看:91
本文介绍了Wix重大升级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在重大升级"期间,如何使用WIX防止覆盖配置文件?

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 unchanged on a 'Major Upgrade'.

谢谢

推荐答案

最直接的方法是在InstallExecute或InstallFinalize之后安排RemoveExistingProducts.这样,配置文件不会被删除,然后再次安装(就像您在InstallInitialize之前进行计划一样).当然,如此晚地安排RemoveExistingProduct意味着您需要非常小心自己的组件规则.

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.

我个人最喜欢的是将配置视作用户数据",而不用installtouch进行配置.您随应用程序一起提供了默认值,但是任何更改都是由用户在其私人用户配置文件中进行的.使您摆脱各种在安装过程中无法很好解决的令人讨厌的迁移问题.

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.

这篇关于Wix重大升级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆