【问题标题】:How do I limit Wix bootstrapper bundle installs based on whether it is installed in silent mode?如何根据是否以静默模式安装来限制 Wix 引导程序包的安装?
【发布时间】:2019-01-02 13:34:18
【问题描述】:

我想检查 UI 是处于安静/静默模式还是 gui 模式,然后如果显示 ui 则错误或退出安装,最好有一条消息表明“无法在 gui 模式下运行”

在 WiX 3.11 中有一个变量 WixBundleUILevel: http://wixtoolset.org/documentation/manual/v3/bundle/bundle_built_in_variables.html

但是如果这个值被设置为显示 UI,我该如何给出错误呢?

谢谢

【问题讨论】:

    标签: wix installation conditional silent


    【解决方案1】:

    添加到:捆绑 wxs

    xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
    
    <Bundle .... \>
    <bal:Condition Message="reason">WixBundleUILevel=2</bal:Condition>
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense"/>      
    <Chain>
    

    调用烛光时,包括

      -ext (wixfolder)bin\WixBalExtension.dll"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多