Wix Burn条件是什么Wix“Burn Built-in Variables”设置?

时间:2016-06-29 18:39:14

标签: wix bootstrapper burn

我正在尝试检测Wix Bootstrapper(* .wxs)源文件中的安装条件。 Wix在文档here中声明了“Burn Built-in Variables”。

我的源代码如下所示:

<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>

我在Burn日志中没有看到设置了WixBundleAction。无论我测试WixBundleAction的值是多少,(WixBundleAction = 3)都是FALSE。无论是通过双击还是从命令行执行安装程序,行为都是相同的。

1 个答案:

答案 0 :(得分:2)

这取决于变量。对于WixBundleAction,文档说它是在捆绑启动时(基于命令行参数)和计划阶段期间发生的。

WixBundleAction - set to the numeric value of BOOTSTRAPPER_ACTION
                  from the command-line and updated
                  during the call to IBootstrapperEngine::Plan().
相关问题