NSIS: remove icons and reg right after the exe
Remove the program's registry and icons right after the main exe, so if it fails to remove another file and aborts, it won't leave invalid entires. The user could run the uninstaller at another time (a restart should fix any file locking issues).
This commit is contained in:
parent
7452327850
commit
cc7ab995af
|
|
@ -58,10 +58,6 @@ Section "un.Program Files" SectionUninstallProgram
|
|||
; Try to delete the EXE as the first step - if it's in use, don't remove anything else
|
||||
!insertmacro DeleteRetryAbort "$INSTDIR\${PROGEXE}"
|
||||
|
||||
; Include and then delete the uninstall nsh file
|
||||
!include "${UNLIST}"
|
||||
!delfile "${UNLIST}"
|
||||
|
||||
; Clean up "Dektop Icon"
|
||||
!insertmacro MULTIUSER_GetCurrentUserString $0
|
||||
!insertmacro DeleteRetryAbort "$DESKTOP\${PRODUCT_NAME}$0.lnk"
|
||||
|
|
@ -88,6 +84,10 @@ Section "un.Program Files" SectionUninstallProgram
|
|||
DeleteRegValue SHCTX "SOFTWARE\Classes\.webp\OpenWithProgids" "${PRODUCT_NAME}HTML"
|
||||
${endif}
|
||||
${endif}
|
||||
|
||||
; Include and then delete the uninstall nsh file
|
||||
!include "${UNLIST}"
|
||||
!delfile "${UNLIST}"
|
||||
SectionEnd
|
||||
|
||||
SectionGroup /e "un.$UserName's Files" SectionGroupRemoveUserFiles
|
||||
|
|
|
|||
Loading…
Reference in New Issue