MSI:修复同一文件的不同组件 GUID [英] MSI: Fixing different component GUIDs for the same file

查看:31
本文介绍了MSI:修复同一文件的不同组件 GUID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我继承了一个历史悠久的安装程序.在一些版本中,组件 GUID 未正确跟踪,导致给定文件的组件 GUID 不同.

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}

这显然违反组件规则,并且需要RemoveExistingProducts 以避免升级后缺少文件.

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.

问题:有什么办法可以重置或挽救这种情况吗?我想在 InstallFinalize 之后安排 RemoveExistingProducts 而不造成破坏.

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

(我一直在使用 heat.exe 的 确定性 GUID因为我掌握了这个项目.最好的功能.)

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

推荐答案

要切换到后期主要升级,您必须确保仅从符合组件规则的版本升级.因此,在这种情况下,您必须阻止从 v1.0 升级.

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.

这篇关于MSI:修复同一文件的不同组件 GUID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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