简体   繁体   中英

WIX Overwrite/Update Installer

I have an Installer created with WIX that installs a bunch of DLL and Config files. Once the installation is complete, obviously there are times when I would like to update JUST the DLL files and leave the configs as they were.

I've looked at the NeverOverwrite="yes" option and that looks promising, however I am now running into this issue. When I try and re-run my installer after an installation is complete, I get this error.

在此输入图像描述

The problem is that I do not want to mess with Build Numbers or Product Ids. I just want the installer to re-run and overrwite the necessary DLL files. Does this make sense?

If you recompile to update the dlls you should really think about updating the versioning in your installer. If you have a build process that updates the build number every time you compile your dlls and your installer this shouldn't be a problem.

The reason you are getting the error is because the Product Id and version numbers match, but the package codes differ. To resolve the error you have the following options:

  • Update the version number and treat it like an upgrade.
  • Change the product id (and version) and treat it like an upgrade.
  • The product id and version can match if you set the package code, however this is not really recommended, especially if you are modifying the files in the installer. If you do set the package code to match the previous installer, you will get the maintenance dialog and if you do a repair or modify, I'm not sure if it will use the cached MSI or the recompiled MSI when performing the repair, so I'm not sure what results you can expect.

Like BryanJ says, the error indicates that you are installing a new package which has the same product code as a previously installed package.

The solution is most likely to just set the product Id attribute to * . You only need stable product ids when you want the ability to do minor upgrades .

A minor upgrade does not allow any reorganization of the feature-component tree, and AFAIK only has the advantage of being quicker for huge installations. We just do all upgrades as major upgrades , which are easier to manage.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM