2

I have a Wix installer which needs to use a bootstrapper. I have included an extract of the Bundle.wxs below. It shows the Chain, which is to first install .Net 4.5.2 and then depending upon whether the installer has been called with -s for silent install calls ExePackage with or without the InstallCommand with a value of /S. The "OtherInstaller" is a NSIS (nulscript installer) installer so requires a case sensitive /S to trigger it's silent install. I understand that UILevel=2 is the condition to check for for a silent install, but for some reason "OtherInstaller" is not getting called with the /S silent argument. Then after that the "MainMsiInstaller" is called.

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

Any help appreciated.

Dib
  • 2,001
  • 2
  • 29
  • 45

1 Answers1

2

In the end a solution that worked for me (whether the best solution, or not) was to ensure that the version of burn.exe I was using was 3.11.xxxx and InstallCondition="WixBundleUILevel=2" which is a WIX variable which is available in v3.11 upwards.

So in essence...

<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>
Dib
  • 2,001
  • 2
  • 29
  • 45
  • what happens when you run the bootstrapper is called in UI mode, doesn't it skip the NSIS install? – Pavan Feb 03 '21 at 22:42
  • @Pavan - Thank you for your response, but I have not looked at this for over three years and cannot even remember the project, let alone the context of the question now! Working on entirely different projects. – Dib Feb 05 '21 at 09:58