WiX-始终覆盖以前的版本 [英] WiX-- always overwrite the previous version

查看:355
本文介绍了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操作方法"中有一个专门的主题(也在网络上: 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天全站免登陆