| Line 29... |
Line 29... |
| 29 |
; Default installation folder
|
29 |
; Default installation folder
|
| 30 |
; Existing ERG Apps are installed into c:\AFC\${GBE_PACKAGE}
|
30 |
; Existing ERG Apps are installed into c:\AFC\${GBE_PACKAGE}
|
| 31 |
; $DESKTOP\${GBE_PACKAGE} - can be useful
|
31 |
; $DESKTOP\${GBE_PACKAGE} - can be useful
|
| 32 |
; $PROGRAMFILES\ERG\${GBE_PACKAGE} - could be good too
|
32 |
; $PROGRAMFILES\ERG\${GBE_PACKAGE} - could be good too
|
| 33 |
;
|
33 |
;
|
| 34 |
InstallDir c:\AFC\${GBE_PACKAGE}
|
34 |
InstallDir C:\AFC\${GBE_PACKAGE}
|
| 35 |
|
35 |
|
| 36 |
; Get installation folder from registry if available
|
36 |
; Get installation folder from registry if available
|
| 37 |
!define InstallDirReg "Software\ERG\${GBE_PACKAGE}"
|
37 |
!define InstallDirReg "Software\ERG\${GBE_PACKAGE}"
|
| 38 |
InstallDirRegKey HKCU ${InstallDirReg} ""
|
38 |
InstallDirRegKey HKCU ${InstallDirReg} ""
|
| 39 |
|
39 |
|
| 40 |
; Request application privileges for Windows Vista
|
40 |
; Request application privileges for Windows Vista/7
|
| - |
|
41 |
; Need admin privileges to modify registry, otherwise use user
|
| 41 |
RequestExecutionLevel user
|
42 |
RequestExecutionLevel admin
|
| 42 |
|
43 |
|
| 43 |
; Program Group for Shortcuts
|
44 |
; Program Group for Shortcuts
|
| 44 |
!define ProgramGroupBase "ERG"
|
45 |
!define ProgramGroupBase "ERG"
|
| 45 |
!define ProgramGroup "${ProgramGroupBase}\${GBE_PACKAGE}"
|
46 |
!define ProgramGroup "${ProgramGroupBase}\${GBE_PACKAGE}"
|
| 46 |
|
47 |
|
| Line 113... |
Line 114... |
| 113 |
; Create a Short Cut
|
114 |
; Create a Short Cut
|
| 114 |
SetShellVarContext all
|
115 |
SetShellVarContext all
|
| 115 |
CreateDirectory "$SMPROGRAMS\${ProgramGroup}"
|
116 |
CreateDirectory "$SMPROGRAMS\${ProgramGroup}"
|
| 116 |
CreateShortCut "$SMPROGRAMS\${ProgramGroup}\AT91load.lnk" "$INSTDIR\bin\AT91load.exe"
|
117 |
CreateShortCut "$SMPROGRAMS\${ProgramGroup}\AT91load.lnk" "$INSTDIR\bin\AT91load.exe"
|
| 117 |
CreateShortCut "$SMPROGRAMS\${ProgramGroup}\UnInstall ${GBE_PACKAGE}.lnk" "$INSTDIR\Uninstall.exe"
|
118 |
CreateShortCut "$SMPROGRAMS\${ProgramGroup}\UnInstall ${GBE_PACKAGE}.lnk" "$INSTDIR\Uninstall.exe"
|
| - |
|
119 |
IfErrors 0 +2
|
| - |
|
120 |
Abort "Error creating Application Shortcut"
|
| 118 |
|
121 |
|
| 119 |
; Create a Desktop Icon
|
122 |
; Create a Desktop Icon
|
| 120 |
CreateShortCut "$DESKTOP\AT91load.lnk" "$INSTDIR\bin\AT91load.exe"
|
123 |
CreateShortCut "$DESKTOP\AT91load.lnk" "$INSTDIR\bin\AT91load.exe"
|
| - |
|
124 |
IfErrors 0 +2
|
| - |
|
125 |
Abort "Error creating Desktop Icon"
|
| 121 |
|
126 |
|
| 122 |
; Install a data file
|
127 |
; Install a data file
|
| 123 |
CreateDirectory $INSTDIR\data
|
128 |
CreateDirectory $INSTDIR\data
|
| 124 |
SetOutPath "$INSTDIR\data"
|
129 |
SetOutPath "$INSTDIR\data"
|
| 125 |
File /oname=datafile.txt example.nsi
|
130 |
File /oname=datafile.txt example.nsi
|
| 126 |
|
131 |
|
| - |
|
132 |
IfErrors 0 +2
|
| - |
|
133 |
Abort "Error Installing Application"
|
| - |
|
134 |
|
| 127 |
SectionEnd
|
135 |
SectionEnd
|
| 128 |
|
136 |
|
| 129 |
;--------------------------------
|
137 |
;--------------------------------
|
| 130 |
; Uninstaller Sections
|
138 |
; Uninstaller Sections
|
| 131 |
; Un Installer for files installed by the user
|
139 |
; Un Installer for files installed by the user
|
| Line 167... |
Line 175... |
| 167 |
; Could use a GUID but it MUST NOT be copied if this file is copied
|
175 |
; Could use a GUID but it MUST NOT be copied if this file is copied
|
| 168 |
;
|
176 |
;
|
| 169 |
!define UnInstallKeyBase "Software\Microsoft\Windows\CurrentVersion\Uninstall"
|
177 |
!define UnInstallKeyBase "Software\Microsoft\Windows\CurrentVersion\Uninstall"
|
| 170 |
!define UnInstallKey "${UnInstallKeyBase}\${GBE_PACKAGE}"
|
178 |
!define UnInstallKey "${UnInstallKeyBase}\${GBE_PACKAGE}"
|
| 171 |
|
179 |
|
| 172 |
WriteRegStr HKLM ${UnInstallKey} "DisplayName" ${GBE_PACKAGE}
|
180 |
WriteRegStr HKLM ${UnInstallKey} "DisplayName" "${GBE_PACKAGE}"
|
| - |
|
181 |
WriteRegStr HKLM ${UnInstallKey} "DisplayVersion" "${GBE_VERSION_FULL}"
|
| - |
|
182 |
WriteRegStr HKLM ${UnInstallKey} "Publisher" "${GBE_COMPANY}"
|
| - |
|
183 |
WriteRegStr HKLM ${UnInstallKey} "InstallLocation" "$INSTDIR"
|
| 173 |
WriteRegStr HKLM ${UnInstallKey} "UninstallString" '"$INSTDIR\uninstall.exe"'
|
184 |
WriteRegStr HKLM ${UnInstallKey} "UninstallString" '"$INSTDIR\uninstall.exe"'
|
| 174 |
WriteRegDWORD HKLM ${UnInstallKey} "NoModify" 1
|
185 |
WriteRegDWORD HKLM ${UnInstallKey} "NoModify" 1
|
| 175 |
WriteRegDWORD HKLM ${UnInstallKey} "NoRepair" 1
|
186 |
WriteRegDWORD HKLM ${UnInstallKey} "NoRepair" 1
|
| - |
|
187 |
|
| - |
|
188 |
IfErrors 0 +2
|
| - |
|
189 |
Abort "Error creating uninstaller information"
|
| 176 |
|
190 |
|
| 177 |
SectionEnd
|
191 |
SectionEnd
|
| 178 |
|
192 |
|
| 179 |
;--------------------------------
|
193 |
;--------------------------------
|
| 180 |
; Uninistaller section to uninstall keys
|
194 |
; Uninistaller section to uninstall keys
|
| 181 |
; That have been installed as a part of the core installer
|
195 |
; That have been installed as a part of the core installer
|