问题描述
我有一个安装和卸载 VC 2012 redist 的 Bundle.如果之前没有安装 VC 2012 redist,它工作正常.如果已经安装了 VC 2012 redist,那么在卸载我的包时,它也会卸载 VC 2012 redist.我想要的是,如果以前安装过 VC 2012 redist,它一定不能卸载.我试图使用持久属性设置为是"的变量元素.但我不确定它是如何工作的.不胜感激.
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.
推荐答案
Bundles 可以引用计数包含的包.从 WixDependencyExtension
添加一个 Provides
元素,使用相同 Provides
元素的 Bundle 将更正引用计数.
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.
不幸的是,VCRedist 没有记录标准的Provides
键,因此没有真正的方法来正确地引用计数包.因此,VCRedist 团队希望您将其标记为永久.
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.
这篇关于安装 WiX 捆绑包时如何避免卸载以前安装的 ExePackage(可再发行组件)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!