瀏覽代碼

fix(windows): fix command bug in update elevated task (fix #11216) (#11217)

Krishna Chaitanya 10 月之前
父節點
當前提交
858b3516a0
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 5 0
      .changes/fix-elevated-update-cmd.md
  2. 1 1
      crates/tauri-bundler/src/bundle/windows/msi/update-task.xml

+ 5 - 0
.changes/fix-elevated-update-cmd.md

@@ -0,0 +1,5 @@
+---
+"tauri-bundler": patch:bug
+---
+
+On Windows, fixed command arguments for `bundle -> windows -> msi -> elevatedUpdateTask`. to work with spaces in `productName`

+ 1 - 1
crates/tauri-bundler/src/bundle/windows/msi/update-task.xml

@@ -37,7 +37,7 @@
   <Actions Context="Author">
     <Exec>
       <Command>cmd.exe</Command>
-      <Arguments>/c "%SYSTEMROOT%\System32\msiexec.exe /i %TEMP%\\{{product_name}}.msi {{msiexec_args}} /promptrestart"</Arguments>
+      <Arguments>/c ^"%SYSTEMROOT%\System32\msiexec.exe /i "%TEMP%\\{{product_name}}.msi" {{msiexec_args}} /promptrestart^"</Arguments>
     </Exec>
   </Actions>
 </Task>