fix(installer): handle WinAppRuntime 0xC0000142 crash silently — bump to 1.0.16#37
Merged
Merged
Conversation
Problem: WindowsAppRuntimeInstall-x64.exe crashes with STATUS_DLL_INIT_FAILED (0xC0000142) on systems where Windows App Runtime 1.8 is already installed. Running it from [Run] causes a visible error dialog during installation. Fix: Move the runtime bootstrap from [Run] to a [Code] Pascal Script function (TryInstallWindowsAppRuntime) that uses Exec() instead of direct [Run] entry. Exec() captures the launch failure silently and logs it — no dialog shown. If the runtime is already installed (the common case on Windows 10/11), PassKey installs cleanly without any error prompts. Also bumps versions to 1.0.16: - PassKey.Desktop.csproj: Version/AssemblyVersion/FileVersion → 1.0.16 - Installer/PassKey.iss: AppVersion → 1.0.16 (keeps exe self-reported version in sync with GitHub release tag) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
WindowsAppRuntimeInstall-x64.execrashes withSTATUS_DLL_INIT_FAILED(0xC0000142)on systems where Windows App Runtime 1.8 is already installed. When launched from the
[Run]section, Inno Setup spawns the process normally and the OS-level crash dialogappears before Inno Setup can handle the failure.
Root cause
0xC0000142=STATUS_DLL_INIT_FAILED— the EXE's own DLL initialization failsat process startup. This happens when a side-by-side manifest dependency that the
runtime installer needs can't be loaded (typically because the runtime is already
present and the install environment is inconsistent). The EXE never reaches
main().Fix
Moved the runtime bootstrap from
[Run]to a[Code]Pascal Script functionTryInstallWindowsAppRuntime():Exec()which catches launch failures before the OS shows any dialogExec()returnsfalse(process couldn't start): logs the error silently,assumes runtime already installed, continues without blocking the user
Exec()returns exit code 0 or 0x80073D21 (already registered): successCalled from
CurStepChanged(ssPostInstall)after all files are in place.Version bump
PassKey.Desktop.csproj:1.0.15→1.0.16Installer/PassKey.iss:1.0.15→1.0.16🤖 Generated with Claude Code