fix(nsis): use runtime ${If} check to clean up deep link on uninstall (#10103)

This commit is contained in:
Tony 2024-06-24 15:48:02 +08:00 committed by GitHub
parent e13ea53a26
commit faf282ca6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
"tauri-bundler": "patch:bug"
---
Fix NSIS uninstaller failing to clean up deep links

View File

@ -679,9 +679,9 @@ Section Uninstall
; Delete deep links
{{#each deep_link_protocols as |protocol| ~}}
ReadRegStr $R7 SHCTX "Software\Classes\\{{protocol}}\shell\open\command" ""
!if $R7 == "$\"$INSTDIR\${MAINBINARYNAME}.exe$\" $\"%1$\""
${If} $R7 == "$\"$INSTDIR\${MAINBINARYNAME}.exe$\" $\"%1$\""
DeleteRegKey SHCTX "Software\Classes\\{{protocol}}"
!endif
${EndIf}
{{/each}}