How merge module upgrades?

若如初见. 提交于 2020-01-03 08:07:14

问题


I can find plenty of info on how msi upgrades. E.g. info about minor upgrade, small upgrade, major upgade, and their use case and limitations. However, I cannot find info on the upgrade behavior of merge module, such as:

  1. It seems like msm does not have any way to specify minor, small, or major upgrade. So which way it behaves in? Does it uninstall old version first or only update changed files?
  2. Is there any way to specify from which version it can be upgraded like msi?
  3. Can I add/remove/rename components for new version?
  4. If a newer version of this msm is already installed and the container msi decides to install, will it overwrite with this older version of msm?

回答1:


There are two upgrade scenarios that a merge module can take part in. The first is when the installer is upgrading, and it upgrades a .msm file. This happens in cases like the Visual Studio service pack where they provide updated merge modules for you to use. This can be problematic as .msm files do not have a file version (even though they have a merge module version), so file versioning rules do not apply kindly. You're probably not asking about this case.

The other scenario is when the merge module has been merged into an installer that will upgrade. It is no longer a merge module, but instead its files and other records are part of the consuming installer. In this case, the .msi into which it has been merged controls the upgrade steps. The two interact, informing your answers to your first three questions. If the merge module has changes that do not follow minor upgrade rules, then the consuming installer will be unable to use a minor upgrade, and must resort to major upgrades. Correspondingly if you want to use (or allow) minor upgrades in the consuming installer, you must be careful about your components. This can be harder than in an .msi since you cannot add new features inside a merge module. File versioning rules will apply just like they do in all Windows Installer installations; thus the answer to your fourth question is determined on a file-by-file, component-by-component basis instead of a group answer for the entire contents of the module.




回答2:


Question: I believe I need to know how to version the merge module as described in the second scenario in the answer.

Situation:

I have numerous products that all install the same merge module.

If one product installs a newer version of the merge module I do not want an old version of a different product to overwrite the newest merge module.

Can someone describe if this is possible and if so how?



来源:https://stackoverflow.com/questions/1297553/how-merge-module-upgrades

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