Skip to content

Commit

Permalink
fix(bundler/nsis): fix error message appears even after successful un…
Browse files Browse the repository at this point in the history
…install, closes #7317 (#7361)

* fix(bundler/nsis): Uninstall the previous installation package

* Update .changes/fix-nsis-uninstall-previous-version.md

---------

Co-authored-by: Amr Bashir <[email protected]>
  • Loading branch information
luoffei and amrbashir authored Jul 8, 2023
1 parent 46df2c9 commit 0ae53f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/fix-nsis-uninstall-previous-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'tauri-bundler': 'patch:bug'
---

On Windows, fix NSIS installer showing an error dialog even when the previous version was uninstalled sucessfully.
3 changes: 1 addition & 2 deletions tooling/bundler/src/bundle/windows/templates/installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,14 @@ Function PageLeaveReinstall
reinst_uninstall:
HideWindow
ClearErrors
ExecWait '$R1 /P _?=$4' $0

${If} $R5 == "wix"
ReadRegStr $R1 HKLM "$R6" "UninstallString"
ExecWait '$R1' $0
${Else}
ReadRegStr $4 SHCTX "${MANUPRODUCTKEY}" ""
ReadRegStr $R1 SHCTX "${UNINSTKEY}" "UninstallString"
ExecWait '$R1 _?=$4' $0
ExecWait '$R1 /P _?=$4' $0
${EndIf}

BringToFront
Expand Down

0 comments on commit 0ae53f4

Please sign in to comment.