mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-03 10:11:15 +02:00
* fix(bundler/nsis): delete app data of current user when uninstall, closes #7588 * fix(bundler/nsis): delete app data of current user when uninstall, closes #7588 * Update .changes/fix-nsis-uninstall-delete-app-data.md ---------
This commit is contained in:
5
.changes/fix-nsis-uninstall-delete-app-data.md
Normal file
5
.changes/fix-nsis-uninstall-delete-app-data.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri-bundler': 'patch:bug'
|
||||
---
|
||||
|
||||
On Windows, Fix NSIS uninstaller deleting the wrong application data if the delete the application data checkbox is checked.
|
||||
@@ -645,12 +645,6 @@ Section Uninstall
|
||||
; Remove desktop shortcuts
|
||||
Delete "$DESKTOP\${MAINBINARYNAME}.lnk"
|
||||
|
||||
; Delete app data
|
||||
${If} $DeleteAppDataCheckboxState == 1
|
||||
RmDir /r "$APPDATA\${BUNDLEID}"
|
||||
RmDir /r "$LOCALAPPDATA\${BUNDLEID}"
|
||||
${EndIf}
|
||||
|
||||
; Remove registry information for add/remove programs
|
||||
!if "${INSTALLMODE}" == "both"
|
||||
DeleteRegKey SHCTX "${UNINSTKEY}"
|
||||
@@ -662,6 +656,13 @@ Section Uninstall
|
||||
|
||||
DeleteRegValue HKCU "${MANUPRODUCTKEY}" "Installer Language"
|
||||
|
||||
; Delete app data
|
||||
${If} $DeleteAppDataCheckboxState == 1
|
||||
SetShellVarContext current
|
||||
RmDir /r "$APPDATA\${BUNDLEID}"
|
||||
RmDir /r "$LOCALAPPDATA\${BUNDLEID}"
|
||||
${EndIf}
|
||||
|
||||
${GetOptions} $CMDLINE "/P" $R0
|
||||
IfErrors +2 0
|
||||
SetAutoClose true
|
||||
|
||||
Reference in New Issue
Block a user