Electron >=40.10.3's postinstall swapped its zip extraction to
@electron-internal/extract-zip, an MSVC-built native binding. On machines
without the Visual C++ 2015-2022 Redistributable (fresh Windows VMs), the
binding fails to load with ERR_DLOPEN_FAILED / 'Cannot find native
binding' and the desktop stage dies with an opaque exit 1. Field report
Aug 2026, confirmed fixed by installing the redist.
- Test-VCRuntimePresent: probes vcruntime140.dll + vcruntime140_1.dll
(64-bit needs both) in the real System32 (Sysnative-aware).
- Ensure-VCRedist: winget first, direct download of
aka.ms/vs/17/release/vc_redist.<arch>.exe fallback (arch via
Get-WindowsArch, emulation-safe). Treats 3010/1638 exits as success.
Best-effort and non-fatal; runs before the desktop workspace npm
install.
- Test-NativeBindingFailure + failure hint: when the desktop npm install
still fails with the native-binding signature, the error names the
redist and the manual link.
- tests/test_install_ps1_vcredist.py: 5 source-level contract tests
(probe shape, ordering before npm ci, both provisioning paths,
non-fatality, failure hint). Verified to fail without the fix.