如何在命令行元素条件下使用 Burn 内置变量 WixBundleUILevel?

How to use Burn Built-in Variable WixBundleUILevel in a CommandLine elements condition?

我尝试将 /quiet 和 /passive 参数从引导程序路由到链接的 ExePackages。我发现我可以通过 <CommandLine/> 元素将命令行参数添加到 Install/Repair/Uninstall 命令。它有一个 Condition 属性,我想以

的方式使用
<CommandLine Condition="WixBundleUILevel=2" InstallArgument="/q" RepairArgument="/q" UninstallArgument="/q"/>
<CommandLine Condition="WixBundleUILevel=3" InstallArgument="/passive" RepairArgument="/passive" UninstallArgument="/passive"/>

<CommandLine Condition="WixBundleUILevel=&quot;2&quot;" InstallArgument="/q" RepairArgument="/q" UninstallArgument="/q"/>
<CommandLine Condition="WixBundleUILevel=&quot;3&quot;" InstallArgument="/passive" RepairArgument="/passive" UninstallArgument="/passive"/>

据我从文档和源代码中了解到,WixBundleUILevel 映射到 enum BOOTSTRAPPER_DISPLAY 的值,因此 2 应该等同于 BOOTSTRAPPER_DISPLAY_NONE .

说明安装日志

Command Line: '-burn.clean.room=C:\Users\hb\Downloads\OLPlannerSetup.exe /passive'
...
Condition 'WixBundleUILevel="2"' evaluates to false. 
Condition 'WixBundleUILevel="3"' evaluates to false.

(我也试过不带引号。)

如何将WixBundleUILevel的值写入日志?其他变量,例如WixBundleAction 被写入日志。

感谢您的帮助。

WixBundleUILevel 需要 WiX v3.11。