mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-02-06 15:46:51 +00:00
feat(uninstaller): remove autostart entry during uninstallation (#12643)
* feat(uninstaller): remove autostart entry during uninstallation Signed-off-by: animeshchaudri <animeshchaudhri3@gmail.com> * add change file * check when not updating * delete registry value only if install mode is "currentUser" --------- Signed-off-by: animeshchaudri <animeshchaudhri3@gmail.com> Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
parent
eec08a18b6
commit
2b960dfd9f
5
.changes/remove-autostart-nsis-uninstall.md
Normal file
5
.changes/remove-autostart-nsis-uninstall.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri-bundler": patch:bug
|
||||
---
|
||||
|
||||
Remove the autostart plugin registry entry when the app is uninstalled (NSIS only).
|
||||
@ -835,6 +835,16 @@ Section Uninstall
|
||||
DeleteRegKey HKCU "${UNINSTKEY}"
|
||||
!endif
|
||||
|
||||
; Removes the Autostart entry for ${PRODUCTNAME} from the HKCU Run key if it exists.
|
||||
; This ensures the program does not launch automatically after uninstallation if it exists.
|
||||
; If it doesn't exist, it does nothing.
|
||||
; We do this when not updating (to preserve the registry value on updates)
|
||||
; and when the installation is for the current user only - as it is difficult to delete registry values for other users or for the local machine
|
||||
${If} $UpdateMode <> 1
|
||||
${AndIf} "${INSTALLMODE}" == "currentUser"
|
||||
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "${PRODUCTNAME}"
|
||||
${EndIf}
|
||||
|
||||
; Delete app data if the checkbox is selected
|
||||
; and if not updating
|
||||
${If} $DeleteAppDataCheckboxState = 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user