call SHChangeNotify after changing file associations

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3705 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2004-10-11 10:32:23 +00:00
parent 85b2ea48a3
commit 3ed6d7ea22

View file

@ -30,12 +30,17 @@ InstallDir $PROGRAMFILES\NSIS
InstallDirRegKey HKLM Software\NSIS ""
;--------------------------------
;Header Files
!include "MUI.nsh"
!include "Sections.nsh"
;--------------------------------
;Definitions
!define SHCNE_ASSOCCHANGED 0x8000000
!define SHCNF_IDLIST 0
;--------------------------------
;Configuration
@ -183,6 +188,8 @@ Section "NSIS Core Files (required)" SecCore
WriteRegStr HKCR "NSIS.Header\shell\open\command" "" 'notepad.exe "%1"'
no_nshopen:
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
SectionEnd
Section "Script Examples" SecExample
@ -1446,6 +1453,8 @@ Section Uninstall
DeleteRegKey HKCR "NSIS.Script"
DeleteRegKey HKCR "NSIS.Header"
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS"
DeleteRegKey HKLM "Software\NSIS"