WiX-对多实例安装进行重大升级 [英] WiX - Doing a major upgrade on a multi instance install

查看:143
本文介绍了WiX-对多实例安装进行重大升级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我有一个Windows服务,该服务可以在一个服务器上安装多个实例.安装程序需要能够升级单个实例.安装程序使用实例转换,但是我不确定如何按照我的意愿进行主要升级.

So, I have a windows service which can have multiple instances installed on a single server. The installer needs to be able to upgrade a single instance. The installer uses Instance Transforms, but I am unsure how to get major upgrades working as I would like.

要进行重大升级,我的理解是我应该更改产品代码,因此实例以以下形式定义:

For a major upgrade to work, my understanding is that I should have the Product Code change, so instances are defined in this form:

<Instance ProductCode="*"
            UpgradeCode="{SOMEGUID}"
            ProductName="Instance 1"
            Id="Instance1"/>

可以通过以下方式启动msi以安装新实例:

The msi can be launched to install a new instance by:

msiexec.exe /i "installer.msi" TRANSFORMS=:Instance1 MSINEWINSTANCE=1

但是,经过大量搜索之后,我发现在特定实例上运行升级的唯一方法是以下格式:

However, after much searching the only way I have found to run an upgrade on a specific instance is this format:

msiexec.exe /i "installer.msi" /n {PRODUCTCODE} REINSTALL=ALL REINSTALLMODE=vamus

问题是如果产品代码是为重大升级自动生成的,那么我不知道它是什么,所以我无法传递给命令参数.

The problem with this is if the product code is autogenerated for major upgrades, then I don't know what it is, so I can't pass in to the command arguments.

是否可以使用实例的UpgradeCode或InstanceID或ProductCode启动升级?由于这两个都将保持静态.另外,我可以不带任何参数启动msi,在UI对话框中选择一个现有实例(通过检查注册表),并设置适当的属性以强制该实例进入升级模式吗?

Is there a way to launch an upgrade using the Instance's UpgradeCode or InstanceID instead or ProductCode? Since both of those will stay static. Alternatively, can I launch the msi with no arguments, pick an existing instance (via checking registry) in the UI dialog, and set appropriate properties to force the msi into upgrade mode for that instance?

推荐答案

到目前为止,这是我为处理3个单独实例升级所做的工作:

Here is what I've done so far to handle 3 separate instances upgrading:

<InstanceTransforms Property="Upgrade">
  <Instance Id="I01" ProductCode="*"  ProductName="Product Instance 1" UpgradeCode="55a25a09-5979-438d-91dd-67755012a288"/>
  <Instance Id="I02" ProductCode="*" ProductName="Product Instance 2" UpgradeCode="a27eb2e5-9aa8-4d09-b6c0-df717875c310"/>
  <Instance Id="I03" ProductCode="*" ProductName="Product Instance 3" UpgradeCode="d705720d-3703-4b17-817e-bd51edd9abea"/>
</InstanceTransforms>

我的财产升级是固定的向导.这样,我可以使用此行分别处理3个实例及其更新-对于新安装,请添加MSINEINSTANCE = 1-:

While my Property Upgrade is a fixed Guid. With this, I can handle 3 instances with their updates separately using this line -for new installs, add MSINEINSTANCE=1- :

msiexec/i MyProduct.msi MSINEWINSTANCE = 1 Transforms =:I01"

msiexec /i MyProduct.msi MSINEWINSTANCE=1 Transforms=":I01"

这篇关于WiX-对多实例安装进行重大升级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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