Support MSI Updates with Restart Manager#345
Merged
Enigmatrix merged 3 commits intomainfrom Feb 1, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
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.

This PR enhances how the application handles Windows MSI updates by properly responding to Restart Manager requests:
WM_QUERYENDSESSIONwith a positive response when receivingENDSESSION_CLOSEAPPWM_ENDSESSIONwithENDSESSION_CLOSEAPPThese 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.