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:
bitraid 2018-11-06 12:30:34 +02:00
parent 7452327850
commit cc7ab995af
No known key found for this signature in database
GPG Key ID: 140D99CA504654D3
1 changed files with 4 additions and 4 deletions

View File

@ -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