MSI: Fixing different component GUIDs for the same file

廉价感情. 提交于 2019-12-24 08:59:53

问题


I've inherited an installer with a fairly long history. In a few versions, component GUIDs were not tracked properly, resulting in different component GUIDs for a given file.

v1.0: C:\Program Files\Foo\Foo.exe {GUID_A}
v2.0: C:\Program Files\Foo\Foo.exe {GUID_B}
v3.0: C:\Program Files\Foo\Foo.exe {GUID_B}

This obviously violates component rules, and requires early sequencing of RemoveExistingProducts to avoid absent files after an upgrade.

Each new version installs as a Major Upgrade. It is expected that the latest version will cleanly upgrade any previous version.

Question: Is there any way to reset or salvage this scenario going forward? I'd like to schedule RemoveExistingProducts after InstallFinalize without causing destruction.

(I've been using heat.exe's deterministic GUIDs since I got ahold of the project. Best feature ever.)


回答1:


To switch to a late major upgrade, you have to ensure you're only upgrading from versions that adhere to the component rules. So in this case, you have to block upgrades from v1.0.



来源:https://stackoverflow.com/questions/43062435/msi-fixing-different-component-guids-for-the-same-file

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