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

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

closes #9395

* Update .changes/utils-nsis-args-ns.md [skip ci]

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
This commit is contained in:
Amr Bashir
2024-07-09 02:57:31 +03:00
committed by GitHub
parent 0aa0378c8d
commit 220bf92ed8
3 changed files with 14 additions and 4 deletions

View File

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

View File

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

View File

@@ -2756,12 +2756,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"],
_ => &[],
}
}