我正在尝试检测Wix Bootstrapper (*.wxs)源文件中的安装条件。Wix在文档here中声明了"Burn内置变量“。
我的源代码如下所示:
<util:RegistrySearch
Id="SearchForMyProduct"
Variable="MyProductIsInstalled"
Result="exists"
Root="HKLM"
Key="SYSTEM\CurrentControlSet\services\MyProduct" />
<bal:Condition Message="service was found. MyProduct is already installed. Please uninstall and try again">
(WixBundleAction = 3) AND (MyProductIsInstalled = 0)
</bal:Condition>我在刻录日志中没有看到设置了WixBundleAction。无论我测试WixBundleAction的值是什么,(WixBundleAction = 3)都是FALSE。无论我是通过双击还是从命令行执行安装程序,行为都是一样的。
发布于 2016-07-15 00:04:49
这取决于变量。对于WixBundleAction,文档说它发生在捆绑包启动时(基于命令行参数)和计划阶段。
WixBundleAction - set to the numeric value of BOOTSTRAPPER_ACTION
from the command-line and updated
during the call to IBootstrapperEngine::Plan().https://stackoverflow.com/questions/38107665
复制相似问题