How to implement WiX installer upgrade?

后端 未结 12 1281
礼貌的吻别
礼貌的吻别 2020-11-22 07:05

At work we use WiX for building installation packages. We want that installation of product X would result in uninstall of the previous version of that product on that machi

12条回答
  •  孤街浪徒
    2020-11-22 07:25

    You might be better asking this on the WiX-users mailing list.

    WiX is best used with a firm understanding of what Windows Installer is doing. You might consider getting "The Definitive Guide to Windows Installer".

    The action that removes an existing product is the RemoveExistingProducts action. Because the consequences of what it does depends on where it's scheduled - namely, whether a failure causes the old product to be reinstalled, and whether unchanged files are copied again - you have to schedule it yourself.

    RemoveExistingProducts processes elements in the current installation, matching the @Id attribute to the UpgradeCode (specified in the element) of all the installed products on the system. The UpgradeCode defines a family of related products. Any products which have this UpgradeCode, whose versions fall into the range specified, and where the UpgradeVersion/@OnlyDetect attribute is no (or is omitted), will be removed.

    The documentation for RemoveExistingProducts mentions setting the UPGRADINGPRODUCTCODE property. It means that the uninstall process for the product being removed receives that property, whose value is the Product/@Id for the product being installed.

    If your original installation did not include an UpgradeCode, you will not be able to use this feature.

提交回复
热议问题