Skip to content

Support MSI Updates with Restart Manager#345

Merged
Enigmatrix merged 3 commits intomainfrom
fix/update-shows-as-shutdown
Feb 1, 2026
Merged

Support MSI Updates with Restart Manager#345
Enigmatrix merged 3 commits intomainfrom
fix/update-shows-as-shutdown

Conversation

@Enigmatrix
Copy link
Owner

@Enigmatrix Enigmatrix commented Feb 1, 2026

This PR enhances how the application handles Windows MSI updates by properly responding to Restart Manager requests:

  1. Restructured the main event loop to run on the main thread instead of a separate thread
  2. Added proper handling of Windows Restart Manager messages:
    • Responds to WM_QUERYENDSESSION with a positive response when receiving ENDSESSION_CLOSEAPP
    • Gracefully exits the application when receiving WM_ENDSESSION with ENDSESSION_CLOSEAPP
  3. Removed custom MSI installer properties that were forcing application termination during updates, as the application now properly handles shutdown requests

These changes allow the application to gracefully shut down during Windows updates or MSI installations, improving the user experience and preventing potential data loss during updates.

Copy link
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Enigmatrix Enigmatrix marked this pull request as ready for review February 1, 2026 06:04
Copilot AI review requested due to automatic review settings February 1, 2026 06:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR attempts to add Windows Restart Manager support to handle MSI updates gracefully. The application should respond to shutdown requests from the Windows Installer service and exit cleanly when updates are being installed.

Changes:

  • Removed MSI installer properties that forced application termination
  • Added Windows message handlers for WM_QUERYENDSESSION and WM_ENDSESSION to respond to Restart Manager requests
  • Restructured the event loop to run on the main thread instead of a separate thread

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/ui/src-tauri/installer/main.wxs Removed MSIRMSHUTDOWN and MSIRESTARTMANAGERCONTROL properties to allow proper Restart Manager integration
src/platform/src/events/system.rs Added handlers for WM_QUERYENDSESSION and WM_ENDSESSION messages to respond to Restart Manager shutdown requests
src/engine/src/lib.rs Restructured to move event_loop from a separate thread to the main thread after processor completes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Enigmatrix Enigmatrix merged commit a6ebdab into main Feb 1, 2026
9 checks passed
@Enigmatrix Enigmatrix deleted the fix/update-shows-as-shutdown branch February 1, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant