WiX--总是覆盖以前的版本

发布于 2024-07-17 19:36:13 字数 1164 浏览 8 评论 0原文

我有一个应用程序的安装程序,需要安装在任何现有版本上,无论版本号如何。

相反,我的安装程序不断提示我需要添加/删除程序。 对于我的测试人员来说,这是非常令人沮丧的行为,因为它只会减慢他们的速度,而在他们看来没有任何真正的原因 - 以前的安装程序包总是会安装,删除以前存在的任何文件,所以他们永远不必执行该步骤。 我们还有一个经过类似培训的(大型)客户群,因为我现在安装的任何版本都应该覆盖我之前可能安装的任何版本。

据我所知,WiX 范式似乎是做一些事情,比如阻止向后版本安装和其他复杂的事情,比如打补丁。 坦率地说,我们的客户不够聪明,不知道或关心修补、合并等,只想要一个始终有效的安装程序(我倾向于同意他们的观点;带宽很便宜)。 那么我怎样才能得到它呢?

我已经尝试过这个,但它似乎并不重要:

<InstallExecuteSequence>
  <RemoveExistingProducts Before="InstallInitialize"/>
</InstallExecuteSequence>

这是 WiX 的版本 3.0.5120。

编辑:根据 Rob 的建议,我添加了以下代码:

<InstallExecuteSequence>
  <RemoveExistingProducts After="InstallInitialize"/>
</InstallExecuteSequence>

<Upgrade Id="27cb76c7-544e-465f-b1f3-b11d9a49e416">
  <UpgradeVersion Minimum="0.8.0"
                  IncludeMinimum="yes"
                  Maximum="1.5.1"
                  Property="OLDERVERSIONBEINGUPGRADED" />
</Upgrade>

我不会添加不允许回滚安装的代码; 出于令我非常尴尬的原因,我们只能说版本号的增加并不一定与软件品质的提高相关。 我不想让任何人无法获得他们认为自己需要的东西。

另外,非常重要的是,将产品的默认 GUID 更改为“*”,以便为不同的安装程序提供不同的 GUID,这显然是问题所在。

I have an installer of an application that needs to install over any existing version, regardless of version number.

Instead, I've got an installer that constantly says that I need to go to add/remove programs. That's very frustrating behavior for my testers, since it just slows them down for no real reason in their minds-- the previous installer package would always just install, deleting any files that were previously there, so they never had to do that step. We also have a (large) customer base that's been similarly trained, in that whatever version I install right now should overwrite whatever install I might have had before.

It seems, from what I can gather, that the WiX paradigm is to do things like block backwards version installations and other complicated things, like patching. Our customers, frankly, are not smart enough to know or care about patching, merging, whatever, and just want one installer that always works (and I'm inclined to agree with them; the bandwidth is cheap). So how do I get that?

I've tried this, but it just doesn't seem to matter:

<InstallExecuteSequence>
  <RemoveExistingProducts Before="InstallInitialize"/>
</InstallExecuteSequence>

This is version 3.0.5120 of WiX.

EDIT: As per Rob's suggestion there, I've added this code:

<InstallExecuteSequence>
  <RemoveExistingProducts After="InstallInitialize"/>
</InstallExecuteSequence>

<Upgrade Id="27cb76c7-544e-465f-b1f3-b11d9a49e416">
  <UpgradeVersion Minimum="0.8.0"
                  IncludeMinimum="yes"
                  Maximum="1.5.1"
                  Property="OLDERVERSIONBEINGUPGRADED" />
</Upgrade>

I'm not adding the code to not allow for a rollback installation; for reasons that are incredibly embarrassing to me, let's just say that an increase in version number does not necessarily correlate to an increase in software goodness. I don't want anyone to get locked out of what they think they need.

Also, very important, is to change the default GUID for the product to "*" in order to make for a different GUID with a different installer, which was apparently the problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

囍孤女 2024-07-24 19:36:13

您想要重大升级。 WiX.chm“操作方法”中有一个专门针对此问题的主题(也在网络上:http://wix.sourceforge.net/manual-wix3/major_upgrade.htm)。

You want a major upgrade. There is a topic dedicated to that in the WiX.chm "How To" (also on the web: http://wix.sourceforge.net/manual-wix3/major_upgrade.htm).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文