WiX——总是覆盖以前的版本 [英] WiX-- always overwrite the previous version

查看:14
本文介绍了WiX——总是覆盖以前的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

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

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>

这是 WiX 的 3.0.5120 版本.

This is version 3.0.5120 of WiX.

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

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.

另外,非常重要的是将产品的默认 GUID 更改为*",以便使用不同的安装程序使用不同的 GUID,这显然是问题所在.

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.

推荐答案

您想要进行重大升级.在 WiX.chm How To"中有一个专门针对此的主题(也在网络上: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).

这篇关于WiX——总是覆盖以前的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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