root / tmp / org.txm.setups / nsis / Include / Integration.nsh @ 3144
Historique | Voir | Annoter | Télécharger (1,21 ko)
1 |
!verbose push 3 |
---|---|
2 |
!ifndef INTEGRATION_INCLUDED |
3 |
!define INTEGRATION_INCLUDED 1 |
4 |
|
5 |
!include "Util.nsh" |
6 |
|
7 |
|
8 |
!define NotifyShell_AssocChanged `System::Call 'SHELL32::SHChangeNotify(i0x8000000,i0,p0,p0)'` ; Notify the shell with SHCNE_ASSOCCHANGED |
9 |
|
10 |
|
11 |
!define UnpinShortcut "!insertmacro UnpinShortcut " |
12 |
!macro UnpinShortcut lnkpath |
13 |
Push "${lnkpath}" |
14 |
${CallArtificialFunction} UnpinShortcut_Implementation |
15 |
!macroend |
16 |
!macro UnpinShortcut_Implementation |
17 |
!include "LogicLib.nsh" |
18 |
!include "Win\COM.nsh" |
19 |
Exch $0 |
20 |
Push $1 |
21 |
!insertmacro ComHlpr_CreateInProcInstance ${CLSID_StartMenuPin} ${IID_IStartMenuPinnedList} r1 "" |
22 |
${If} $1 P<> 0 |
23 |
System::Call 'SHELL32::SHCreateItemFromParsingName(wr0,p0,g"${IID_IShellItem}",*p0r0)' |
24 |
${If} $0 P<> 0 |
25 |
${IStartMenuPinnedList::RemoveFromList} $1 '(r0)' |
26 |
${IUnknown::Release} $0 "" |
27 |
${EndIf} |
28 |
${IUnknown::Release} $1 "" |
29 |
!ifdef NSIS_IX86 | NSIS_AMD64 |
30 |
${Else} |
31 |
!insertmacro ComHlpr_CreateInProcInstance ${CLSID_StartMenuPin} "{ec35e37a-6579-4f3c-93cd-6e62c4ef7636}" r1 "" |
32 |
${If} $1 P<> 0 |
33 |
ExecShellWait /INVOKEIDLIST "unpin" $0 ; WinXP |
34 |
${IUnknown::Release} $1 "" |
35 |
${EndIf} |
36 |
!endif |
37 |
${EndIf} |
38 |
Pop $1 |
39 |
Pop $0 |
40 |
!macroend |
41 |
|
42 |
|
43 |
!endif #!INCLUDED |
44 |
!verbose pop |