1 |
; Address Bar XP SP3 |
2 |
; |
3 |
; Douglas Thrift |
4 |
; |
5 |
; $Id$ |
6 |
|
7 |
!define NAME "Address Bar XP SP3" |
8 |
|
9 |
Name "${NAME}" |
10 |
Outfile "addressbar.exe" |
11 |
SetCompressor /SOLID lzma |
12 |
ShowInstDetails show |
13 |
ShowUninstDetails show |
14 |
XPStyle on |
15 |
|
16 |
!define LINK "http://svn.douglasthrift.net/trac/repos/wiki/AddressBarXPSP3" |
17 |
!define UNINST "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}" |
18 |
|
19 |
!define MULTIUSER_EXECUTIONLEVEL "Highest" |
20 |
!define MULTIUSER_INSTALLMODE_COMMANDLINE |
21 |
!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "${UNINST}" |
22 |
!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME "UninstallString" |
23 |
!define MULTIUSER_INSTALLMODE_INSTDIR "${NAME}" |
24 |
!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "${UNINST}" |
25 |
!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME "InstallLocation" |
26 |
!define MULTIUSER_MUI |
27 |
|
28 |
!include "MultiUser.nsh" |
29 |
!include "MUI2.nsh" |
30 |
|
31 |
!define MUI_FINISHPAGE_LINK "${NAME}" |
32 |
!define MUI_FINISHPAGE_LINK_LOCATION "${LINK}" |
33 |
!define MUI_FINISHPAGE_NOAUTOCLOSE |
34 |
!define MUI_UNFINISHPAGE_NOAUTOCLOSE |
35 |
|
36 |
!insertmacro MUI_PAGE_WELCOME |
37 |
!insertmacro MUI_PAGE_LICENSE "terms.txt" |
38 |
!insertmacro MULTIUSER_PAGE_INSTALLMODE |
39 |
!insertmacro MUI_PAGE_DIRECTORY |
40 |
!insertmacro MUI_PAGE_INSTFILES |
41 |
!insertmacro MUI_PAGE_FINISH |
42 |
|
43 |
!insertmacro MUI_UNPAGE_WELCOME |
44 |
!insertmacro MUI_UNPAGE_CONFIRM |
45 |
!insertmacro MUI_UNPAGE_INSTFILES |
46 |
!insertmacro MUI_UNPAGE_FINISH |
47 |
|
48 |
!insertmacro MUI_LANGUAGE "English" |
49 |
|
50 |
Section "${NAME}" |
51 |
SetOutPath "$INSTDIR" |
52 |
File "addressbar.dll" |
53 |
File "install.txt" |
54 |
File "terms.txt" |
55 |
WriteUninstaller "uninst.exe" |
56 |
StrCmp $MultiUser.InstallMode "AllUsers" AllUsers |
57 |
WriteRegStr HKCU "${UNINST}" "DisplayName" "${NAME}" |
58 |
WriteRegStr HKCU "${UNINST}" "UninstallString" "$INSTDIR\uninst.exe" |
59 |
WriteRegStr HKCU "${UNINST}" "InstallLocation" "$INSTDIR" |
60 |
WriteRegStr HKCU "${UNINST}" "Publisher" "${NAME}" |
61 |
WriteRegStr HKCU "${UNINST}" "URLInfoAbout" "${LINK}" |
62 |
WriteRegDWORD HKCU "${UNINST}" "NoModify" 1 |
63 |
WriteRegDWORD HKCU "${UNINST}" "NoRepair" 1 |
64 |
Goto Register |
65 |
|
66 |
AllUsers: |
67 |
WriteRegStr HKLM "${UNINST}" "DisplayName" "${NAME}" |
68 |
WriteRegStr HKLM "${UNINST}" "UninstallString" "$INSTDIR\uninst.exe" |
69 |
WriteRegStr HKLM "${UNINST}" "InstallLocation" "$INSTDIR" |
70 |
WriteRegStr HKLM "${UNINST}" "Publisher" "${NAME}" |
71 |
WriteRegStr HKLM "${UNINST}" "URLInfoAbout" "${LINK}" |
72 |
WriteRegDWORD HKLM "${UNINST}" "NoModify" 1 |
73 |
WriteRegDWORD HKLM "${UNINST}" "NoRepair" 1 |
74 |
|
75 |
Register: |
76 |
ExecWait '"$SYSDIR\regsvr32.exe" /s "$INSTDIR\addressbar.dll"' |
77 |
SectionEnd |
78 |
|
79 |
Section "un.${NAME}" |
80 |
ExecWait '"$SYSDIR\regsvr32.exe" /s /u "$INSTDIR\addressbar.dll"' |
81 |
Delete /REBOOTOK "$INSTDIR\addressbar.dll" |
82 |
Delete /REBOOTOK "$INSTDIR\install.txt" |
83 |
Delete /REBOOTOK "$INSTDIR\terms.txt" |
84 |
Delete /REBOOTOK "$INSTDIR\uninst.exe" |
85 |
RMDir /REBOOTOK "$INSTDIR" |
86 |
StrCmp $MultiUser.InstallMode "AllUsers" AllUsers |
87 |
DeleteRegKey HKCU "${UNINST}" |
88 |
Goto Done |
89 |
|
90 |
AllUsers: |
91 |
DeleteRegKey HKLM "${UNINST}" |
92 |
|
93 |
Done: |
94 |
SectionEnd |
95 |
|
96 |
Function .onInit |
97 |
!insertmacro MULTIUSER_INIT |
98 |
FunctionEnd |
99 |
|
100 |
Function un.onInit |
101 |
!insertmacro MULTIUSER_UNINIT |
102 |
FunctionEnd |