From 4a54029cac3b7de0d78b3ecfd3b8a19d288e610b Mon Sep 17 00:00:00 2001 From: fufesou Date: Sat, 27 Jun 2026 16:45:27 +0800 Subject: [PATCH] fix(update): msi, norestart (#15440) * fix(update): msi, norestart Signed-off-by: fufesou * fix(update): escape path Signed-off-by: fufesou --------- Signed-off-by: fufesou --- src/platform/windows.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/platform/windows.rs b/src/platform/windows.rs index 5ced84e38..b6b5b39d9 100644 --- a/src/platform/windows.rs +++ b/src/platform/windows.rs @@ -3647,10 +3647,9 @@ pub fn update_to(file: &str) -> ResultType<()> { // `1` and `3` must be done in custom actions. // We need also to handle the command line parsing to find the tray processes. pub fn update_me_msi(msi: &str, quiet: bool) -> ResultType<()> { - let cmds = format!( - "chcp 65001 && msiexec /i {msi} {}", - if quiet { "/qn LAUNCH_TRAY_APP=N" } else { "" } - ); + let quiet_args = if quiet { " /qn LAUNCH_TRAY_APP=N" } else { "" }; + let cmds = + format!("chcp 65001 && msiexec /i \"{msi}\"{quiet_args} REBOOT=ReallySuppress /norestart"); run_cmds(cmds, false, "update-msi")?; Ok(()) }