2017-08-16 43 views
0

我有一个需要使用引导程序的Wix安装程序。我已经在下面提供了Bundle.wxs的摘录。它显示Chain,它首先安装.Net 4.5.2,然后根据安装程序是否已使用-s进行静默安装调用ExePackage而不使用InstallCommand使用值/S进行调用。 “OtherInstaller”是一个NSIS(nulscript安装程序)安装程序,因此需要区分大小写的/S来触发其无提示安装。我知道UILevel=2是检查无提示安装的条件,但出于某种原因,“OtherInstaller”没有通过/S无声的参数进行调用。之后,调用“MainMsiInstaller”。WiX刻录引导运行不同的InstallCommand参数进行静默安装

<Chain>  
    <PackageGroupRef Id="NetFx452Web"/>  

    <ExePackage Id="OtherInstallerLoud" 
       SourceFile="..\..\bootstrapper\OtherInstallerFile" 
       InstallCondition="NOT UILevel=2"/> 

    <ExePackage Id="OtherInstallerSilent" 
       SourceFile="..\..\bootstrapper\\OtherInstallerFile" 
       InstallCommand="/S " 
       InstallCondition="UILevel=2"/> 

    <MsiPackage Id="MainMsiInstaller" 
       DisplayInternalUI="yes" 
       SourceFile="..\..\bin\$(var.CandleCfgName)\MainMsiInstaller.msi" /> 
</Chain> 

任何帮助表示赞赏。

回答

0

最终为我工作(不管是最佳的解决方案,或者没有),一个解决方案是确保burn.exe我用的版本是3.11.xxxxInstallCondition="WixBundleUILevel=2"这是一个WIX变量,它是提供v3.11向上。

因此,在本质...

<Chain>  
    <PackageGroupRef Id="NetFx452Web"/>  

    <ExePackage Id="OtherInstallerLoud" 
       SourceFile="..\..\bootstrapper\OtherInstallerFile" 
       InstallCondition="NOT WixBundleUILevel=2"/> 

    <ExePackage Id="OtherInstallerSilent" 
       SourceFile="..\..\bootstrapper\OtherInstallerFile" 
       InstallCommand="/S " 
       InstallCondition="WixBundleUILevel=2"/> 

    <MsiPackage Id="MainMsiInstaller" 
       DisplayInternalUI="no" 
       SourceFile="..\..\bin\$(var.CandleCfgName)\MainMsiInstaller.msi" /> 
</Chain> 
相关问题