Search code examples
wixwix4

Error "BA passed NULL hwndParent to Apply" when using Wix installer in quiet mode


I have a Wix4 installer with custom UI using the Burn bootstrapper (via WixDotNetCoreBootstrapperApplicationHost). The installer works correctly but I also need the ability to run it in quiet mode using "MyInstaller.exe /quiet".

However, I then get the error "BA passed NULL hwndParent to Apply".

I've narrowed down the issue to the call to BootstrapperApplication.Apply() which requires a window as of Wix4.

Since there are no windows displayed in quiet mode, what are my options to run the installer successfully?


Solution

  • Create the window but do not show it. That's the solution you can see in the test BAs that are part of the WiX Toolset.

    The window was required to fix some bugs in WiX v3.