Don't use HKCR when uninstalling file associations because it will delete keys under both HKCU and HKLM, we only want to delete the keys we created!

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6508 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2014-06-29 19:01:14 +00:00
parent 4da72aaf77
commit 91756476d6

View file

@ -269,7 +269,7 @@ ${MementoSection} "NSIS Core Files (required)" SecCore
WriteRegStr HKCR "NSIS.Header\shell\open\command" "" 'notepad.exe "%1"' WriteRegStr HKCR "NSIS.Header\shell\open\command" "" 'notepad.exe "%1"'
${EndIf} ${EndIf}
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)' System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, p0, p0)'
${MementoSectionEnd} ${MementoSectionEnd}
@ -1029,18 +1029,18 @@ Section Uninstall
DetailPrint "Deleting Registry Keys..." DetailPrint "Deleting Registry Keys..."
SetDetailsPrint listonly SetDetailsPrint listonly
ReadRegStr $R0 HKCR ".nsi" "" !macro AssocDeleteFileExtAndProgId _hkey _dotext _pid
StrCmp $R0 "NSIS.Script" 0 +2 ReadRegStr $R0 ${_hkey} "Software\Classes\${_dotext}" ""
DeleteRegKey HKCR ".nsi" StrCmp $R0 "${_pid}" 0 +2
DeleteRegKey ${_hkey} "Software\Classes\${_dotext}"
ReadRegStr $R0 HKCR ".nsh" "" DeleteRegKey ${_hkey} "Software\Classes\${_pid}"
StrCmp $R0 "NSIS.Header" 0 +2 !macroend
DeleteRegKey HKCR ".nsh"
DeleteRegKey HKCR "NSIS.Script" !insertmacro AssocDeleteFileExtAndProgId HKLM ".nsi" "NSIS.Script"
DeleteRegKey HKCR "NSIS.Header" !insertmacro AssocDeleteFileExtAndProgId HKLM ".nsh" "NSIS.Header"
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)' System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, p0, p0)'
DeleteRegKey HKLM "${REG_UNINST_KEY}" DeleteRegKey HKLM "${REG_UNINST_KEY}"
DeleteRegKey HKLM "Software\NSIS" DeleteRegKey HKLM "Software\NSIS"