简体   繁体   English

如何根据是否以静默方式安装来限制Wix引导程序包的安装?

[英]How do I limit Wix bootstrapper bundle installs based on whether it is installed in silent mode?

I would like to check whether the UI is in quiet/silent mode or gui mode and then either error or exit installation if the ui is displayed, preferably with a message indicating that this "cannot be run in gui mode" 我想检查UI是处于安静/静默模式还是gui模式,然后如果显示ui,则出错或退出安装,最好显示一条消息,指出该“无法在gui模式下运行”

in WiX 3.11 there is a variable WixBundleUILevel: http://wixtoolset.org/documentation/manual/v3/bundle/bundle_built_in_variables.html 在WiX 3.11中,存在一个变量WixBundleUILevel: http ://wixtoolset.org/documentation/manual/v3/bundle/bundle_built_in_variables.html

but how do I give an error if this value is set to show the UI? 但是,如果将此值设置为显示UI,如何显示错误?

Thanks 谢谢

add to: Bundle wxs 添加到:捆绑wxs

xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">

<Bundle .... \>
<bal:Condition Message="reason">WixBundleUILevel=2</bal:Condition>
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense"/>      
<Chain>

when calling candle and light, include 打电话给蜡烛和蜡烛时,包括

  -ext (wixfolder)bin\WixBalExtension.dll"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM