WiX - Doing a major upgrade on a multi instance install

喜你入骨 提交于 2019-11-27 23:17:04

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>

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"

Pretty sure you need the product code for this since the upgrade code identifies a family of products, and not a single one.

Fire up PowerShell and run this command to get a list of installed products with product code:

Get-WmiObject -Class win32_product

Here is a different way to get the output in a tabular format (IdentifyingNumber is ProductCode):

Get-WmiObject Win32_Product | Format-Table IdentifyingNumber, Name, Version

You can also find the product code in the Property table of the compiled MSI using Orca (MSI SDK tool):

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!