I have been attempting to write a WPF UI for the WiX installer that chains multiple msis from our company together.
I have followed This Link to do so, however, I cannot get the ui app tp open at all.
I have gotten the command line to run the MyBootstrapper.exe file and save the logs to the desktop.
[1CAC:1CB0][2020-08-06T08:31:55]i001: Burn v3.11.2.4516, Windows v10.0 (Build 18362: Service Pack 0),
path: C:\Users\james\AppData\Local\Temp\{75974D4E-F6FC-4A63-8B17-9C40D549A877}\.cr\MyBootstrapper.exe
[1CAC:1CB0][2020-08-06T08:31:55]i009: Command Line: '-burn.clean.room=C:\Users\james\Desktop\MyBootstrapper.exe -burn.filehandle.attached=632 -burn.filehandle.self=688 -l log.log'
[1CAC:1CB0][2020-08-06T08:31:55]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\james\Desktop\MyBootstrapper.exe'
[1CAC:1CB0][2020-08-06T08:31:55]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\Users\james\Desktop\'
[1CAC:1CB0][2020-08-06T08:31:55]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\james\Desktop\log.log'
[1CAC:1CB0][2020-08-06T08:31:55]i000: Setting string variable 'WixBundleName' to value 'MyBootstrapper'
[1CAC:1CB0][2020-08-06T08:31:55]i000: Setting string variable 'WixBundleManufacturer' to value 'James'
[1CAC:1CB0][2020-08-06T08:31:55]i000: Loading managed bootstrapper application.
[1CAC:1CB0][2020-08-06T08:31:56]e000: Error 0x80131508: Failed to create the managed bootstrapper application.
[1CAC:1CB0][2020-08-06T08:31:56]e000: Error 0x80131508: Failed to create UX.
[1CAC:1CB0][2020-08-06T08:31:56]e000: Error 0x80131508: Failed to load UX.
[1CAC:1CB0][2020-08-06T08:31:56]e000: Error 0x80131508: Failed while running
[1CAC:1CB0][2020-08-06T08:31:56]i410: Variable: WixBundleAction = 5
[1CAC:1CB0][2020-08-06T08:31:56]i410: Variable: WixBundleElevated = 0
[1CAC:1CB0][2020-08-06T08:31:56]i410: Variable: WixBundleLog = C:\Users\james\Desktop\log.log
[1CAC:1CB0][2020-08-06T08:31:56]i410: Variable: WixBundleManufacturer = James
[1CAC:1CB0][2020-08-06T08:31:56]i410: Variable: WixBundleName = MyBootstrapper
[1CAC:1CB0][2020-08-06T08:31:56]i410: Variable: WixBundleOriginalSource = C:\Users\james\Desktop\MyBootstrapper.exe
[1CAC:1CB0][2020-08-06T08:31:56]i410: Variable: WixBundleOriginalSourceFolder = C:\Users\james\Desktop\
[1CAC:1CB0][2020-08-06T08:31:56]i410: Variable: WixBundleProviderKey = {3d87621d-9ee8-4412-843e-67b7d5da8dd5}
[1CAC:1CB0][2020-08-06T08:31:56]i410: Variable: WixBundleSourceProcessFolder = C:\Users\james\Desktop\
[1CAC:1CB0][2020-08-06T08:31:56]i410: Variable: WixBundleSourceProcessPath = C:\Users\james\Desktop\MyBootstrapper.exe
[1CAC:1CB0][2020-08-06T08:31:56]i410: Variable: WixBundleTag =
[1CAC:1CB0][2020-08-06T08:31:56]i410: Variable: WixBundleUILevel = 4
[1CAC:1CB0][2020-08-06T08:31:56]i410: Variable: WixBundleVersion = 1.0.0.0
[1CAC:1CB0][2020-08-06T08:31:56]e000: Error 0x80131508: Failed to run per-user mode.
[1CAC:1CB0][2020-08-06T08:31:56]i007: Exit code: 0x80131508, restarting: No
What I don't understand is why this never attempts to open the WixBootstrapper.Run
method. I know this because, the very first line I have a log message that says Engine.Log(LogLevel.Verbose, "Starting Custom UI");
so I would assume that this has to be in the Bundle.wxs
file that looks like.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle Name="MyBootstrapper" Version="1.0.0.0" Manufacturer="James" UpgradeCode="c59306b1-bc3d-4aa0-9936-53f2a3484343">
<BootstrapperApplicationRef Id="ManagedBootstrapperApplicationHost" >
<Payload SourceFile="$(var.InstallerUI.TargetDir)BootstrapperCore.config"/>
<Payload SourceFile="$(var.InstallerUI.TargetDir)InstallerUI.dll"/>
<Payload SourceFile="C:\Program Files (x86)\WiX Toolset v3.11\bin\Microsoft.Deployment.WindowsInstaller.dll"/>
</BootstrapperApplicationRef>
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="Netfx45Full"/>
<WixVariable Id="WixMbaPrereqPackageId" Value="NetFxLicense.rtf"/>
<Chain>
<MsiPackage Id="WPFInstaller" SourceFile="$(var.Installer.TargetPath)" />
</Chain>
</Bundle>
</Wix>
On to my question, Can someone please explain what I am doing wrong, and why this doesn't open bootstrapper class in cs?
Also, I have extracted the MyBootstrapper.exe file and all of my dependencies are in it.
I was able to get past this point where it is now attempting to install the application, it still doesn't open the WPF UI, but it does now at least attempt it.
I had to change the BootstrapperCore.config
From
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
</startup>
To
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.5" />
</startup>
User contributions licensed under CC BY-SA 3.0