How to avoid uninstalling previously installed ExePackage (redistributables) while installing a WiX Bundle?

ぃ、小莉子 提交于 2020-01-05 04:16:09

问题


I have a Bundle that installs and uninstalls VC 2012 redist. Its working fine if there was no VC 2012 redist installed previously. if there is a VC 2012 redist already installed, then while uninstalling my bundle, it uninstalls the VC 2012 redist as well. All I want is that it must not uninstall the VC 2012 redist if it was previously installed. I was trying to use the variable element with persisted attribute set to "yes". But I am not sure how it works. any pointers to this is greatly appreciated.


回答1:


Bundles can reference count contained packages. Add a Provides element from the WixDependencyExtension and the Bundles that use the same Provides element will correct reference count.

Unfortunately, VCRedist doesn't document a standard Provides key so there is no real way to correctly reference count the package. Thus, the VCRedist team expects you to mark it Permanent.




回答2:


Are you using the ExePackage element to install the redist?

If so, there is a "Permanent" element that you can set to prevent it from being uninstalled when the bundle is removed.



来源:https://stackoverflow.com/questions/18603313/how-to-avoid-uninstalling-previously-installed-exepackage-redistributables-whi

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