WiX: Old versions don't disappear in Add/Remove Programs list

十年热恋 提交于 2019-12-05 15:35:47

问题


I have a Windows Service that I install and upgrade with WiX, and this works great (it's very fast!). The only problem is that if I upgrade from, say, 1.0 to 1.1, both copies still have entries in the Add/Remove Programs list.

So how can I make sure WiX removes its old/outdated entries in the Add/Remove Programs list when I perform an update?


回答1:


Create a major upgrade. For example, use the MajorUpgrade element in WiX v3.5. http://www.joyofsetup.com/2010/01/16/major-upgrades-now-easier-than-ever/




回答2:


An addendum to this - if the RemoveFeatures attribute of MajorUpgrade is included, and names specific features to remove from the previous install (but not all of the features), that will cause the previous entry to remain in Add/Remove programs. If RemoveFeatures is not included, all the features of the previous install will be removed, including the entry in Add/Remove programs.




回答3:


Not directly an answer to the question but ... the installer only looks at the first 3 groups of the version number, the 4th group is ignored. If the only difference in the version is in the 4th group then it looks the same to the installer so the old version may not be uninstalled.

1.2.3.0 will upgrade to 1.2.4.0 but 1.2.3.4 will not upgrade to 1.2.3.5 - it doesn't see the 4-5 change because it doesn't look there.



来源:https://stackoverflow.com/questions/5669983/wix-old-versions-dont-disappear-in-add-remove-programs-list

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!