MSI Major Upgrade overwriting rules

后端 未结 5 2003
天涯浪人
天涯浪人 2020-12-18 10:19

I think I read it somewhere, but couldn\'t find the source now and can\'t confirm it: when install(Major upgrade) a newer version from MSI, if the file has been modified (ei

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-18 10:53

    My guess is that the change in behavior is because you have moved RemoveExistingProducts early in the InstallExecuteSequence.

    A major upgrade is essentially running an uninstall of the original product, and then a reinstall of the new one. If RemoveExistingProducts is late in the InstallExecuteSequence - and component referencing is done correctly - the existing product is not uninstall first, but its "leftover" components are removed after installing the new product. It works like a "diff" if you like. This will preserve installed files on disk that are not removed in the new version. I hope that was comprehensible - a lot at once, and rushed.

    Here is a thread that deals with ensuring unversioned files get updated during an update: Forcing an upgrade of a file that is modified during its initial installation

提交回复
热议问题