Fix unregister modern context menu syntax error and remove concerning binaries during uninstallation

pull/13375/head^2
Don Ho 2 years ago
parent e849406806
commit 9c15bdc236

@ -289,7 +289,7 @@ ${MementoSection} "Context Menu Entry" explorerContextMenu
File /oname=$INSTDIR\NppModernShell.msix "..\bin64\NppModernShell.msix"
File /oname=$INSTDIR\NppModernShell.dll "..\bin64\NppModernShell.dll"
!endif
Exec 'rundll32.exe"$INSTDIR\NppModernShell.dll,RegisterSparsePackage"'
Exec 'rundll32.exe "$INSTDIR\NppModernShell.dll",RegisterSparsePackage'
; Make sure old NppShell dll's are unregistered and removed
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_01.dll"'

@ -41,11 +41,13 @@ Function un.onUninstSuccess
RMDir "$INSTDIR\plugins\"
RMDir "$INSTDIR\updater\"
RMDir "$INSTDIR\autoCompletion\"
RMDir "$INSTDIR\functionList\"
RMDir "$INSTDIR\themes\"
RMDir "$INSTDIR\"
RMDir "$APPDATA\${APPNAME}\plugins\"
RMDir "$installPath\userDefineLangs\"
RMDir "$installPath\themes\" ; if files are kept because of $keepUserData, this will not be deleted
RMDir "$installPath\userDefineLangs\"
RMDir "$installPath\"
FunctionEnd
@ -70,7 +72,9 @@ Section un.explorerContextMenu
Delete "$INSTDIR\NppShell_05.dll"
Delete "$INSTDIR\NppShell_06.dll"
Exec 'rundll32.exe"$INSTDIR\NppModernShell.dll,UnregisterSparsePackage"'
Exec 'rundll32.exe "$INSTDIR\NppModernShell.dll",UnregisterSparsePackage'
;Delete "$INSTDIR\NppModernShell.dll"
;Delete "$INSTDIR\NppModernShell.msix"
ReadRegStr $muiVerbStrUn HKLM "SOFTWARE\Classes\*\shell\pintohome" MUIVerb
${UnStrStr} $nppSubStrUn $muiVerbStrUn "Notepad++"
@ -301,6 +305,12 @@ Section Uninstall
SetShellVarContext all ; make context for all user
${endIf}
; In order to not delete context menu binary before we unregistered it,
; we delete them at the end
Delete "$INSTDIR\NppModernShell.dll"
Delete "$INSTDIR\NppModernShell.msix"
; Remove remaining directories
RMDir /r "$INSTDIR\plugins\disabled\"
RMDir "$INSTDIR\plugins\APIs\"

Loading…
Cancel
Save