From f116ee6a12bd683dab191b5e031a02ba3db98214 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Fri, 22 Jul 2022 11:59:57 -0300 Subject: [PATCH] feat(updater): use full path to msiexec (#4738) --- .changes/msiexec-full-path.md | 5 +++++ core/tauri/src/updater/core.rs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changes/msiexec-full-path.md diff --git a/.changes/msiexec-full-path.md b/.changes/msiexec-full-path.md new file mode 100644 index 000000000..1cb2276b0 --- /dev/null +++ b/.changes/msiexec-full-path.md @@ -0,0 +1,5 @@ +--- +"tauri": patch +--- + +Use full path to `msiexec.exe` in the updater. diff --git a/core/tauri/src/updater/core.rs b/core/tauri/src/updater/core.rs index 303c60994..13a7c5ae1 100644 --- a/core/tauri/src/updater/core.rs +++ b/core/tauri/src/updater/core.rs @@ -802,7 +802,7 @@ fn copy_files_and_run( "Start-Process", "-Wait", "-FilePath", - "msiexec", + "C:\\Windows\\system32\\msiexec.exe", "-ArgumentList", ]) .arg("/i,") @@ -814,7 +814,7 @@ fn copy_files_and_run( if powershell_install_res.is_err() { // fallback to running msiexec directly - relaunch won't be available // we use this here in case powershell fails in an older machine somehow - let _ = Command::new("msiexec.exe") + let _ = Command::new("C:\\Windows\\system32\\msiexec.exe") .arg("/i") .arg(found_path) .args(msiexec_args)