Bootstrapper not loading on Windows Server 2008 r2 - wix

Hola Stackoverflowians
Testing my bootstrapper on Windows Server 2008, it doesn't launch, it just crashes with this log:
[07E8:0560][2013-07-16T11:36:31]e000: Error 0x80070002: Failed to create the managed bootstrapper application.
[07E8:0560][2013-07-16T11:36:31]e000: Error 0x80070002: Failed to create UX.
[07E8:0560][2013-07-16T11:36:31]e000: Error 0x80070002: Failed to load UX.
[07E8:0560][2013-07-16T11:36:31]e000: Error 0x80070002: Failed while running
[07E8:0560][2013-07-16T11:36:31]e000: Error 0x80070002: Failed to run per-user mode.
[07E8:0560][2013-07-16T11:36:31]i007: Exit code: 0x80070002, restarting: No
It's a completely clean installation of Windows, so it only has .NET 2.0 installed.
And my bootstrapper is built against 3.0 and I've got this in my BootstrapperCore.config
<supportedRuntime version="v2.0.50727" sku=".NETFramework,Version=v3.0" />
As far as my searches has gone, 0x80070002 = FILE_NOT_FOUND. "Which file is that?"
Using Process Monitor I couldn't see any File Not Found other than some .NET/System Restore components. None of which I expect to be there in this setup anyway, so ultimately this didn't help.
In this scenario (Current .net version < Required .net version) I would expect the prerequisites installer to kick in, but it doesn't.
Why doesn't the prereq installer start? And how does one go about debugging these type of errors with Burn? These messages aren't really all that helpful at all.
Thanks
EDIT: Does this mean you can not have a bootstrapper target .NET 3.0?

Related

Unable to launch custom .NET 6 BA with WixDotNetCoreBootstrapperApplicationHost

I'm converting a WIX3/.NET4.8 installer to WIX4/.NET6. At the moment, I'm trying to see from the bundle our custom BA, which was converted to .NET6.
But I still get these errors on a fresh Win 11 VM, when launching the installer bundle:
Error 0x800700c1: Failed to load hostfxr from 'C:\Windows\TEMP\{2198BC7C-AA74-4DBC-A488-F62A6AD921AE}\.ba\hostfxr.dll'.
Error 0x800700c1: Failed to load hostfxr.
Error 0x800700c1: The self-contained .NET Core runtime failed to load. This is an unrecoverable error.
Bundle and BA settings:
the bundle use WIX 4.0.0-rc.2, and target x64
it has a BA with <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes"/>
the payload is harvested by heat, with the correct <Payload bal:BAFactoryAssembly="yes" SourceFile="$(var.InstallerUIPath)\VisionMainInstallerUI.exe" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal" />
the custom BA is publish self-contained for runtime win-x86
the custom BA is targeting net6.0-windows/win-x86 (I discovered that x86 was still mandatory, as mbanative.dll is only x86)
As I have set the BA as executable (console) I'm able to launch it and see the console message from C:\Windows\TEMP{2198BC7C-AA74-4DBC-A488-F62A6AD921AE}.ba
I was previously creating a dll, but I had the same error, and the exe permit me to check that the self-contained is working and not missing anything.
I also tried the framework dependent solution, with installing the .NET runtime. But I get the same errors:
The prerequisites were successfully installed. The bootstrapper application will be reloaded.
Bootstrapper application requested to be reloaded.
Error 0x800700c1: Failed to load hostfxr from 'C:\Windows\TEMP\{6D909B1C-378D-4481-96DE-DCF7ADBDBBA4}\.ba\hostfxr.dll'.
Error 0x800700c1: Failed to load hostfxr.
Error 0x81f403ea: The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop.
Loading prerequisite bootstrapper application because .NET Core host could not be loaded, error: 0x81f403ea.
Finally, I also tried our test program, which emulate WIX for UI testing the BA: even in self-contained, without any runtime on the VM, the BA was correctly displayed.
Even if I struggle quite a bit to get the correct self-contained output, and the needed harvesting result, I have now a BA which is working when directly called, but WIX still don't want to start it. I now don't know what to do, as the errors messages are totally misleading (hostfxr.dll being present, and the BA is starting on its own).
Update
I switched again to win-x64 (for both build and publishing self-contained) and to a dll output, and I now get the errors bellow.
mbanative.dll correctly contains "PE\0\0d", therefore it is the 64 bit version (Dependencies GUI x64 misleads by marking an issue on it)
My test application emulating WIX can also use the BA dll in x64, and the UI is displayed without issue on a VM without .NET6 runtime. It is only from the bundle itself that it isn't working.
[1E3C:08BC][2023-02-08T10:23:02]e000: error from hostfxr: You must install or update .NET to run this application.
App: C:\Windows\TEMP\{8521A191-8C06-4ED8-880A-4FE878955375}\.cr\visionCATS.exe
Architecture: x64
[1E3C:08BC][2023-02-08T10:23:02]e000: error from hostfxr: Framework: 'Microsoft.NETCore.App', version '6.0.0' (x64)
[1E3C:08BC][2023-02-08T10:23:02]e000: error from hostfxr: .NET location: C:\Windows\TEMP\{414A222D-3B83-4894-8FC0-5AD87CF921E3}\.ba\
[1E3C:08BC][2023-02-08T10:23:02]e000: error from hostfxr: No frameworks were found.
[1E3C:08BC][2023-02-08T10:23:02]e000: error from hostfxr:
Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&arch=x64&rid=win10-x64
[1E3C:08BC][2023-02-08T10:23:02]e000: Error 0x80008096: HostfxrInitializeForApp failed
[1E3C:08BC][2023-02-08T10:23:02]e000: Error 0x80008096: Failed to initialize hostfxr.
[1E3C:08BC][2023-02-08T10:23:02]e000: Error 0x80008096: The self-contained .NET Core runtime failed to load. This is an unrecoverable error.
[1E3C:08BC][2023-02-08T10:23:02]i000: Loading prerequisite bootstrapper application because .NET Core host could not be loaded, error: 0x80008096.
I discovered that x86 was still mandatory, as mbanative.dll is only x86
This is not correct. mbanative.dll is available in x86, x64, and ARM64. As long as your BA's project file is SDK-style, it's as simple as building with the win-x64 RID for an x64 bundle.
You must build your BA in the same architecture as the bundle. That's what 0x800700c1 (ERROR_BAD_EXE_FORMAT) is trying to tell you.

