维克斯.相同版本不同产品代码如何进行Major Upgrade? [英] WIX. How to perform Major Upgrade with same version and different product code?

查看:25
本文介绍了维克斯.相同版本不同产品代码如何进行Major Upgrade?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上我需要改变这种行为:

Basically I need to change this behavior:

安装具有相同版本和升级代码的产品(但不同的产品代码)是允许的,MSI 将其视为两种产品.

Installing a product with the same version and upgrade code (but different product code) is allowed and treated by MSI as two products.

我需要它作为主要升级受到威胁.因此,在 v 1.0.1(旧版本,不同的 ProductCode)上安装 v 1.0.1 将卸载旧版本.这是因为除非我们要公开发布,否则我对更改版本不感兴趣.

I need this to be threated as Major Upgrade. So installing v 1.0.1 over v 1.0.1 (old build, different ProductCode) will uninstall old one. This is because I'm not interested in changing versions unless we're going for public release.

我有:

<Product Id="*" UpgradeCode="2067109E-DCDA-4639-B4FC-B95E0A239E1A" Version="1.0.1"...
....
<MajorUpgrade AllowSameVersionUpgrades="yes" ...

我现在在添加/删除程序下有两个条目,这不是我想要的.

What I have now is two entries under Add/Remove Programs, which is not what I want.

推荐答案

只需添加第四个版本号 (Major.Minor.Patch.Build) 并为每个新构建增加构建号.

Just add a fourth version number (Major.Minor.Patch.Build) and increment the build number for each new build.

使用相同的 UpgradeCode 但不同的 ProductCode,将允许安装任何具有相同 (Major.Minor.Patch) 的安装程序作为升级,但至少您将知道安装了哪个构建版本.

Using the same UpgradeCode but a different ProductCode, will allow any installer with the same (Major.Minor.Patch) to be installed as an upgrade, but at least you will know what build version is installed.

确保使用

<MajorUpgrade AllowSameVersionUpgrades="yes"

请注意,当存在较晚的构建时,这不会阻止安装较早的构建.

Note that this will not prevent earlier builds to be installed when a later build is present.

这篇关于维克斯.相同版本不同产品代码如何进行Major Upgrade?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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