Skip to content

fix(installer): request elevation when the maintenance lock requires it - #4072

Merged
kev1n77 merged 1 commit into
openBitFun:mainfrom
kev1n77:fix/windows-installer-maintenance-elevation
Dec 2, 2026
Merged

kev1n77 merged 1 commit into
openBitFun:mainfrom
kev1n77:fix/windows-installer-maintenance-elevation

Conversation

@kev1n77

@kev1n77 kev1n77 commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Route Windows error 1314 (ERROR_PRIVILEGE_NOT_HELD) from the maintenance lock probe through the existing UAC flow when the installer is running without elevation.

Preserve the failed operation, path, and original OS error when a probe fails. For sharing violations, tell users to close other installers and retry.

Type and Areas

  • Type: Bug fix
  • Area: Windows installer and maintenance

Motivation / Impact

The installer previously recognized only Rust's PermissionDenied as a reason to request elevation. Windows error 1314 falls outside that classification, so the installer stopped before unpacking without offering administrator authorization.

Verification

  • cargo test --offline --manifest-path OpenBitFun-Installer/src-tauri/Cargo.toml --lib on Windows: 50 passed, 1 ignored (requires a packaged desktop executable).
  • The tests cover Windows errors 5 and 1314 with and without elevation, preservation of other error codes, an actual sharing conflict, and a protected parent directory.
  • pnpm run fmt:rs --check, pnpm run i18n:audit, and git diff --check passed.
  • The regression tests exercise the elevation decision. The interactive UAC prompt and full installation on the affected machine still need manual verification.

Reviewer Notes

AI-assisted change with local Windows regression testing.

Checklist

  • The PR is focused and contains no unrelated artifacts.
  • Verification and its limits are recorded above.
  • User-facing diagnostics follow the existing installer error presentation.

@kev1n77
kev1n77 merged commit ab64b21 into openBitFun:main Dec 2, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant