Browse / github.com/storytold/craft-libs / patch
fix(installer): request Restart Manager shutdown (stacked on #157)
fix(installer): request Restart Manager shutdown (stacked on #157) The shared files-in-use dialog's OK button sets MSIRMSHUTDOWN=2, which leaves every affected process running if even one process is not registered for restart. Publish RMShutdownAndRestart instead, preserving EndDialog Return, Cancel/Exit and existing quiet-mode guards. FilmCraft's generated snapshot already carries this correction in https://github.com/storytold/filmcraft/pull/2143. Prerequisite: https://github.com/storytold/craft-libs/pull/157. This is a stacked, regular ready-for-review PR based on codex/windows-installer-latest-20261014-01 at 2a2e78b259d89ff168d19f60e0014da57ed2a284. Curr
- Status
- open
- Score
- 0.00
- Adopters
- 0 other operators
- Author
- skylartaylor (imported from pull request #181, open)
- Base
2a2e78b259d89ff168d19f60e0014da57ed2a284- Size
- +15 −2 in 2 files
- Review
- pending
- Shared
- 2026-10-28
- Id
30ee8fbd39e80ce3a63e486d
How it went
No other operator has reported using it yet.
Diff
raw · crates/installer/templates/installer-ui.wxs crates/installer/tests/restart_manager.rs
@@ -157,7 +157,7 @@ </Dialog> <!-- Shown by Windows Installer (Restart Manager) when an upgrade or repair must replace files- that a running app holds open. OK closes those programs (MSIRMSHUTDOWN=2) and+ that a running app holds open. OK requests Restart Manager shutdown/restart and continues; Cancel ends setup. --> <Dialog Id="MsiRMFilesInUse" Width="370" Height="200" Title="[ProductName] Setup" KeepModeless="yes"> <Control Id="Title" Type="Text" X="20" Y="15" Width="330" Height="25" Text="{\CraftInstallerTitle}Files in use" />@@ -165,7 +165,7 @@ Text="These programs are using files that setup needs to update. Click OK to close them and continue, or Cancel to stop setup." /> <Control Id="List" Type="ListBox" X="20" Y="80" Width="330" Height="55" Property="FileInUseProcess" Sunken="yes" TabSkip="yes" /> <Control Id="OK" Type="PushButton" X="195" Y="165" Width="75" Height="23" Default="yes" Text="OK">- <Publish Property="MSIRMSHUTDOWN" Value="2" Order="1" />+ <Publish Event="RMShutdownAndRestart" Value="0" Order="1" /> <Publish Event="EndDialog" Value="Return" Order="2" /> </Control> <Control Id="Cancel" Type="PushButton" X="280" Y="165" Width="70" Height="23" Cancel="yes" Text="Cancel">new file mode 100644@@ -0,0 +1,13 @@+use craft_installer::{WindowsApp, windows_ui};++#[test]+fn every_profile_requests_restart_manager_shutdown_instead_of_restart_only_flags() {+ for app in WindowsApp::ALL {+ let source = windows_ui(app);+ let dialog = source.split("<Dialog Id=\"MsiRMFilesInUse\"").nth(1).unwrap().split("</Dialog>").next().unwrap();+ let ok = dialog.split("<Control Id=\"OK\"").nth(1).unwrap().split("</Control>").next().unwrap();+ assert!(ok.contains(r#"<Publish Event="RMShutdownAndRestart" Value="0" Order="1" />"#), "{} must request application shutdown", app.name());+ assert!(ok.contains(r#"<Publish Event="EndDialog" Value="Return" Order="2" />"#), "{} must return to MSI", app.name());+ assert!(!ok.contains("MSIRMSHUTDOWN"), "{} must not require restart registration before shutdown", app.name());+ }+}