Fix cleanup jobs problem for context menus in uninstaller

Close #13373
This commit is contained in:
Bjarke Istrup Pedersen 2023-03-19 11:24:04 +01:00 committed by Don Ho
parent eded6099b0
commit e849406806
2 changed files with 15 additions and 0 deletions

View File

@ -290,6 +290,20 @@ ${MementoSection} "Context Menu Entry" explorerContextMenu
File /oname=$INSTDIR\NppModernShell.dll "..\bin64\NppModernShell.dll"
!endif
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"'
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_02.dll"'
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_03.dll"'
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_04.dll"'
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_05.dll"'
Exec 'regsvr32 /u /s "$INSTDIR\NppShell_06.dll"'
Delete "$INSTDIR\NppShell_01.dll"
Delete "$INSTDIR\NppShell_02.dll"
Delete "$INSTDIR\NppShell_03.dll"
Delete "$INSTDIR\NppShell_04.dll"
Delete "$INSTDIR\NppShell_05.dll"
Delete "$INSTDIR\NppShell_06.dll"
${Else} ; the old "Edit with Notepad++" menu entry still works under Windows 10 and previous OS

View File

@ -70,6 +70,7 @@ Section un.explorerContextMenu
Delete "$INSTDIR\NppShell_05.dll"
Delete "$INSTDIR\NppShell_06.dll"
Exec 'rundll32.exe"$INSTDIR\NppModernShell.dll,UnregisterSparsePackage"'
ReadRegStr $muiVerbStrUn HKLM "SOFTWARE\Classes\*\shell\pintohome" MUIVerb
${UnStrStr} $nppSubStrUn $muiVerbStrUn "Notepad++"