Added UnpinShortcut and NotifyShell_AssocChanged macros

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7183 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2020-05-21 00:44:39 +00:00
parent ea50284c18
commit 3c47165946
6 changed files with 63 additions and 16 deletions

View file

@ -49,12 +49,7 @@ RequestExecutionLevel admin
!include "Memento.nsh"
!include "WordFunc.nsh"
!include "Util.nsh"
;--------------------------------
;Definitions
!define SHCNE_ASSOCCHANGED 0x8000000
!define SHCNF_IDLIST 0
!include "Integration.nsh"
;--------------------------------
;Configuration
@ -213,6 +208,7 @@ ${MementoSection} "NSIS Core Files (required)" SecCore
File ..\Include\MultiUser.nsh
File ..\Include\VB6RunTime.nsh
File ..\Include\Util.nsh
File ..\Include\Integration.nsh
File ..\Include\WinCore.nsh
SetOutPath $INSTDIR\Include\Win
@ -296,7 +292,7 @@ ${MementoSection} "NSIS Core Files (required)" SecCore
WriteRegStr HKCR "NSIS.Header\shell\open\command" "" 'notepad.exe "%1"'
${EndIf}
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, p0, p0)'
${NotifyShell_AssocChanged}
${MementoSectionEnd}
@ -1071,7 +1067,7 @@ Section Uninstall
!insertmacro AssocDeleteFileExtAndProgId HKLM ".nsi" "NSIS.Script"
!insertmacro AssocDeleteFileExtAndProgId HKLM ".nsh" "NSIS.Header"
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, p0, p0)'
${NotifyShell_AssocChanged}
DeleteRegKey HKLM "${REG_UNINST_KEY}"
DeleteRegKey HKLM "Software\NSIS"