File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed
tooling/bundler/src/bundle/windows/templates Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' tauri-bundler ' : ' patch:bug'
3+ ---
4+
5+ On Windows, fix NSIS installer identifying a previous NSIS-installed app as WiX-installed app and then fails to uninstall it.
Original file line number Diff line number Diff line change 1+ Unicode true
2+ SetCompressor /SOLID lzma
3+
14!include MUI2.nsh
25!include FileFunc.nsh
36!include x64.nsh
47!include WordFunc.nsh
8+ !include " StrFunc.nsh"
9+ ${StrCase}
10+ ${StrLoc}
511
612!define MANUFACTURER " {{manufacturer}}"
713!define PRODUCTNAME " {{product_name}}"
3137Name " ${PRODUCTNAME}"
3238BrandingText " {{copyright}}"
3339OutFile " ${OUTFILE}"
34- Unicode true
35- SetCompressor /SOLID lzma
3640
3741VIProductVersion " ${VERSIONWITHBUILD}"
3842VIAddVersionKey " ProductName" " ${PRODUCTNAME}"
@@ -135,7 +139,11 @@ Function PageReinstall
135139 ReadRegStr $R0 HKLM " SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$1" " DisplayName"
136140 ReadRegStr $R1 HKLM " SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$1" " Publisher"
137141 StrCmp " $R0$R1" " ${PRODUCTNAME}${MANUFACTURER}" 0 wix_loop
138- StrCpy $R5 " wix"
142+ ReadRegStr $R0 HKLM " SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$1" " UninstallString"
143+ ${StrCase} $R1 $R0 " L"
144+ ${StrLoc} $R0 $R1 " msiexec" " >"
145+ StrCmp $R0 0 0 wix_done
146+ StrCpy $R7 " wix"
139147 StrCpy $R6 " SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$1"
140148 Goto compare_version
141149 wix_done:
@@ -149,7 +157,7 @@ Function PageReinstall
149157 ; and modify the messages presented to the user accordingly
150158 compare_version:
151159 StrCpy $R4 " $(older)"
152- ${If} $R5 == " wix"
160+ ${If} $R7 == " wix"
153161 ReadRegStr $R0 HKLM " $R6" " DisplayVersion"
154162 ${Else}
155163 ReadRegStr $R0 SHCTX " ${UNINSTKEY}" " DisplayVersion"
@@ -244,7 +252,7 @@ Function PageLeaveReinstall
244252 HideWindow
245253 ClearErrors
246254
247- ${If} $R5 == " wix"
255+ ${If} $R7 == " wix"
248256 ReadRegStr $R1 HKLM " $R6" " UninstallString"
249257 ExecWait ' $R1' $0
250258 ${Else}
You can’t perform that action at this time.
0 commit comments