Files
beyondkmp 802c48a799 fix(nsis): auto-elevate silent updates for per-machine installations (#12717)
* fix(nsis): auto-elevate silent updates for per-machine installations

When users chose "Install for all users", subsequent auto-updates would
fail with "cannot close app" because the silent installer ran without
admin privileges. Detect per-machine installations via HKLM registry
and re-launch with elevation (runas) during silent updates.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(nsis): elevate for per-machine installs in all modes, not just silent

The previous fix only handled silent updates. Manual reinstalls where
the user switches from "Install for all users" to "Install for me only"
also fail with "cannot close app" because the non-elevated installer
cannot manage the per-machine installation. Remove the silent-only
guard so elevation is requested whenever a per-machine install exists.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(nsis): exit with error when user cancels UAC elevation

ExecShell sets the NSIS error flag when the user cancels the UAC
dialog. Check this flag and exit with error code 1 on failure instead
of unconditionally reporting success.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Payne Fu <payne@Paynes-MacBook-Pro.local>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 18:17:11 +08:00
..