Running Wix bundle installer fails during installation

I have created an installation bundle using Wix3.5. Within a Bundle I created a Chain element to install prerequisites (VC Runtime and another inhouse application's installer) before installing the main application. The other inhouse application's installer was created with Installaware. Now the main installation fails after the Installaware installer finishes with this error message in the installer window:
0x80070064 - Cannot create another system semaphore
Excerpt from the installer log:
[2750:1D60][2019-02-28T16:08:58]e000: Error 0x80070064: Process returned error: 0x64
[2750:1D60][2019-02-28T16:08:58]e000: Error 0x80070064: Failed to configure per-user EXE package.
[2750:1D60][2019-02-28T16:08:58]i319: Applied execute package: CEInstaller, result: 0x80070064, restart: None
[2750:1D60][2019-02-28T16:08:58]e000: Error 0x80070064: Failed to execute EXE package.
However, it seems that the bundled application is installed correctly and can be run as well.
After trying to bundle some other installers instead for testing, it seems that this error only occurs with our Installaware inhouse applications but not with other third party installers. I went through the corresponding Installaware logs but did not find anything suspicious (As these are huge I refrained from posting them here for now).
I am pretty much stuck with this issue (also I am quite new working with Windows installer frameworks). Searching online did not deliver any helpful results so far, so I am grateful for any hints how to solve or further investigate this issue.

Building Wix on Visual Studio Online results in 'incorrectly registered scripting engine'

I recently decided to try out visual studio online to automate my build. The build result should be some binaries and a wix created installer. Locally this works, however on visual studio online this results to errors:
light.exe: Error executing ICE action 'ICE01'. The most common cause of this kind of ICE failure is an incorrectly registered scripting engine. See http://wix.sourceforge.net/faq.html#Error217 for details and how to solve this problem. The following string format was not expected by the external UI message logger: "The Windows Installer Service could not be accessed. This can occur if the Windows Installer is not correctly installed. Contact your support personnel for assistance.".
[..]
light.exe: An unexpected Win32 exception with error code 0x643 occurred: Action - 'ICE09' Fatal error during installation
The only solution I know to solve this is to give the build server administrator rights. In this case this is not possible.
Does anyone know if it is possible to use Wix on Visual Studio Online? If yes, what do I need to change?
The other only alternative I know of is to disable ICE validations during build:
<PropertyGroup>
<SuppressValidation>true</SuppressValidation>
</PropertyGroup>

QBFC12 Installer doesn't seem to be working

I am getting the error message that QBFC12 is not registered. "Retrieving the COM class factory for component with CLSID {C693D8F1-180B-4F82-B735-8F511B566718} failed due to the following error: 80040154." I run the QBFC12_0 installer (several times), but I still get this message. I developed this on VS2012, using VB.NET, and I used the InstallShield installer that comes with VS2012 to install the program. what else do I need to do?
you try to run the QBFC12 installer again? perhaps its not properly registered on your machine.

Unable to deploy WinJS apps

I'm working on a WinJS app which works perfectly on one particular Windows 8 image, but will not deploy on another that we use.
Attempting to run any WinJS project from visual studio results in the following error:
Error 1 Error : DEP0800 : The required framework
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0\ExtensionSDKs\Microsoft.WinJS.1.0\1.0
\Microsoft.WinJS.1.0.appx" failed to install.
Deployment Add operation on Package Microsoft.WinJS.1.0_1.0.9200.20602_neutral__8wekyb3d8bbwe
from: ([path]) failed with error 0x8007065E. See ]link] for help diagnosing app deployment
issues.
Attempting to sideload the app doesn't work either, producing a similar error about the WinJS dependency not being resolved.
Any ideas?
Try changing the package identifier in the manifest and see if that helps.
Is this the application already on the machine? When updating an existing application, I've run into this a few times and first uninstalling from the target machine and then deploying from VS works.