Bläddra i källkod

fix(core/updater): pass `/NS` to nsis installer to disable creating shortcuts on updates

closes #9395
amrbashir 1 år sedan
förälder
incheckning
c9b242e2a1
3 ändrade filer med 14 tillägg och 4 borttagningar
  1. 5 0
      .changes/updater-nsis-shortcut.md
  2. 5 0
      .changes/utils-nsis-args-ns.md
  3. 4 4
      core/tauri-utils/src/config.rs

+ 5 - 0
.changes/updater-nsis-shortcut.md

@@ -0,0 +1,5 @@
+---
+"tauri": "patch:bug"
+---
+
+Fix NSIS updater creating new shortcuts on update.

+ 5 - 0
.changes/utils-nsis-args-ns.md

@@ -0,0 +1,5 @@
+---
+"tauri-utils": "patch:enhance"
+---
+
+Adde `/NS` flag in the return of `WindowsUpdateInstallMode::nsis_args`.

+ 4 - 4
core/tauri-utils/src/config.rs

@@ -2587,12 +2587,12 @@ impl WindowsUpdateInstallMode {
 
   /// Returns the associated nsis arguments.
   ///
-  /// [WindowsUpdateInstallMode::Passive] will return `["/P", "/R"]`
-  /// [WindowsUpdateInstallMode::Quiet] will return `["/S", "/R"]`
+  /// [WindowsUpdateInstallMode::Passive] will return `["/P", "/R", "/NS"]`
+  /// [WindowsUpdateInstallMode::Quiet] will return `["/S", "/R", "/NS"]`
   pub fn nsis_args(&self) -> &'static [&'static str] {
     match self {
-      Self::Passive => &["/P", "/R"],
-      Self::Quiet => &["/S", "/R"],
+      Self::Passive => &["/P", "/R", "/NS"],
+      Self::Quiet => &["/S", "/R", "/NS"],
       _ => &[],
     }
   }