How do you detect installed product versions at each startup?

前端 未结 2 502
遇见更好的自我
遇见更好的自我 2021-01-23 20:57

This problem, in fact, is to avoid a problem I will not solve

When I install my product once and I use the MSI again, the unloading process is performed. However, this d

2条回答
  •  面向向阳花
    2021-01-23 21:26

    When you run the "same" MSI again it goes into maintenance mode, often just a repair. Windows doesn't even need to use the MSI you use for this "install" because it uses the original MSI for the install, which may or may not be the one you attempt to install again. So it's not clear what you mean by "the unloading process" or what you expect running the same MSI to actually do.

    FindRelatedProducts is for major upgrades, but that means incrementing the ProductVersion and changing the ProductCode. Running the same MSI does not cause a major upgrade (see WiX MajorUpgrade element).

    So again, what are you expecting to happen when you run that same MSI again? It seems that you are not uninstalling it, so it will go into maintenance mode using the original MSI file, so there is nothing you can do to change that behavior because it's embedded in the installed product's MSI. Since you are apparently not uninstalling the installed product, it won't remove its registry entries. You should say what those residual registry entries are and why they are residual if in fact the product is not being uninstalled.

提交回复
热议问题