WiX--总是覆盖以前的版本
我有一个应用程序的安装程序,需要安装在任何现有版本上,无论版本号如何。
相反,我的安装程序不断提示我需要添加/删除程序。 对于我的测试人员来说,这是非常令人沮丧的行为,因为它只会减慢他们的速度,而在他们看来没有任何真正的原因 - 以前的安装程序包总是会安装,删除以前存在的任何文件,所以他们永远不必执行该步骤。 我们还有一个经过类似培训的(大型)客户群,因为我现在安装的任何版本都应该覆盖我之前可能安装的任何版本。
据我所知,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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您想要重大升级。 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).