1 ;OpenAFS Install Script for NSIS
3 ; Written by Rob Murawski <rsm4@ieee.org>
6 ;NSIS Modern User Interface version 1.63
7 ;MultiLanguage Example Script
8 ;Written by Joost Verburg
10 ; Read in the environment information
11 !include ${INCLUDEDIR}\nsi-includes.nsi
12 ; Define DEBUG if building a DEBUG installer
14 ; This version compiles with NSIS v2.0
18 Name "OpenAFS ${AFS_VERSION} ${__DATE__} ${__TIME__}"
20 Name "OpenAFS ${AFS_VERSION} ${__DATE__} ${__TIME__} Checked/Debug"
21 !endif ; End DEBUG/!DEBUG
24 Name "OpenAFS ${AFS_VERSION}"
26 Name "OpenAFS ${AFS_VERSION} Checked/Debug"
27 !endif ; End DEBUG/!DEBUG
29 VIProductVersion "${AFS_VERSION}.00"
30 VIAddVersionKey "ProductName" "OpenAFS"
31 VIAddVersionKey "CompanyName" "OpenAFS.org"
32 VIAddVersionKey "ProductVersion" ${AFS_VERSION}
33 VIAddVersionKey "FileVersion" ${AFS_VERSION}
34 VIAddVersionKey "FileDescription" "OpenAFS for Windows Installer"
35 VIAddVersionKey "LegalCopyright" "(C)2000-2004"
37 VIAddVersionKey "PrivateBuild" "Checked/Debug"
44 ;--------------------------------
47 !define REPLACEDLL_NOREGISTER
51 OutFile "${AFS_DESTDIR}\WinInstall\OpenAFSforWindows.exe"
53 OutFile "${AFS_DESTDIR}\WinInstall\OpenAFSforWindows-DEBUG.exe"
57 !define MUI_ICON "..\..\client_config\afs_config.ico"
58 !define MUI_UNICON "..\..\client_config\afs_config.ico"
59 !define AFS_COMPANY_NAME "OpenAFS"
60 !define AFS_PRODUCT_NAME "OpenAFS"
61 !define AFS_REGKEY_ROOT "Software\TransarcCorporation"
64 ;Folder selection page
65 InstallDir "$PROGRAMFILES\OpenAFS" ; Install to shorter path
67 ;Remember install folder
68 InstallDirRegKey HKCU ${AFS_REGKEY_ROOT} ""
70 ;Remember the installer language
71 !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
72 !define MUI_LANGDLL_REGISTRY_KEY ${AFS_REGKEY_ROOT}
73 !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
76 !define AFS_CLIENT_BUILDDIR "${AFS_DESTDIR}\root.client\usr\vice\etc"
77 !define AFS_WININSTALL_DIR "${AFS_DESTDIR}\WinInstall\Config"
78 !define AFS_BUILD_INCDIR "${AFS_DESTDIR}\include"
79 !define AFS_CLIENT_LIBDIR "${AFS_DESTDIR}\lib"
80 !define AFS_SERVER_BUILDDIR "${AFS_DESTDIR}\root.server\usr\afs\bin"
81 !define AFS_ETC_BUILDDIR "${AFS_DESTDIR}\etc"
82 !define SYSTEMDIR "$%SystemRoot%\System32"
84 ;--------------------------------
85 ;Modern UI Configuration
87 ;!define MUI_LICENSEPAGE
88 !define MUI_CUSTOMPAGECOMMANDS
89 !define MUI_WELCOMEPAGE
90 !define MUI_COMPONENTSPAGE
91 !define MUI_COMPONENTSPAGE_SMALLDESC
92 !define MUI_DIRECTORYPAGE
94 !define MUI_ABORTWARNING
95 !define MUI_FINISHPAGE
97 !define MUI_UNINSTALLER
98 !define MUI_UNCONFIRMPAGE
101 !insertmacro MUI_PAGE_WELCOME
102 !insertmacro MUI_PAGE_COMPONENTS
103 !insertmacro MUI_PAGE_DIRECTORY
104 Page custom AFSPageGetCellServDB
105 Page custom AFSPageGetCellName
106 !insertmacro MUI_PAGE_INSTFILES
107 !insertmacro MUI_PAGE_FINISH
109 ;LicenseData "Licenses.rtf"
110 ;--------------------------------
113 !insertmacro MUI_LANGUAGE "English"
114 ;!insertmacro MUI_LANGUAGE "French"
115 !insertmacro MUI_LANGUAGE "German"
116 !insertmacro MUI_LANGUAGE "Spanish"
117 !insertmacro MUI_LANGUAGE "SimpChinese"
118 !insertmacro MUI_LANGUAGE "TradChinese"
119 !insertmacro MUI_LANGUAGE "Japanese"
120 !insertmacro MUI_LANGUAGE "Korean"
121 ;!insertmacro MUI_LANGUAGE "Italian"
122 ;!insertmacro MUI_LANGUAGE "Dutch"
123 ;!insertmacro MUI_LANGUAGE "Danish"
124 ;!insertmacro MUI_LANGUAGE "Greek"
125 ;!insertmacro MUI_LANGUAGE "Russian"
126 !insertmacro MUI_LANGUAGE "PortugueseBR"
127 ;!insertmacro MUI_LANGUAGE "Polish"
128 ;!insertmacro MUI_LANGUAGE "Ukrainian"
129 ;!insertmacro MUI_LANGUAGE "Czech"
130 ;!insertmacro MUI_LANGUAGE "Slovak"
131 ;!insertmacro MUI_LANGUAGE "Croatian"
132 ;!insertmacro MUI_LANGUAGE "Bulgarian"
133 ;!insertmacro MUI_LANGUAGE "Hungarian"
134 ;!insertmacro MUI_LANGUAGE "Thai"
135 ;!insertmacro MUI_LANGUAGE "Romanian"
136 ;!insertmacro MUI_LANGUAGE "Macedonian"
137 ;!insertmacro MUI_LANGUAGE "Turkish"
139 ;--------------------------------
143 LangString DESC_SecCopyUI ${LANG_ENGLISH} "OpenAFS for Windows: English"
144 ;LangString DESC_SecCopyUI ${LANG_FRENCH} "OpenAFS for Windows: French"
145 LangString DESC_SecCopyUI ${LANG_GERMAN} "OpenAFS for Windows: German"
146 LangString DESC_SecCopyUI ${LANG_SPANISH} "OpenAFS for Windows: Spanish"
147 LangString DESC_SecCopyUI ${LANG_SIMPCHINESE} "OpenAFS for Windows: Simplified Chinese"
148 LangString DESC_SecCopyUI ${LANG_TRADCHINESE} "OpenAFS for Windows: Traditional Chinese description"
149 LangString DESC_SecCopyUI ${LANG_JAPANESE} "OpenAFS for Windows: Japanese description"
150 LangString DESC_SecCopyUI ${LANG_KOREAN} "OpenAFS for Windows: Korean description"
151 ;LangString DESC_SecCopyUI ${LANG_ITALIAN} "OpenAFS for Windows: Italian description"
152 ;LangString DESC_SecCopyUI ${LANG_DUTCH} "OpenAFS for Windows: Dutch description"
153 ;LangString DESC_SecCopyUI ${LANG_DANISH} "OpenAFS for Windows: Danish description"
154 ;LangString DESC_SecCopyUI ${LANG_GREEK} "OpenAFS for Windows: Greek description"
155 ;LangString DESC_SecCopyUI ${LANG_RUSSIAN} "OpenAFS for Windows: Russian description"
156 LangString DESC_SecCopyUI ${LANG_PORTUGUESEBR} "OpenAFS for Windows: Portuguese (Brasil) description"
157 ;LangString DESC_SecCopyUI ${LANG_POLISH} "OpenAFS for Windows: Polish description"
158 ;LangString DESC_SecCopyUI ${LANG_UKRAINIAN} "OpenAFS for Windows: Ukrainian description"
159 ;LangString DESC_SecCopyUI ${LANG_CZECH} "OpenAFS for Windows: Czechian description"
160 ;LangString DESC_SecCopyUI ${LANG_SLOVAK} "OpenAFS for Windows: Slovakian description"
161 ;LangString DESC_SecCopyUI ${LANG_CROATIAN} "OpenAFS for Windows: Slovakian description"
162 ;LangString DESC_SecCopyUI ${LANG_BULGARIAN} "OpenAFS for Windows: Bulgarian description"
163 ;LangString DESC_SecCopyUI ${LANG_HUNGARIAN} "OpenAFS for Windows: Hungarian description"
164 ;LangString DESC_SecCopyUI ${LANG_THAI} "OpenAFS for Windows: Thai description"
165 ;LangString DESC_SecCopyUI ${LANG_ROMANIAN} "OpenAFS for Windows: Romanian description"
166 ;LangString DESC_SecCopyUI ${LANG_MACEDONIAN} "OpenAFS for Windows: Macedonian description"
167 ;LangString DESC_SecCopyUI ${LANG_TURKISH} "OpenAFS for Windows: Turkish description"
169 LangString DESC_secClient ${LANG_ENGLISH} "OpenAFS Client: Allows you to access AFS from your Windows PC."
170 LangString DESC_secClient ${LANG_GERMAN} "OpenAFS Client: Allows you to access AFS from your Windows PC."
171 LangString DESC_secClient ${LANG_SPANISH} "OpenAFS Client: Allows you to access AFS from your Windows PC."
172 LangString DESC_secClient ${LANG_SIMPCHINESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
173 LangString DESC_secClient ${LANG_TRADCHINESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
174 LangString DESC_secClient ${LANG_JAPANESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
175 LangString DESC_secClient ${LANG_KOREAN} "OpenAFS Client: Allows you to access AFS from your Windows PC."
176 LangString DESC_secClient ${LANG_PORTUGUESEBR} "OpenAFS Client: Allows you to access AFS from your Windows PC."
178 LangString DESC_secServer ${LANG_ENGLISH} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
179 LangString DESC_secServer ${LANG_GERMAN} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
180 LangString DESC_secServer ${LANG_SPANISH} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
181 LangString DESC_secServer ${LANG_SIMPCHINESE} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
182 LangString DESC_secServer ${LANG_TRADCHINESE} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
183 LangString DESC_secServer ${LANG_JAPANESE} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
184 LangString DESC_secServer ${LANG_KOREAN} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
185 LangString DESC_secServer ${LANG_PORTUGUESEBR} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
187 LangString DESC_secControl ${LANG_ENGLISH} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
188 LangString DESC_secControl ${LANG_GERMAN} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
189 LangString DESC_secControl ${LANG_SPANISH} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
190 LangString DESC_secControl ${LANG_SIMPCHINESE} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
191 LangString DESC_secControl ${LANG_TRADCHINESE} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
192 LangString DESC_secControl ${LANG_JAPANESE} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
193 LangString DESC_secControl ${LANG_KOREAN} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
194 LangString DESC_secControl ${LANG_PORTUGUESEBR} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
196 LangString DESC_secDocs ${LANG_ENGLISH} "Supplemental Documentation: Additional documentation for using OpenAFS."
197 LangString DESC_secDocs ${LANG_GERMAN} "Supplemental Documentation: Additional documentation for using OpenAFS."
198 LangString DESC_secDocs ${LANG_SPANISH} "Supplemental Documentation: Additional documentation for using OpenAFS."
199 LangString DESC_secDocs ${LANG_SIMPCHINESE} "Supplemental Documentation: Additional documentation for using OpenAFS."
200 LangString DESC_secDocs ${LANG_TRADCHINESE} "Supplemental Documentation: Additional documentation for using OpenAFS."
201 LangString DESC_secDocs ${LANG_JAPANESE} "Supplemental Documentation: Additional documentation for using OpenAFS."
202 LangString DESC_secDocs ${LANG_KOREAN} "Supplemental Documentation: Additional documentation for using OpenAFS."
203 LangString DESC_secDocs ${LANG_PORTUGUESEBR} "Supplemental Documentation: Additional documentation for using OpenAFS."
205 LangString DESC_secSDK ${LANG_ENGLISH} "SDK: Header files and libraries for developing software with OpenAFS."
206 LangString DESC_secSDK ${LANG_GERMAN} "SDK: Header files and libraries for developing software with OpenAFS."
207 LangString DESC_secSDK ${LANG_SPANISH} "SDK: Header files and libraries for developing software with OpenAFS."
208 LangString DESC_secSDK ${LANG_SIMPCHINESE} "SDK: Header files and libraries for developing software with OpenAFS."
209 LangString DESC_secSDK ${LANG_TRADCHINESE} "SDK: Header files and libraries for developing software with OpenAFS."
210 LangString DESC_secSDK ${LANG_JAPANESE} "SDK: Header files and libraries for developing software with OpenAFS."
211 LangString DESC_secSDK ${LANG_KOREAN} "SDK: Header files and libraries for developing software with OpenAFS."
212 LangString DESC_secSDK ${LANG_PORTUGUESEBR} "SDK: Header files and libraries for developing software with OpenAFS."
214 ; Popup error messages
215 LangString CellError ${LANG_ENGLISH} "You must specify a valid CellServDB file to copy during install"
216 LangString CellError ${LANG_GERMAN} "You must specify a valid CellServDB file to copy during the install"
217 LangString CellError ${LANG_SPANISH} "You must specify a valid CellServDB file to copy during the install"
218 LangString CellError ${LANG_SIMPCHINESE} "You must specify a valid CellServDB file to copy during the install"
219 LangString CellError ${LANG_TRADCHINESE} "You must specify a valid CellServDB file to copy during the install"
220 LangString CellError ${LANG_JAPANESE} "You must specify a valid CellServDB file to copy during the install"
221 LangString CellError ${LANG_KOREAN} "You must specify a valid CellServDB file to copy during the install"
222 LangString CellError ${LANG_PORTUGUESEBR} "You must specify a valid CellServDB file to copy during the install"
224 LangString CellNameError ${LANG_ENGLISH} "You must specify a cell name for your client to use."
225 LangString CellNameError ${LANG_GERMAN} "You must specify a cell name for your client to use."
226 LangString CellNameError ${LANG_SPANISH} "You must specify a cell name for your client to use."
227 LangString CellNameError ${LANG_SIMPCHINESE} "You must specify a cell name for your client to use."
228 LangString CellNameError ${LANG_TRADCHINESE} "You must specify a cell name for your client to use."
229 LangString CellNameError ${LANG_JAPANESE} "You must specify a cell name for your client to use."
230 LangString CellNameError ${LANG_KOREAN} "You must specify a cell name for your client to use."
231 LangString CellNameError ${LANG_PORTUGUESEBR} "You must specify a cell name for your client to use."
233 LangString URLError ${LANG_ENGLISH} "You must specify a URL if you choose the option to download the CellServDB."
234 LangString URLError ${LANG_GERMAN} "You must specify a URL if you choose the option to download the CellServDB."
235 LangString URLError ${LANG_SPANISH} "You must specify a URL if you choose the option to download the CellServDB."
236 LangString URLError ${LANG_SIMPCHINESE} "You must specify a URL if you choose the option to download the CellServDB."
237 LangString URLError ${LANG_TRADCHINESE} "You must specify a URL if you choose the option to download the CellServDB."
238 LangString URLError ${LANG_JAPANESE} "You must specify a URL if you choose the option to download the CellServDB."
239 LangString URLError ${LANG_KOREAN} "You must specify a URL if you choose the option to download the CellServDB."
240 LangString URLError ${LANG_PORTUGUESEBR} "You must specify a URL if you choose the option to download the CellServDB."
243 ; Upgrade/re-install strings
244 LangString UPGRADE_CLIENT ${LANG_ENGLISH} "Upgrade AFS Client"
245 LangString UPGRADE_CLIENT ${LANG_GERMAN} "Upgrade AFS Client"
246 LangString UPGRADE_CLIENT ${LANG_SPANISH} "Upgrade AFS Client"
247 LangString UPGRADE_CLIENT ${LANG_SIMPCHINESE} "Upgrade AFS Client"
248 LangString UPGRADE_CLIENT ${LANG_TRADCHINESE} "Upgrade AFS Client"
249 LangString UPGRADE_CLIENT ${LANG_JAPANESE} "Upgrade AFS Client"
250 LangString UPGRADE_CLIENT ${LANG_KOREAN} "Upgrade AFS Client"
251 LangString UPGRADE_CLIENT ${LANG_PORTUGUESEBR} "Upgrade AFS Client"
253 LangString REINSTALL_CLIENT ${LANG_ENGLISH} "Re-install AFS Client"
254 LangString REINSTALL_CLIENT ${LANG_GERMAN} "Re-install AFS Client"
255 LangString REINSTALL_CLIENT ${LANG_SPANISH} "Re-install AFS Client"
256 LangString REINSTALL_CLIENT ${LANG_SIMPCHINESE} "Re-install AFS Client"
257 LangString REINSTALL_CLIENT ${LANG_TRADCHINESE} "Re-install AFS Client"
258 LangString REINSTALL_CLIENT ${LANG_JAPANESE} "Re-install AFS Client"
259 LangString REINSTALL_CLIENT ${LANG_KOREAN} "Re-install AFS Client"
260 LangString REINSTALL_CLIENT ${LANG_PORTUGUESEBR} "Re-install AFS Client"
262 LangString UPGRADE_SERVER ${LANG_ENGLISH} "Upgrade AFS Server"
263 LangString UPGRADE_SERVER ${LANG_GERMAN} "Upgrade AFS Server"
264 LangString UPGRADE_SERVER ${LANG_SPANISH} "Upgrade AFS Server"
265 LangString UPGRADE_SERVER ${LANG_SIMPCHINESE} "Upgrade AFS Server"
266 LangString UPGRADE_SERVER ${LANG_TRADCHINESE} "Upgrade AFS Server"
267 LangString UPGRADE_SERVER ${LANG_JAPANESE} "Upgrade AFS Server"
268 LangString UPGRADE_SERVER ${LANG_KOREAN} "Upgrade AFS Server"
269 LangString UPGRADE_SERVER ${LANG_PORTUGUESEBR} "Upgrade AFS Server"
271 LangString REINSTALL_SERVER ${LANG_ENGLISH} "Re-install AFS Server"
272 LangString REINSTALL_SERVER ${LANG_GERMAN} "Re-install AFS Server"
273 LangString REINSTALL_SERVER ${LANG_SPANISH} "Re-install AFS Server"
274 LangString REINSTALL_SERVER ${LANG_SIMPCHINESE} "Re-install AFS Server"
275 LangString REINSTALL_SERVER ${LANG_TRADCHINESE} "Re-install AFS Server"
276 LangString REINSTALL_SERVER ${LANG_JAPANESE} "Re-install AFS Server"
277 LangString REINSTALL_SERVER ${LANG_KOREAN} "Re-install AFS Server"
278 LangString REINSTALL_SERVER ${LANG_PORTUGUESEBR} "Re-install AFS Server"
280 ReserveFile "CellServPage.ini"
281 ReserveFile "AFSCell.ini"
282 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ;InstallOptions plug-in
283 !insertmacro MUI_RESERVEFILE_LANGDLL ;Language selection dialog
284 ;--------------------------------
286 ; Macro - Upgrade DLL File
287 ; Written by Joost Verburg
288 ; ------------------------
291 ; LOCALFILE - Location of the new DLL file (on the compiler system)
292 ; DESTFILE - Location of the DLL file that should be upgraded
293 ; (on the user's system)
294 ; TEMPBASEDIR - Directory on the user's system to store a temporary file
295 ; when the system has to be rebooted.
296 ; For Win9x support, this should be on the same volume as the
298 ; The Windows temp directory could be located on any volume,
299 ; so you cannot use this directory.
301 ; Define REPLACEDLL_NOREGISTER if you want to upgrade a DLL that does not
302 ; have to be registered.
304 ; Note: If you want to support Win9x, you can only use
305 ; short filenames (8.3).
308 ; !insertmacro ReplaceDLL "dllname.dll" "$SYSDIR\dllname.dll" "$SYSDIR"
311 !macro ReplaceDLL LOCALFILE DESTFILE TEMPBASEDIR
320 ;------------------------
321 ;Unique number for labels
323 !define REPLACEDLL_UNIQUE ${__LINE__}
325 ;------------------------
326 ;Copy the parameters used on run-time to a variable
327 ;This allows the usage of variables as paramter
329 StrCpy $R4 "${DESTFILE}"
330 StrCpy $R5 "${TEMPBASEDIR}"
332 ;------------------------
333 ;Check file and version
335 IfFileExists $R4 0 replacedll.copy_${REPLACEDLL_UNIQUE}
338 ; GetDLLVersionLocal "${LOCALFILE}" $R0 $R1
339 ; GetDLLVersion $R4 $R2 $R3
340 ;IfErrors replacedll.upgrade_${REPLACEDLL_UNIQUE}
342 ;IntCmpU $R0 $R2 0 replacedll.done_${REPLACEDLL_UNIQUE} \
343 ; replacedll.upgrade_${REPLACEDLL_UNIQUE}
344 ;IntCmpU $R1 $R3 replacedll.done_${REPLACEDLL_UNIQUE} \
345 ; replacedll.done_${REPLACEDLL_UNIQUE} \
346 ; replacedll.upgrade_${REPLACEDLL_UNIQUE}
348 ;------------------------
349 ;Let's replace the DLL!
353 ;replacedll.upgrade_${REPLACEDLL_UNIQUE}:
354 !ifndef REPLACEDLL_NOREGISTER
359 ;------------------------
360 ;Try to copy the DLL directly
364 Call :replacedll.file_${REPLACEDLL_UNIQUE}
365 IfErrors 0 replacedll.noreboot_${REPLACEDLL_UNIQUE}
367 ;------------------------
368 ;DLL is in use. Copy it to a temp file and Rename it on reboot.
370 GetTempFileName $R0 $R5
371 Call :replacedll.file_${REPLACEDLL_UNIQUE}
372 Rename /REBOOTOK $R0 $R4
374 ;------------------------
375 ;Register the DLL on reboot
377 !ifndef REPLACEDLL_NOREGISTER
378 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" \
379 "Register $R4" 'rundll32.exe "$R4",DllRegisterServer'
382 Goto replacedll.done_${REPLACEDLL_UNIQUE}
384 ;------------------------
385 ;DLL does not exist - just extract
387 replacedll.copy_${REPLACEDLL_UNIQUE}:
389 Call :replacedll.file_${REPLACEDLL_UNIQUE}
391 ;------------------------
394 replacedll.noreboot_${REPLACEDLL_UNIQUE}:
395 !ifndef REPLACEDLL_NOREGISTER
399 ;------------------------
402 replacedll.done_${REPLACEDLL_UNIQUE}:
411 ;------------------------
414 Goto replacedll.end_${REPLACEDLL_UNIQUE}
416 ;------------------------
417 ;Called to extract the DLL
419 replacedll.file_${REPLACEDLL_UNIQUE}:
420 File /oname=$R0 "${LOCALFILE}"
423 replacedll.end_${REPLACEDLL_UNIQUE}:
425 ;------------------------
428 SetOverwrite lastused
430 !undef REPLACEDLL_UNIQUE
435 ;--------------------------------
438 ;Things that need to be extracted on first (keep these lines before any File command!)
439 ;Only useful for BZIP2 compression
440 !insertmacro MUI_RESERVEFILE_LANGDLL
442 ;--------------------------------
452 ;--------------------------------
455 ;----------------------
457 Section "AFS Client" secClient
459 SetShellVarContext all
461 ; Check for bad previous installation (if we are doing a new install)
462 Call IsAnyAFSInstalled
464 StrCmp $R0 "0" +1 skipCheck
468 ; Stop any running services or we can't replace the files
469 ; Stop the running processes
471 File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe" ; Might not have the MSVCR71.DLL file to run
472 nsExec::Exec '$R0 afsd_service.exe'
473 nsExec::Exec '$R0 afscreds.exe'
474 Exec "afscreds.exe -z"
475 ; in case we are upgrading an old version that does not support -z
476 nsExec::Exec '$R0 afscreds.exe'
478 ;nsExec::Exec '$R0 krbcc32s.exe'
481 nsExec::Exec "net stop TransarcAFSDaemon"
482 nsExec::Exec "net stop TransarcAFSServer"
484 ; Do client components
485 SetOutPath "$INSTDIR\Client\Program"
486 File "${AFS_CLIENT_BUILDDIR}\afsshare.exe"
487 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\libosi.dll" "$INSTDIR\Client\Program\libosi.dll" "$INSTDIR"
488 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\libafsconf.dll" "$INSTDIR\Client\Program\libafsconf.dll" "$INSTDIR"
489 File "${AFS_CLIENT_BUILDDIR}\klog.exe"
490 File "${AFS_CLIENT_BUILDDIR}\tokens.exe"
491 File "${AFS_CLIENT_BUILDDIR}\unlog.exe"
492 File "${AFS_CLIENT_BUILDDIR}\fs.exe"
493 File "${AFS_CLIENT_BUILDDIR}\afscreds.exe"
494 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll" "$INSTDIR\Client\Program\afs_shl_ext.dll" "$INSTDIR"
495 File "${AFS_CLIENT_BUILDDIR}\afsd_service.exe"
496 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afslogon.dll" "$INSTDIR\Client\Program\afslogon.dll" "$INSTDIR"
497 File "${AFS_CLIENT_BUILDDIR}\symlink.exe"
498 File "${AFS_DESTDIR}\bin\kpasswd.exe"
499 File "${AFS_SERVER_BUILDDIR}\pts.exe"
500 File "${AFS_SERVER_BUILDDIR}\bos.exe"
501 File "${AFS_SERVER_BUILDDIR}\kas.exe"
502 File "${AFS_SERVER_BUILDDIR}\vos.exe"
503 File "${AFS_SERVER_BUILDDIR}\udebug.exe"
504 File "${AFS_DESTDIR}\bin\translate_et.exe"
505 File "${AFS_DESTDIR}\etc\rxdebug.exe"
506 File "${AFS_DESTDIR}\etc\backup.exe"
509 File "${AFS_CLIENT_BUILDDIR}\afsshare.pdb"
510 File "${AFS_CLIENT_BUILDDIR}\libosi.pdb"
511 File "${AFS_CLIENT_BUILDDIR}\libafsconf.pdb"
512 File "${AFS_CLIENT_BUILDDIR}\klog.pdb"
513 File "${AFS_CLIENT_BUILDDIR}\tokens.pdb"
514 File "${AFS_CLIENT_BUILDDIR}\unlog.pdb"
515 File "${AFS_CLIENT_BUILDDIR}\fs.pdb"
516 File "${AFS_CLIENT_BUILDDIR}\afscreds.pdb"
517 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.pdb"
518 File "${AFS_CLIENT_BUILDDIR}\afsd_service.pdb"
519 File "${AFS_CLIENT_BUILDDIR}\afslogon.pdb"
520 File "${AFS_CLIENT_BUILDDIR}\symlink.pdb"
521 File "${AFS_DESTDIR}\bin\kpasswd.pdb"
522 File "${AFS_DESTDIR}\bin\pts.pdb"
523 File "${AFS_SERVER_BUILDDIR}\bos.pdb"
524 File "${AFS_SERVER_BUILDDIR}\kas.pdb"
525 File "${AFS_SERVER_BUILDDIR}\vos.pdb"
526 File "${AFS_SERVER_BUILDDIR}\udebug.pdb"
527 File "${AFS_DESTDIR}\bin\translate_et.pdb"
528 File "${AFS_DESTDIR}\etc\rxdebug.pdb"
529 File "${AFS_DESTDIR}\etc\backup.pdb"
537 ; Do WINDOWSDIR components
539 ; Do Windows SYSDIR (Control panel)
541 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa.cpl" "$SYSDIR\afs_cpa.cpl" "$INSTDIR"
543 File "${AFS_CLIENT_BUILDDIR}\afs_cpa.pdb"
546 ; Get AFS CellServDB file
547 Call afs.GetCellServDB
548 !ifdef INSTALL_LOOPBACK
549 Call afs.InstallMSLoopback
553 ; Include Kerberos for Windows files in the installer...
554 SetOutPath "$INSTDIR\kfw\bin\"
555 File "${KFW_SOURCE}\bin\*"
556 SetOutPath "$INSTDIR\kfw\doc"
557 File "${KFW_SOURCE}\doc\*"
560 ;Store install folder
561 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\Client" "" $INSTDIR
562 Call AFSCommon.Install
564 ; Write registry entries
565 WriteRegStr HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
566 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "" "AFS Client Shell Extension"
567 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "" "$INSTDIR\Client\Program\afs_shl_ext.dll"
568 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "ThreadingModel" "Apartment"
569 WriteRegStr HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
570 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "AFS Client Shell Extension"
573 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
574 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "VersionString" ${AFS_VERSION}
575 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Title" "AFS Client"
576 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Description" "AFS Client"
577 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PathName" "$INSTDIR\Client"
578 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Software Type" "File System"
579 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
580 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
581 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
582 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
583 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Title" "AFS Client"
584 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Description" "AFS Client"
585 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Software Type" "File System"
586 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "PathName" "$INSTDIR\Client\Program"
587 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
588 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
589 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
591 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Debug" 1
592 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Debug" 1
594 ; Delete the DEBUG string
595 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Debug"
596 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Debug"
599 ; On Windows 2000 work around KB301673. This is fixed in Windows XP and 2003
600 Call GetWindowsVersion
602 StrCmp $R1 "2000" +1 +2
603 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled" 0
605 ;Write start menu entries
606 CreateDirectory "$SMPROGRAMS\OpenAFS\Client"
607 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
608 CreateShortCut "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk" "$INSTDIR\Client\Program\afscreds.exe" "-A -M -N -Q"
609 CreateShortCut "$SMSTARTUP\AFS Credentials.lnk" "$INSTDIR\Client\Program\afscreds.exe" "-A -M -N -Q"
611 Push "$INSTDIR\Client\Program"
613 Push "$INSTDIR\Common"
617 ; Add kfw to path too
618 Push "$INSTDIR\kfw\bin"
622 ; Create the AFS service
623 SetOutPath "$INSTDIR\Common"
624 File "${AFS_WININSTALL_DIR}\Service.exe"
625 nsExec::Exec "net stop TransarcAFSDaemon"
626 ;IMPORTANT! If we are not refreshing the config files, do NOT remove the service
627 ;Don't re-install because it must be present or we wouldn't have passed the Reg check
629 ReadRegStr $R2 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell"
630 StrCmp $R2 "" +1 skipremove
631 nsExec::Exec '$INSTDIR\Common\Service.exe u TransarcAFSDaemon'
632 nsExec::Exec '$INSTDIR\Common\Service.exe TransarcAFSDaemon "$INSTDIR\Client\Program\afsd_service.exe" "OpenAFS Client Service"'
634 Delete "$INSTDIR\Common\service.exe"
637 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "" ""
638 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "ProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
639 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
640 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
641 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Class" 2
642 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "VerboseLogging" 10
644 ; Must also add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder
645 ; and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order
646 ; to also include the service name.
648 ReadINIStr $R0 $1 "Field 7" "State"
649 ReadINIStr $R1 $1 "Field 9" "State"
650 ; Complicated way to do $R1 = ($R1 *2) + $R0
653 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonOptions" $R1
654 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonScript" "$INSTDIR\Client\Program\afscreds.exe -:%s -x -a -m -n -q"
655 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Name" "OpenAFSDaemon"
658 ReadINIStr $R0 $1 "Field 2" "State"
659 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell" $R0
660 ReadINIStr $R0 $1 "Field 3" "State"
661 WriteRegDWORD HKLM "SOFTWARE\OpenAFS\Client" "ShowTrayIcon" 1
662 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "SecurityLevel" $R0
663 ReadINIStr $R0 $1 "Field 5" "State"
664 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "FreelanceClient" $R0
665 ReadINIStr $R0 $1 "Field 11" "State"
666 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "UseDNS" $R0
667 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "NetbiosName" "AFS"
668 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "MountRoot" "/afs"
669 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "RxMaxMTU" 1260
670 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "IsGateway" 0
671 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "HideDotFiles" 1
672 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "TruncateNetbios" "on"
674 ; Find Lana By Name appears to be causing grief for many people
675 ; I do not have time to track this down so I am simply going to disable it
676 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "NoFindLanaByName" 1
678 strcpy $REG_SUB_KEY "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon"
679 strcpy $REG_VALUE "DependOnGroup"
680 strcpy $REG_DATA_1 "PNP_TDI"
681 strcpy $REG_DATA_2 ""
682 strcpy $REG_DATA_3 ""
683 Call RegWriteMultiStr
684 strcpy $REG_SUB_KEY "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon"
685 strcpy $REG_VALUE "DependOnService"
686 strcpy $REG_DATA_1 "Tcpip"
687 strcpy $REG_DATA_2 "NETBIOS"
688 strcpy $REG_DATA_3 "RpcSs"
689 Call RegWriteMultiStr
693 WriteUninstaller "$INSTDIR\Uninstall.exe"
697 ;------------------------
699 Section "AFS Server" secServer
701 SetShellVarContext all
703 ; Check for bad previous installation (if we are doing a new install)
704 Call IsAnyAFSInstalled
706 StrCmp $R0 "0" +1 skipCheck
710 ; Stop any running services or we can't replace the files
711 ; Stop the running processes
713 File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe" ; Might not have the MSVCR71.DLL file to run
714 nsExec::Exec '$R0 afscreds.exe'
715 Exec "afscreds.exe -z"
716 ; in case we are upgrading an old version that does not support -z
718 nsExec::Exec '$R0 afscreds.exe'
720 ;nsExec::Exec '$R0 krbcc32s.exe'
723 nsExec::Exec "net stop TransarcAFSDaemon"
724 nsExec::Exec "net stop TransarcAFSServer"
726 CreateDirectory "$INSTDIR\Server\usr\afs\etc"
727 CreateDirectory "$INSTDIR\Server\usr\afs\local"
728 CreateDirectory "$INSTDIR\Server\usr\afs\etc\logs"
730 SetOutPath "$INSTDIR\Server\usr\afs\bin"
731 File "${AFS_SERVER_BUILDDIR}\afskill.exe"
732 File "${AFS_SERVER_BUILDDIR}\afssvrcfg.exe"
733 File "${AFS_SERVER_BUILDDIR}\bosctlsvc.exe"
734 File "${AFS_SERVER_BUILDDIR}\bosserver.exe"
735 File "${AFS_SERVER_BUILDDIR}\buserver.exe"
736 File "${AFS_ETC_BUILDDIR}\butc.exe"
737 File "${AFS_SERVER_BUILDDIR}\fileserver.exe"
738 File "${AFS_ETC_BUILDDIR}\fms.exe"
739 File "${AFS_SERVER_BUILDDIR}\kaserver.exe"
740 File "${AFS_SERVER_BUILDDIR}\ptserver.exe"
741 File "${AFS_SERVER_BUILDDIR}\salvager.exe"
742 File "${AFS_SERVER_BUILDDIR}\upclient.exe"
743 File "${AFS_SERVER_BUILDDIR}\upserver.exe"
744 File "${AFS_SERVER_BUILDDIR}\vlserver.exe"
745 File "${AFS_SERVER_BUILDDIR}\volinfo.exe"
746 File "${AFS_SERVER_BUILDDIR}\volserver.exe"
749 File "${AFS_SERVER_BUILDDIR}\afskill.pdb"
750 File "${AFS_SERVER_BUILDDIR}\afssvrcfg.pdb"
751 File "${AFS_SERVER_BUILDDIR}\bosctlsvc.pdb"
752 File "${AFS_SERVER_BUILDDIR}\bosserver.pdb"
753 File "${AFS_SERVER_BUILDDIR}\buserver.pdb"
754 File "${AFS_ETC_BUILDDIR}\butc.pdb"
755 File "${AFS_SERVER_BUILDDIR}\fileserver.pdb"
756 File "${AFS_ETC_BUILDDIR}\fms.pdb"
757 File "${AFS_SERVER_BUILDDIR}\kaserver.pdb"
758 File "${AFS_SERVER_BUILDDIR}\ptserver.pdb"
759 File "${AFS_SERVER_BUILDDIR}\salvager.pdb"
760 File "${AFS_SERVER_BUILDDIR}\upclient.pdb"
761 File "${AFS_SERVER_BUILDDIR}\upserver.pdb"
762 File "${AFS_SERVER_BUILDDIR}\vlserver.pdb"
763 File "${AFS_SERVER_BUILDDIR}\volinfo.pdb"
764 File "${AFS_SERVER_BUILDDIR}\volserver.pdb"
767 ;AFS Server common files
768 SetOutPath "$INSTDIR\Common"
769 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
770 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll"
771 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
772 File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
773 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
776 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
777 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb"
778 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb"
779 File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb"
780 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb"
782 SetOutPath "$INSTDIR\Common"
786 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver.cpl" "$SYSDIR\afsserver.cpl" "$INSTDIR"
789 File "${AFS_SERVER_BUILDDIR}\afsserver.pdb"
792 ;Store install folder
793 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\AFS Server" "" $INSTDIR
795 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
796 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "VersionString" ${AFS_VERSION}
797 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Title" "AFS Server"
798 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Description" "AFS Server for Windows"
799 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PathName" "$INSTDIR\Server"
800 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Software Type" "File System"
801 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
802 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
803 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
804 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
805 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Title" "AFS Server"
806 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Description" "AFS Server for Windows"
807 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Software Type" "File System"
808 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "PathName" "$INSTDIR\Server"
809 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
810 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
811 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
813 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Debug" 1
814 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Debug" 1
816 ; Delete the DEBUG string
817 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Debug"
818 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Debug"
820 ; Install the service
821 SetOutPath "$INSTDIR\Common"
822 File "${AFS_WININSTALL_DIR}\Service.exe"
824 File "${AFS_WININSTALL_DIR}\Service.pdb"
826 ;Don't want to whack existing settings... Make users un-install and then re-install if they want that
827 ;nsExec::Exec '$INSTDIR\Common\service.exe u TransarcAFSServer'
828 nsExec::Exec '$INSTDIR\Common\service.exe TransarcAFSServer "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe" "OpenAFS AFS Server"'
829 Delete "$INSTDIR\Common\service.exe"
831 CreateDirectory "$SMPROGRAMS\OpenAFS\Server"
832 CreateShortCut "$SMPROGRAMS\OpenAFS\Server\Server Configuration.lnk" "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe"
834 ; Make the server config wizard auto-start on bootup
835 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" "AFS Server Wizard" '"$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe" /wizard"'
837 WriteUninstaller "$INSTDIR\Uninstall.exe"
842 ;----------------------------
843 ; OpenAFS Control Center
844 Section "AFS Control Center" secControl
846 SetShellVarContext all
848 SetOutPath "$INSTDIR\Control Center"
849 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager.exe"
850 File "${AFS_SERVER_BUILDDIR}\TaAfsAdmSvr.exe"
851 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager.exe"
854 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager.pdb"
855 File "${AFS_SERVER_BUILDDIR}\TaAfsAdmSvr.pdb"
856 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager.pdb"
859 ;AFS Server common files
860 Call AFSCommon.Install
862 SetOutPath "$INSTDIR\Common"
864 SetOutPath "$INSTDIR\Common"
867 File "${SYSTEMDIR}\msvcr71d.dll"
868 File "${SYSTEMDIR}\msvcr71d.pdb"
869 File "${SYSTEMDIR}\msvcp71d.dll"
870 File "${SYSTEMDIR}\msvcp71d.pdb"
871 File "${SYSTEMDIR}\mfc71d.dll"
872 File "${SYSTEMDIR}\mfc71d.pdb"
873 File "${SYSTEMDIR}\MFC71CHS.DLL"
874 File "${SYSTEMDIR}\MFC71CHT.DLL"
875 File "${SYSTEMDIR}\MFC71DEU.DLL"
876 File "${SYSTEMDIR}\MFC71ENU.DLL"
877 File "${SYSTEMDIR}\MFC71ESP.DLL"
878 File "${SYSTEMDIR}\MFC71FRA.DLL"
879 File "${SYSTEMDIR}\MFC71ITA.DLL"
880 File "${SYSTEMDIR}\MFC71JPN.DLL"
881 File "${SYSTEMDIR}\MFC71KOR.DLL"
884 File "${SYSTEMDIR}\msvcr70d.dll"
885 File "${SYSTEMDIR}\msvcr70d.pdb"
886 File "${SYSTEMDIR}\msvcp70d.dll"
887 File "${SYSTEMDIR}\msvcp70d.pdb"
888 File "${SYSTEMDIR}\mfc70d.dll"
889 File "${SYSTEMDIR}\mfc70d.pdb"
890 File "${SYSTEMDIR}\MFC70CHS.DLL"
891 File "${SYSTEMDIR}\MFC70CHT.DLL"
892 File "${SYSTEMDIR}\MFC70DEU.DLL"
893 File "${SYSTEMDIR}\MFC70ENU.DLL"
894 File "${SYSTEMDIR}\MFC70ESP.DLL"
895 File "${SYSTEMDIR}\MFC70FRA.DLL"
896 File "${SYSTEMDIR}\MFC70ITA.DLL"
897 File "${SYSTEMDIR}\MFC70JPN.DLL"
898 File "${SYSTEMDIR}\MFC70KOR.DLL"
900 File "${SYSTEMDIR}\mfc42d.dll"
901 File "${SYSTEMDIR}\mfc42d.pdb"
902 File "${SYSTEMDIR}\msvcp60d.dll"
903 File "${SYSTEMDIR}\msvcp60d.pdb"
904 File "${SYSTEMDIR}\msvcrtd.dll"
905 File "${SYSTEMDIR}\msvcrtd.pdb"
910 File "${SYSTEMDIR}\mfc71.dll"
911 File "${SYSTEMDIR}\msvcr71.dll"
912 File "${SYSTEMDIR}\msvcp71.dll"
913 File "${SYSTEMDIR}\MFC71CHS.DLL"
914 File "${SYSTEMDIR}\MFC71CHT.DLL"
915 File "${SYSTEMDIR}\MFC71DEU.DLL"
916 File "${SYSTEMDIR}\MFC71ENU.DLL"
917 File "${SYSTEMDIR}\MFC71ESP.DLL"
918 File "${SYSTEMDIR}\MFC71FRA.DLL"
919 File "${SYSTEMDIR}\MFC71ITA.DLL"
920 File "${SYSTEMDIR}\MFC71JPN.DLL"
921 File "${SYSTEMDIR}\MFC71KOR.DLL"
924 File "${SYSTEMDIR}\mfc70.dll"
925 File "${SYSTEMDIR}\msvcr70.dll"
926 File "${SYSTEMDIR}\msvcp70.dll"
927 File "${SYSTEMDIR}\MFC70CHS.DLL"
928 File "${SYSTEMDIR}\MFC70CHT.DLL"
929 File "${SYSTEMDIR}\MFC70DEU.DLL"
930 File "${SYSTEMDIR}\MFC70ENU.DLL"
931 File "${SYSTEMDIR}\MFC70ESP.DLL"
932 File "${SYSTEMDIR}\MFC70FRA.DLL"
933 File "${SYSTEMDIR}\MFC70ITA.DLL"
934 File "${SYSTEMDIR}\MFC70JPN.DLL"
935 File "${SYSTEMDIR}\MFC70KOR.DLL"
937 File "${SYSTEMDIR}\mfc42.dll"
938 File "${SYSTEMDIR}\msvcp60.dll"
939 File "${SYSTEMDIR}\msvcrt.dll"
943 ;Store install folder
944 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PathName" $INSTDIR
945 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "VersionString" ${AFS_VERSION}
946 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
947 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
948 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
949 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
950 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
951 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
952 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
954 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "Debug" 1
955 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "Debug" 1
957 ; Delete the DEBUG string
958 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "Debug"
959 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "Debug"
962 ;Write start menu entries
963 CreateDirectory "$SMPROGRAMS\OpenAFS\Control Center"
964 CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk" "$INSTDIR\Control Center\TaAfsAccountManager.exe"
965 CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk" "$INSTDIR\Control Center\TaAfsServerManager.exe"
967 WriteUninstaller "$INSTDIR\Uninstall.exe"
972 ;----------------------------
973 ; OpenAFS Supplemental Documentation
974 Section "Supplemental Documentation" secDocs
975 SetShellVarContext all
977 StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
978 StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
979 StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
980 StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
981 StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
982 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
983 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
984 StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
988 SetOutPath "$INSTDIR\Documentation\html"
989 File "..\..\doc\install\Documentation\en_US\html\*"
990 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
991 File "..\..\doc\install\Documentation\en_US\html\CmdRef\*"
992 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
993 File "..\..\doc\install\Documentation\en_US\html\InstallGd\*"
994 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
995 File "..\..\doc\install\Documentation\en_US\html\ReleaseNotes\*"
996 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
997 File "..\..\doc\install\Documentation\en_US\html\SysAdminGd\*"
1001 SetOutPath "$INSTDIR\Documentation"
1002 File "..\..\doc\install\Documentation\de_DE\README.TXT"
1003 SetOutPath "$INSTDIR\Documentation\html"
1004 File "..\..\doc\install\Documentation\de_DE\html\*"
1005 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1006 ;File "..\..\doc\install\Documentation\de_DE\html\CmdRef\*"
1007 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1008 File "..\..\doc\install\Documentation\de_DE\html\InstallGd\*"
1009 ;SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1010 ;File "..\..\doc\install\Documentation\de_DE\html\ReleaseNotes\*"
1011 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1012 ;File "..\..\doc\install\Documentation\de_DE\html\SysAdminGd\*"
1016 SetOutPath "$INSTDIR\Documentation"
1017 File "..\..\doc\install\Documentation\es_ES\README.TXT"
1018 SetOutPath "$INSTDIR\Documentation\html"
1019 File "..\..\doc\install\Documentation\es_ES\html\*"
1020 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1021 ;File "..\..\doc\install\Documentation\es_ES\html\CmdRef\*"
1022 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1023 ;File "..\..\doc\install\Documentation\es_ES\html\InstallGd\*"
1024 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1025 ;File "..\..\doc\install\Documentation\es_ES\html\ReleaseNotes\*"
1026 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1027 ;File "..\..\doc\install\Documentation\es_ES\html\SysAdminGd\*"
1031 SetOutPath "$INSTDIR\Documentation"
1032 File "..\..\doc\install\Documentation\ja_JP\README.TXT"
1033 SetOutPath "$INSTDIR\Documentation\html"
1034 File "..\..\doc\install\Documentation\ja_JP\html\*"
1035 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1036 File "..\..\doc\install\Documentation\ja_JP\html\CmdRef\*"
1037 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1038 File "..\..\doc\install\Documentation\ja_JP\html\InstallGd\*"
1039 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1040 ;File "..\..\doc\install\Documentation\ja_JP\html\ReleaseNotes\*"
1041 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1042 ;File "..\..\doc\install\Documentation\ja_JP\html\SysAdminGd\*"
1046 SetOutPath "$INSTDIR\Documentation"
1047 File "..\..\doc\install\Documentation\ko_KR\README.TXT"
1048 SetOutPath "$INSTDIR\Documentation\html"
1049 File "..\..\doc\install\Documentation\ko_KR\html\*"
1050 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1051 ;File "..\..\doc\install\Documentation\ko_KR\html\CmdRef\*"
1052 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1053 File "..\..\doc\install\Documentation\ko_KR\html\InstallGd\*"
1054 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1055 File "..\..\doc\install\Documentation\ko_KR\html\ReleaseNotes\*"
1056 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1057 File "..\..\doc\install\Documentation\ko_KR\html\SysAdminGd\*"
1061 SetOutPath "$INSTDIR\Documentation"
1062 File "..\..\doc\install\Documentation\pt_BR\README.TXT"
1063 SetOutPath "$INSTDIR\Documentation\html"
1064 File "..\..\doc\install\Documentation\pt_BR\html\*"
1065 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1066 ;File "..\..\doc\install\Documentation\pt_BR\html\CmdRef\*"
1067 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1068 File "..\..\doc\install\Documentation\pt_BR\html\InstallGd\*"
1069 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1070 File "..\..\doc\install\Documentation\pt_BR\html\ReleaseNotes\*"
1071 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1072 ;File "..\..\doc\install\Documentation\pt_BR\html\SysAdminGd\*"
1076 SetOutPath "$INSTDIR\Documentation"
1077 File "..\..\doc\install\Documentation\zh_CN\README.TXT"
1078 SetOutPath "$INSTDIR\Documentation\html"
1079 File "..\..\doc\install\Documentation\zh_CN\html\*"
1080 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1081 ;File "..\..\doc\install\Documentation\zh_CN\html\CmdRef\*"
1082 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1083 File "..\..\doc\install\Documentation\zh_CN\html\InstallGd\*"
1084 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1085 File "..\..\doc\install\Documentation\zh_CN\html\ReleaseNotes\*"
1086 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1087 ;File "..\..\doc\install\Documentation\zh_CN\html\SysAdminGd\*"
1091 SetOutPath "$INSTDIR\Documentation"
1092 File "..\..\doc\install\Documentation\zh_TW\README.TXT"
1093 SetOutPath "$INSTDIR\Documentation\html"
1094 File "..\..\doc\install\Documentation\zh_TW\html\*"
1095 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1096 ;File "..\..\doc\install\Documentation\zh_TW\html\CmdRef\*"
1097 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1098 File "..\..\doc\install\Documentation\zh_TW\html\InstallGd\*"
1099 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1100 File "..\..\doc\install\Documentation\zh_TW\html\ReleaseNotes\*"
1101 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1102 ;File "..\..\doc\install\Documentation\zh_TW\html\SysAdminGd\*"
1107 ;Store install folder
1108 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation" "" $INSTDIR
1109 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "VersionString" ${AFS_VERSION}
1110 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
1111 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
1112 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
1113 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
1114 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
1115 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
1116 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
1118 ; Write start menu shortcut
1119 SetOutPath "$SMPROGRAMS\OpenAFS"
1120 CreateShortCut "$SMPROGRAMS\OpenAFS\Documentation.lnk" "$INSTDIR\Documentation\html\index.htm"
1123 WriteUninstaller "$INSTDIR\Uninstall.exe"
1124 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
1125 Call AFSCommon.Install
1129 Section "Software Development Kit (SDK)" secSDK
1131 SetOutPath "$INSTDIR\Client\Program\lib"
1132 File /r "${AFS_CLIENT_LIBDIR}\*.*"
1134 SetOutPath "$INSTDIR\Client\Program\Include"
1135 File /r "${AFS_BUILD_INCDIR}\*.*"
1138 SetOutPath "$INSTDIR\Client\Program\Sample"
1139 File "..\..\afsd\sample\token.c"
1141 ;Store install folder
1142 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS SDK" "" $INSTDIR
1143 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "VersionString" ${AFS_VERSION}
1144 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
1145 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
1146 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
1147 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
1148 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
1149 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
1150 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
1152 WriteUninstaller "$INSTDIR\Uninstall.exe"
1153 SetOutPath "$SMPROGRAMS\OpenAFS"
1154 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
1156 Call AFSCommon.Install
1159 ;Display the Finish header
1160 ;Insert this macro after the sections if you are not using a finish page
1161 ;!insertmacro MUI_SECTIONS_FINISHHEADER
1163 ;--------------------------------
1164 ;Installer Functions
1168 !insertmacro MUI_LANGDLL_DISPLAY
1170 ; Set the default install options
1175 StrCmp $R0 "true" contInstall
1177 MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "You must be an administrator of this machine to install this software."
1181 ; Our logic should be like this.
1182 ; 1) If no AFS components are installed, we do a clean install with default options. (Client/Docs)
1183 ; 2) If existing modules are installed, we keep them selected
1184 ; 3) If it is an upgrade, we set the text accordingly, else we mark it as a re-install
1186 Call IsAnyAFSInstalled
1188 StrCmp $R0 "0" DefaultOptions
1190 Call ShouldClientInstall
1193 ; Check if it was an IBM/Transarc version
1194 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "DisplayName"
1195 StrCmp $R0 "IBM AFS Client" DoIBM
1196 StrCmp $R0 "Transarc AFS Client" DoIBM
1199 StrCmp $R2 "0" NoClient
1200 StrCmp $R2 "1" ReinstallClient
1201 StrCmp $R2 "2" UpgradeClient
1202 StrCmp $R2 "3" DowngradeClient
1205 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\AFS Client\CurrentVersion" "MajorVersion"
1206 StrCmp $R0 "3" +1 NotIBM
1211 SectionGetFlags ${secClient} $0
1212 IntOp $0 $0 | ${SF_SELECTED}
1213 SectionSetFlags ${secClient} $0
1214 ;# !insertmacro SelectSection ${secClient}
1217 ;StrCpy $1 ${secClient} ; Gotta remember which section we are at now...
1218 SectionGetFlags ${secClient} $0
1219 IntOp $0 $0 & ${SECTION_OFF}
1220 SectionSetFlags ${secClient} $0
1223 SectionGetFlags ${secClient} $0
1224 IntOp $0 $0 | ${SF_SELECTED}
1225 SectionSetFlags ${secClient} $0
1226 SectionSetText ${secClient} $(UPGRADE_CLIENT)
1229 SectionGetFlags ${secClient} $0
1230 IntOp $0 $0 | ${SF_SELECTED}
1231 SectionSetFlags ${secClient} $0
1232 SectionSetText ${secClient} $(REINSTALL_CLIENT)
1235 SectionGetFlags ${secClient} $0
1236 IntOp $0 $0 | ${SF_SELECTED}
1237 SectionSetFlags ${secClient} $0
1238 SectionSetText ${secClient} $(REINSTALL_CLIENT)
1244 Call ShouldServerInstall
1246 StrCmp $R2 "0" NoServer
1247 StrCmp $R2 "1" ReinstallServer
1248 StrCmp $R2 "2" UpgradeServer
1249 StrCmp $R2 "3" DowngradeServer
1251 SectionGetFlags ${secServer} $0
1252 IntOp $0 $0 | ${SF_SELECTED}
1253 SectionSetFlags ${secServer} $0
1254 ;# !insertmacro UnselectSection ${secServer}
1258 SectionGetFlags ${secServer} $0
1259 IntOp $0 $0 | ${SF_SELECTED}
1260 SectionSetFlags ${secServer} $0
1261 SectionSetText ${secServer} $(UPGRADE_SERVER)
1265 SectionGetFlags ${secServer} $0
1266 IntOp $0 $0 | ${SF_SELECTED}
1267 SectionSetFlags ${secServer} $0
1268 SectionSetText ${secServer} $(REINSTALL_SERVER)
1272 SectionGetFlags ${secServer} $0
1273 IntOp $0 $0 | ${SF_SELECTED}
1274 SectionSetFlags ${secServer} $0
1275 SectionSetText ${secServer} $(REINSTALL_SERVER)
1279 SectionGetFlags ${secServer} $0
1280 IntOp $0 $0 & ${SECTION_OFF}
1281 SectionSetFlags ${secServer} $0
1282 ;# !insertmacro UnselectSection ${secServer}
1286 ; Check control center
1287 Call IsControlInstalled
1289 StrCmp $R2 "0" NoControl
1291 SectionGetFlags ${secControl} $0
1292 IntOp $0 $0 | ${SF_SELECTED}
1293 SectionSetFlags ${secControl} $0
1297 SectionGetFlags ${secControl} $0
1298 IntOp $0 $0 & ${SECTION_OFF}
1299 SectionSetFlags ${secControl} $0
1300 ;# !insertmacro UnselectSection ${secControl}
1303 ; Check Documentation
1304 Call IsDocumentationInstalled
1306 StrCmp $R2 "0" NoDocs
1307 SectionGetFlags ${secDocs} $0
1308 IntOp $0 $0 | ${SF_SELECTED}
1309 SectionSetFlags ${secDocs} $0
1313 SectionGetFlags ${secDocs} $0
1314 IntOp $0 $0 & ${SECTION_OFF}
1315 SectionSetFlags ${secDocs} $0
1318 ; To check the SDK, we simply look to see if the files exist. If they do,
1319 ; the SDK is installed. If not, we don't need to push it on the user.
1320 ; If they are there, we want to make sure they match the installed version.
1322 IfFileExists "$INSTDIR\Client\Program\Include\main.h" +1 NoSDK
1323 SectionGetFlags ${secSDK} $0
1324 IntOp $0 $0 | ${SF_SELECTED}
1325 SectionSetFlags ${secSDK} $0
1329 SectionGetFlags ${secSDK} $0
1330 IntOp $0 $0 & ${SECTION_OFF}
1331 SectionSetFlags ${secSDK} $0
1336 SectionGetFlags ${secClient} $0
1337 IntOp $0 $0 | ${SF_SELECTED}
1338 SectionSetFlags ${secClient} $0
1340 ; Server NOT selected
1341 SectionGetFlags ${secServer} $0
1342 IntOp $0 $0 & ${SECTION_OFF}
1343 SectionSetFlags ${secServer} $0
1345 ; Control Center NOT selected
1346 SectionGetFlags ${secControl} $0
1347 IntOp $0 $0 & ${SECTION_OFF}
1348 SectionSetFlags ${secControl} $0
1349 ;# !insertmacro UnselectSection ${secControl}
1351 ; Documentation selected
1352 SectionGetFlags ${secDocs} $0
1353 IntOp $0 $0 | ${SF_SELECTED}
1354 SectionSetFlags ${secDocs} $0
1355 ;# !insertmacro UnselectSection ${secDocs}
1358 SectionGetFlags ${secSDK} $0
1359 IntOp $0 $0 & ${SECTION_OFF}
1360 SectionSetFlags ${secSDK} $0
1361 ;# !insertmacro UnselectSection ${secSDK}
1370 ; See if we can set a default installation path...
1371 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PathName"
1372 StrCmp $R0 "" TryServer
1376 ; Work around bug in 1.3.5000, 1.3.5100, 1.3.5200, 1.3.5201, 1.3.5299 installers...
1377 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MajorVersion"
1378 StrCmp $R0 "1" +1 SkipParent
1379 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MinorVersion"
1380 StrCmp $R0 "3" +1 SkipParent
1381 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PatchLevel"
1382 StrCmp $R0 "5000" UpParent
1383 StrCmp $R0 "5100" UpParent
1384 StrCmp $R0 "5200" UpParent
1385 StrCmp $R0 "5201" UpParent
1386 StrCmp $R0 "5299" UpParent
1398 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PathName"
1399 StrCmp $R0 "" TryControl
1407 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PathName"
1415 File /oname=$0 CellServPage.ini
1417 File /oname=$1 AFSCell.ini
1418 ;File /oname=$1 ConfigURL.ini
1426 ;--------------------------------
1427 ; These are our cleanup functions
1428 Function .onInstFailed
1433 Function .onInstSuccess
1439 ;--------------------------------
1442 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
1443 !insertmacro MUI_DESCRIPTION_TEXT ${secServer} $(DESC_secServer)
1444 !insertmacro MUI_DESCRIPTION_TEXT ${secClient} $(DESC_secClient)
1445 !insertmacro MUI_DESCRIPTION_TEXT ${secControl} $(DESC_secControl)
1446 !insertmacro MUI_DESCRIPTION_TEXT ${secDocs} $(DESC_secDocs)
1447 !insertmacro MUI_DESCRIPTION_TEXT ${secSDK} $(DESC_secSDK)
1448 !insertmacro MUI_FUNCTION_DESCRIPTION_END
1450 ;--------------------------------
1451 ;Uninstaller Section
1454 ; Make sure the user REALLY wants to do this, unless they did a silent uninstall, in which case...let them!
1455 IfSilent StartRemove ; New in v2.0b4
1456 MessageBox MB_YESNO "Are you sure you want to remove OpenAFS from this machine?" IDYES StartRemove
1461 SetShellVarContext all
1462 ; Stop the running processes
1464 File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe"
1465 nsExec::Exec '$R0 afscreds.exe'
1466 Exec "afscreds.exe -z"
1467 ; in case we are upgrading an old version that does not support -z
1469 nsExec::Exec '$R0 afscreds.exe'
1471 nsExec::Exec '$R0 krbcc32s.exe'
1474 ; Delete the AFS service
1476 File /oname=$R0 "${AFS_WININSTALL_DIR}\Service.exe"
1477 nsExec::Exec "net stop TransarcAFSDaemon"
1478 nsExec::Exec "net stop TransarcAFSServer"
1479 nsExec::Exec '$R0 u TransarcAFSDaemon'
1480 ; After we stop the service, but before we delete it, we have to remove the volume data
1481 ; This is because the storage locations are in the registry under the service key.
1482 ; Call un.RemoveAFSVolumes
1483 nsExec::Exec '$R0 u TransarcAFSServer'
1486 Call un.RemoveProvider
1488 Push "$INSTDIR\Client\Program"
1489 Call un.RemoveFromPath
1490 Push "$INSTDIR\Common"
1491 Call un.RemoveFromPath
1493 Push "$INSTDIR\kfw\bin"
1494 Call un.RemoveFromPath
1497 ; Delete documentation
1498 Delete "$INSTDIR\Documentation\README.TXT"
1499 Delete "$INSTDIR\Documentation\html\*"
1500 Delete "$INSTDIR\Documentation\html\CmdRef\*"
1501 Delete "$INSTDIR\Documentation\html\InstallGd\*"
1502 Delete "$INSTDIR\Documentation\html\ReleaseNotes\*"
1503 Delete "$INSTDIR\Documentation\html\SysAdminGd\*"
1505 Delete /REBOOTOK "$INSTDIR\Common\afs_config.exe"
1506 Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.dll"
1507 Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.dll"
1508 Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.dll"
1509 Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.dll"
1510 Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.dll"
1511 Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.dll"
1512 Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.dll"
1513 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll"
1514 Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.dll"
1515 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll"
1516 Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.dll"
1517 Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.dll"
1518 Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.dll"
1519 Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.dll"
1522 Delete /REBOOTOK "$INSTDIR\Common\afs_config.pdb"
1523 Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.pdb"
1524 Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.pdb"
1525 Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.pdb"
1526 Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.pdb"
1527 Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.pdb"
1528 Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.pdb"
1529 Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.pdb"
1530 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.pdb"
1531 Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.pdb"
1532 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.pdb"
1533 Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.pdb"
1534 Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.pdb"
1535 Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.pdb"
1536 Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.pdb"
1539 Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.dll"
1540 Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.pdb"
1541 Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.dll"
1542 Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.pdb"
1543 Delete /REBOOTOK "$INSTDIR\bin\mfc71d.dll"
1544 Delete /REBOOTOK "$INSTDIR\bin\mfc71d.pdb"
1547 Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.dll"
1548 Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.pdb"
1549 Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.dll"
1550 Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.pdb"
1551 Delete /REBOOTOK "$INSTDIR\bin\mfc70d.dll"
1552 Delete /REBOOTOK "$INSTDIR\bin\mfc70d.pdb"
1554 Delete /REBOOTOK "$INSTDIR\bin\mfc42d.dll"
1555 Delete /REBOOTOK "$INSTDIR\bin\mfc42d.pdb"
1556 Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.dll"
1557 Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.pdb"
1558 Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.dll"
1559 Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.pdb"
1564 Delete /REBOOTOK "$INSTDIR\bin\mfc71.dll"
1565 Delete /REBOOTOK "$INSTDIR\bin\msvcr71.dll"
1566 Delete /REBOOTOK "$INSTDIR\bin\msvcp71.dll"
1567 Delete /REBOOTOK "$INSTDIR\bin\MFC71CHS.DLL"
1568 Delete /REBOOTOK "$INSTDIR\bin\MFC71CHT.DLL"
1569 Delete /REBOOTOK "$INSTDIR\bin\MFC71DEU.DLL"
1570 Delete /REBOOTOK "$INSTDIR\bin\MFC71ENU.DLL"
1571 Delete /REBOOTOK "$INSTDIR\bin\MFC71ESP.DLL"
1572 Delete /REBOOTOK "$INSTDIR\bin\MFC71FRA.DLL"
1573 Delete /REBOOTOK "$INSTDIR\bin\MFC71ITA.DLL"
1574 Delete /REBOOTOK "$INSTDIR\bin\MFC71JPN.DLL"
1575 Delete /REBOOTOK "$INSTDIR\bin\MFC71KOR.DLL"
1578 Delete /REBOOTOK "$INSTDIR\bin\mfc70.dll"
1579 Delete /REBOOTOK "$INSTDIR\bin\msvcr70.dll"
1580 Delete /REBOOTOK "$INSTDIR\bin\msvcp70.dll"
1581 Delete /REBOOTOK "$INSTDIR\bin\MFC70CHS.DLL"
1582 Delete /REBOOTOK "$INSTDIR\bin\MFC70CHT.DLL"
1583 Delete /REBOOTOK "$INSTDIR\bin\MFC70DEU.DLL"
1584 Delete /REBOOTOK "$INSTDIR\bin\MFC70ENU.DLL"
1585 Delete /REBOOTOK "$INSTDIR\bin\MFC70ESP.DLL"
1586 Delete /REBOOTOK "$INSTDIR\bin\MFC70FRA.DLL"
1587 Delete /REBOOTOK "$INSTDIR\bin\MFC70ITA.DLL"
1588 Delete /REBOOTOK "$INSTDIR\bin\MFC70JPN.DLL"
1589 Delete /REBOOTOK "$INSTDIR\bin\MFC70KOR.DLL"
1591 Delete /REBOOTOK "$INSTDIR\bin\mfc42.dll"
1592 Delete /REBOOTOK "$INSTDIR\bin\msvcp60.dll"
1593 Delete /REBOOTOK "$INSTDIR\bin\msvcrt.dll"
1599 ; IfFileExists "$WINDIR\afsdcell.ini" CellExists SkipDelAsk
1601 MessageBox MB_YESNO "Would you like to keep your configuration files?" IDYES SkipDel
1603 Delete "$WINDIR\afsdcell.ini"
1605 Delete "$WINDIR\afsdsbmt.ini"
1606 ; Only remove krb5.ini if KfW was installed
1608 Delete "$WINDIR\krb5.ini"
1610 Delete "$WINDIR\afsdns.ini"
1611 Delete "$WINDIR\afs_freelance.ini"
1614 Delete "$WINDIR\afsd_init.log"
1615 Delete "$INSTDIR\Uninstall.exe"
1618 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.exe"
1619 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe"
1620 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe"
1621 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.exe"
1622 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.exe"
1623 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.exe"
1624 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.exe"
1625 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.exe"
1626 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.exe"
1627 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.exe"
1628 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\salvager.exe"
1629 Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.dll"
1630 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\upclient.exe"
1631 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\upserver.exe"
1632 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\vlserver.exe"
1633 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\volinfo.exe"
1634 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\volserver.exe"
1637 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.pdb"
1638 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.pdb"
1639 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.pdb"
1640 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.pdb"
1641 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.pdb"
1642 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.pdb"
1643 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.pdb"
1644 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.pdb"
1645 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.pdb"
1646 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.pdb"
1647 Delete "$INSTDIR\Server\usr\afs\bin\salvager.pdb"
1648 Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.pdb"
1649 Delete "$INSTDIR\Server\usr\afs\bin\upclient.pdb"
1650 Delete "$INSTDIR\Server\usr\afs\bin\upserver.pdb"
1651 Delete "$INSTDIR\Server\usr\afs\bin\vlserver.pdb"
1652 Delete "$INSTDIR\Server\usr\afs\bin\volinfo.pdb"
1653 Delete "$INSTDIR\Server\usr\afs\bin\volserver.pdb"
1656 RMDir /r "$INSTDIR\Server\usr\afs\bin"
1657 ; do not delete the server configuration files
1658 ; or we will lose the volumes and authentication
1660 ;RmDir /r "$INSTDIR\Server\usr\afs\etc\logs"
1661 ;RmDir /r "$INSTDIR\Server\usr\afs\etc"
1662 ;RmDir /r "$INSTDIR\Server\usr\afs\local"
1663 ;RMDIR /r "$INSTDIR\Server\usr\afs\logs"
1665 Delete /REBOOTOK "$SYSDIR\afsserver.cpl"
1666 Delete /REBOOTOK "$SYSDIR\afs_cpa.cpl"
1669 Delete /REBOOTOK "$SYSDIR\afsserver.pdb"
1670 Delete /REBOOTOK "$SYSDIR\afs_cpa.pdb"
1673 RMDir /r "$INSTDIR\Documentation\html\CmdRef"
1674 RMDir /r "$INSTDIR\Documentation\html\InstallGd"
1675 RMDir /r "$INSTDIR\Documentation\html\ReleaseNotes"
1676 RMDir /r "$INSTDIR\Documentation\html\SysAdminGd"
1677 RMDIr /r "$INSTDIR\Documentation\html"
1679 RMDir "$INSTDIR\Documentation"
1680 ; Delete DOC short cut
1681 Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.exe"
1684 Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.pdb"
1687 Delete /REBOOTOK "$INSTDIR\Client\Program\*"
1688 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\*"
1689 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\afs\*"
1690 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\rx\*"
1691 Delete /REBOOTOK "$INSTDIR\Client\Program\Sample\*"
1692 RMDir "$INSTDIR\Client\Program\Sample"
1693 RMDir "$INSTDIR\Client\Program\Include\afs"
1694 RMDir "$INSTDIR\Client\Program\Include\rx"
1695 RMDir "$INSTDIR\Client\Program\Include"
1696 RMDir "$INSTDIR\Client\Program"
1697 RMDir "$INSTDIR\Client"
1701 Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.dll"
1702 Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.pdb"
1703 Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.dll"
1704 Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.pdb"
1705 Delete /REBOOTOK "$INSTDIR\bin\mfc71d.dll"
1706 Delete /REBOOTOK "$INSTDIR\bin\mfc71d.pdb"
1709 Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.dll"
1710 Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.pdb"
1711 Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.dll"
1712 Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.pdb"
1713 Delete /REBOOTOK "$INSTDIR\bin\mfc70d.dll"
1714 Delete /REBOOTOK "$INSTDIR\bin\mfc70d.pdb"
1716 Delete /REBOOTOK "$INSTDIR\bin\mfc42d.dll"
1717 Delete /REBOOTOK "$INSTDIR\bin\mfc42d.pdb"
1718 Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.dll"
1719 Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.pdb"
1720 Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.dll"
1721 Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.pdb"
1726 Delete /REBOOTOK "$INSTDIR\bin\mfc71.dll"
1727 Delete /REBOOTOK "$INSTDIR\bin\msvcr71.dll"
1728 Delete /REBOOTOK "$INSTDIR\bin\msvcp71.dll"
1729 Delete /REBOOTOK "$INSTDIR\bin\MFC71CHS.DLL"
1730 Delete /REBOOTOK "$INSTDIR\bin\MFC71CHT.DLL"
1731 Delete /REBOOTOK "$INSTDIR\bin\MFC71DEU.DLL"
1732 Delete /REBOOTOK "$INSTDIR\bin\MFC71ENU.DLL"
1733 Delete /REBOOTOK "$INSTDIR\bin\MFC71ESP.DLL"
1734 Delete /REBOOTOK "$INSTDIR\bin\MFC71FRA.DLL"
1735 Delete /REBOOTOK "$INSTDIR\bin\MFC71ITA.DLL"
1736 Delete /REBOOTOK "$INSTDIR\bin\MFC71JPN.DLL"
1737 Delete /REBOOTOK "$INSTDIR\bin\MFC71KOR.DLL"
1740 Delete /REBOOTOK "$INSTDIR\bin\mfc70.dll"
1741 Delete /REBOOTOK "$INSTDIR\bin\msvcr70.dll"
1742 Delete /REBOOTOK "$INSTDIR\bin\msvcp70.dll"
1743 Delete /REBOOTOK "$INSTDIR\bin\MFC70CHS.DLL"
1744 Delete /REBOOTOK "$INSTDIR\bin\MFC70CHT.DLL"
1745 Delete /REBOOTOK "$INSTDIR\bin\MFC70DEU.DLL"
1746 Delete /REBOOTOK "$INSTDIR\bin\MFC70ENU.DLL"
1747 Delete /REBOOTOK "$INSTDIR\bin\MFC70ESP.DLL"
1748 Delete /REBOOTOK "$INSTDIR\bin\MFC70FRA.DLL"
1749 Delete /REBOOTOK "$INSTDIR\bin\MFC70ITA.DLL"
1750 Delete /REBOOTOK "$INSTDIR\bin\MFC70JPN.DLL"
1751 Delete /REBOOTOK "$INSTDIR\bin\MFC70KOR.DLL"
1753 Delete /REBOOTOK "$INSTDIR\bin\mfc42.dll"
1754 Delete /REBOOTOK "$INSTDIR\bin\msvcp60.dll"
1755 Delete /REBOOTOK "$INSTDIR\bin\msvcrt.dll"
1760 Delete /REBOOTOK "$INSTDIR\Common\*"
1761 RMDir "$INSTDIR\Common"
1765 Delete /REBOOTOK "$INSTDIR\kfw\bin\*"
1766 RMDIR /r "$INSTDIR\kfw\bin"
1767 Delete /REBOOTOK "$INSTDIR\kfw\doc\*"
1768 RMDIR /r "$INSTDIR\kfw\doc"
1769 RMDIR /r "$INSTDIR\kfw"
1772 Delete "$SMPROGRAMS\OpenAFS\Documentation.lnk"
1774 ; Remove control center
1775 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.exe"
1776 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.exe"
1777 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.exe"
1778 Delete /REBOOTOK "$INSTDIR\Control Center\CCUninst.dll"
1780 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.pdb"
1781 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.pdb"
1782 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.pdb"
1784 RMDir "$INSTDIR\Control Center"
1786 Delete "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk"
1787 Delete "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk"
1788 Delete "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk"
1789 Delete "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk"
1790 RMDIR "$SMPROGRAMS\OpenAFS\Control Center"
1791 RMDir /r "$SMPROGRAMS\OpenAFS\Client"
1792 RMDir /r "$SMPROGRAMS\OpenAFS"
1793 Delete "$SMSTARTUP\AFS Credentials.lnk"
1795 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "CachePath"
1797 Delete "$R0\AFSCache"
1798 Delete "C:\AFSCache"
1800 DeleteRegKey HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension"
1801 DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32"
1802 DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
1803 DeleteRegKey HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension"
1804 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
1806 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
1807 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client"
1808 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion"
1809 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation"
1810 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion"
1811 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Control Center"
1812 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
1813 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server"
1814 DeleteRegKey /ifempty HKLM "${AFS_REGKEY_ROOT}"
1815 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS"
1816 DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled"
1822 ;--------------------------------
1823 ;Uninstaller Functions
1827 ;Get language from registry
1828 ReadRegStr $LANGUAGE HKCU "Software\OpenAFS\AFS" "Installer Language"
1832 Function un.onUninstSuccess
1834 MessageBox MB_OK "Please reboot your machine to complete uninstallation of the software"
1838 ;------------------------------
1839 ; Get the CellServDB file from the Internet
1841 Function afs.GetCellServDB
1843 ;Check if we should download CellServDB
1844 ReadINIStr $R0 $0 "Field 4" "State"
1845 StrCmp $R0 "1" DoDownload
1847 ;Do nothing if we're keeping the existing file
1848 ReadINIStr $R0 $0 "Field 2" "State"
1851 ReadINIStr $R0 $0 "Field 6" "State"
1852 StrCmp $R0 "1" CheckOther
1854 ReadINIStr $R0 $0 "Field 3" "State"
1855 StrCmp $R0 "1" UsePackaged
1857 ; If none of these, grab file from other location
1861 ReadINIStr $R0 $0 "Field 5" "State"
1862 NSISdl::download $R0 "$WINDIR\afsdcell.ini"
1863 Pop $R0 ;Get the return value
1864 StrCmp $R0 "success" +2
1865 MessageBox MB_OK|MB_ICONSTOP "Download failed: $R0"
1869 SetOutPath "$WINDIR"
1874 ReadINIStr $R0 $0 "Field 7" "State"
1876 CopyFiles $R0 "$WINDIR\afsdcell.ini"
1882 Function AddProvider
1885 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder" "ProviderOrder"
1887 StrCpy $R0 "TransarcAFSDaemon"
1891 StrCmp $R0 "" +1 DoOther
1892 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder" "ProviderOrder"
1893 StrCpy $R0 "$R1,TransarcAFSDaemon"
1894 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder" "ProviderOrder" $R0
1896 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order" "ProviderOrder"
1898 StrCpy $R0 "TransarcAFSDaemon"
1902 StrCmp $R0 "" +1 End
1903 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order" "ProviderOrder"
1904 StrCpy $R0 "$R1,TransarcAFSDaemon"
1905 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order" "ProviderOrder" $R0
1911 Function un.RemoveProvider
1913 StrCpy $R0 "TransarcAFSDaemon"
1915 StrCpy $R0 "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder"
1916 Call un.RemoveFromProvider
1917 StrCpy $R0 "TransarcAFSDaemon"
1919 StrCpy $R0 "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order"
1920 Call un.RemoveFromProvider
1924 Function un.RemoveFromProvider
1933 ReadRegStr $1 HKLM "$R0" "ProviderOrder"
1934 StrCpy $5 $1 1 -1 # copy last char
1935 StrCmp $5 "," +2 # if last char != ,
1936 StrCpy $1 "$1," # append ,
1939 Call un.StrStr ; Find `$0,` in $1
1940 Pop $2 ; pos of our dir
1941 StrCmp $2 "" unRemoveFromPath_done
1942 ; else, it is in path
1947 StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
1948 StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
1951 StrCpy $5 $3 1 -1 # copy last char
1952 StrCmp $5 "," 0 +2 # if last char == ,
1953 StrCpy $3 $3 -1 # remove last char
1955 WriteRegStr HKLM "$R0" "ProviderOrder" $3
1957 unRemoveFromPath_done:
1967 Function CheckPathForAFS
1972 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
1981 IfFileExists "$3\afsd_service.exe" Error
1982 StrCpy $1 $0 32768 1
1984 IntCmp $2 0 Done Done loop
1987 MessageBox MB_ICONSTOP|MB_OK|MB_TOPMOST "This installer is unable to upgrade the previous version of AFS. Please uninstall the current AFS version before continuing."
1988 Abort "Unable to install OpenAFS"
1996 Function AddToUniquePath
2000 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
2004 StrCmp $R0 "" +1 Done
2010 ;-------------------------------
2011 ;Do the page to get the CellServDB
2013 Function AFSPageGetCellServDB
2014 ; Skip this page if we are not installing the client
2015 SectionGetFlags ${secClient} $R0
2016 IntOp $R0 $R0 & ${SF_SELECTED}
2019 ; Set the install options here
2022 WriteINIStr $0 "Field 2" "Flags" "DISABLED"
2023 WriteINIStr $0 "Field 3" "State" "1"
2024 WriteINISTR $0 "Field 4" "State" "0"
2025 WriteINIStr $0 "Field 6" "State" "0"
2027 ; If there is an existing afsdcell.ini file, allow the user to choose it and make it default
2028 IfFileExists "$WINDIR\afsdcell.ini" +1 notpresent
2029 WriteINIStr $0 "Field 2" "Flags" "ENABLED"
2030 WriteINIStr $0 "Field 2" "State" "1"
2031 WriteINIStr $0 "Field 3" "State" "0"
2035 !insertmacro MUI_HEADER_TEXT "CellServDB Configuration" "Please choose a method for installing the CellServDB file:"
2036 InstallOptions::dialog $0
2038 StrCmp $R1 "cancel" exit
2039 StrCmp $R1 "back" done
2040 StrCmp $R1 "success" done
2044 ; Check that if a file is set, a valid filename is entered...
2045 ReadINIStr $R0 $0 "Field 6" "State"
2046 StrCmp $R0 "1" CheckFileName
2048 ;Check if a URL is specified, one *IS* specified
2049 ReadINIStr $R0 $0 "Field 4" "State"
2050 StrCmp $R0 "1" CheckURL Skip
2053 ReadINIStr $R0 $0 "Field 5" "State"
2054 StrCmp $R0 "" +1 Skip
2055 MessageBox MB_OK|MB_ICONSTOP $(URLError)
2056 WriteINIStr $0 "Field 4" "State" "0"
2060 ReadINIStr $R0 $0 "Field 7" "State"
2061 IfFileExists $R0 Skip
2063 MessageBox MB_OK|MB_ICONSTOP $(CellError)
2064 WriteINIStr $0 "Field 6" "State" "0"
2072 Function AFSPageGetCellName
2074 ; Skip this page if we are not installing the client
2075 SectionGetFlags ${secClient} $R0
2076 IntOp $R0 $R0 & ${SF_SELECTED}
2080 ; If this is a server install, we do NOT want to recommend the Freelance client
2081 ; And we do not need to ask for the cell name.
2082 SectionGetFlags ${secServer} $R1
2083 IntOp $R1 $R1 & ${SF_SELECTED}
2084 StrCmp $R1 "1" +1 NotServer
2085 WriteINIStr $1 "Field 6" "Text" "Enable AFS Freelance client (Not Recommended for servers)"
2086 WriteINIStr $1 "Field 5" "State" "0"
2087 WriteINIStr $1 "Field 1" "Flags" "DISABLED"
2088 WriteINIStr $1 "Field 2" "Flags" "DISABLED"
2091 WriteINIStr $1 "Field 6" "Text" "Enable AFS Freelance client (Recommended)"
2092 WriteINIStr $1 "Field 5" "State" "1"
2093 WriteINIStr $1 "Field 1" "Flags" ""
2094 WriteINIStr $1 "Field 2" "Flags" ""
2096 ; Get the current cell name, if any
2097 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell"
2099 WriteINIStr $1 "Field 2" "State" $R1
2100 !insertmacro MUI_HEADER_TEXT "Client Cell Name Configuration" "Please enter the name for your default cell:"
2101 InstallOptions::dialog $1
2103 StrCmp $R1 "cancel" exit
2104 StrCmp $R1 "back" done
2105 StrCmp $R1 "success" done
2108 ReadINIStr $R0 $1 "Field 2" "State"
2109 StrCmp $R0 "" +1 good
2111 MessageBox MB_OK|MB_ICONSTOP $(CellNameError)
2117 ; Common install routines for each module
2118 Function AFSCommon.Install
2120 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayName" "OpenAFS for Windows"
2121 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "UninstallString" "$INSTDIR\uninstall.exe"
2123 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayVersion" "${AFS_VERSION}"
2125 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayVersion" "${AFS_VERSION} Checked/Debug"
2127 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "URLInfoAbout" "http://www.openafs.org/"
2132 ;-------------------
2133 ; Get the currently installed version and place it on the stack
2135 Function GetInstalledVersion
2140 ReadRegStr $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "VersionString"
2141 StrCmp $R0 "" NotTransarc done
2145 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "VersionString"
2154 ; Functions to get each component of the version number
2155 Function GetInstalledVersionMajor
2160 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "MajorVersion"
2161 StrCmp $R0 "" NotTransarc done
2165 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "MajorVersion"
2174 Function GetInstalledVersionMinor
2179 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "MinorVersion"
2180 StrCmp $R0 "" NotTransarc done
2184 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "MinorVersion"
2193 Function GetInstalledVersionPatch
2198 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "PatchLevel"
2199 StrCmp $R0 "" NotTransarc done
2203 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "PatchLevel"
2214 ;-------------------------------
2215 ; Check if the client should be checked for default install
2216 Function ShouldClientInstall
2218 StrCpy $R2 "AFS Client"
2219 Call GetInstalledVersion
2222 StrCmp $R0 "" NotInstalled
2223 ; Now we see if it's an older or newer version
2225 Call GetInstalledVersionMajor
2227 IntCmpU $R0 ${AFS_MAJORVERSION} +1 Upgrade Downgrade
2229 Call GetInstalledVersionMinor
2231 IntCmpU $R0 ${AFS_MINORVERSION} +1 Upgrade Downgrade
2233 Call GetInstalledVersionPatch
2235 IntCmpU $R0 ${AFS_PATCHLEVEL} Reinstall Upgrade Downgrade
2258 ;-------------------------------
2259 ; Check how the server options should be set
2260 Function ShouldServerInstall
2262 StrCpy $R2 "AFS Server"
2263 Call GetInstalledVersion
2266 StrCmp $R0 "" NotInstalled
2267 ; Now we see if it's an older or newer version
2269 Call GetInstalledVersionMajor
2271 IntCmpU $R0 ${AFS_MAJORVERSION} +1 Upgrade Downgrade
2273 Call GetInstalledVersionMinor
2275 IntCmpU $R0 ${AFS_MINORVERSION} +1 Upgrade Downgrade
2277 Call GetInstalledVersionPatch
2279 IntCmpU $R0 ${AFS_PATCHLEVEL} Reinstall Upgrade Downgrade
2304 ; See if AFS Server is installed
2305 ; Returns: "1" if it is, 0 if it is not (on the stack)
2306 Function IsServerInstalled
2308 StrCpy $R2 "AFS Server"
2309 Call GetInstalledVersion
2312 StrCmp $R0 "" NotInstalled
2325 ; See if AFS Client is installed
2326 ; Returns: "1" if it is, 0 if it is not (on the stack)
2327 Function IsClientInstalled
2329 StrCpy $R2 "AFS Client"
2330 Call GetInstalledVersion
2333 StrCmp $R0 "" NotInstalled
2347 ; See if AFS Documentation is installed
2348 ; Returns: "1" if it is, 0 if it is not (on the stack)
2349 Function IsDocumentationInstalled
2351 StrCpy $R2 "AFS Supplemental Documentation"
2352 Call GetInstalledVersion
2355 StrCmp $R0 "" NotInstalled
2368 ; See if Control Center is installed
2369 ; Returns: "1" if it is, 0 if it is not (on the stack)
2370 Function IsControlInstalled
2372 StrCpy $R2 "AFS Control Center"
2373 Call GetInstalledVersion
2376 StrCmp $R0 "" NotInstalled
2391 ; output, top of stack (replaces, with e.g. whatever)
2392 ; modifies no other variables.
2394 Function GetParameters
2398 StrCpy $R0 $CMDLINE 1
2402 StrCpy $R1 ' ' ; we're scanning for a space instead of a quote
2404 StrCpy $R0 $CMDLINE 1 $R2
2405 StrCmp $R0 $R1 loop2
2411 StrCpy $R0 $CMDLINE 1 $R2
2412 StrCmp $R0 " " loop2
2413 StrCpy $R0 $CMDLINE "" $R2
2420 ;Check to see if any AFS component is installed
2421 ;Returns: Value on stack: "1" if it is, "0" if it is not
2422 Function IsAnyAFSInstalled
2427 Call IsClientInstalled
2429 Call IsServerInstalled
2431 Call IsControlInstalled
2433 Call IsDocumentationInstalled
2435 ; Now we must see if ANY of the $Rn values are 1
2436 StrCmp $R0 "1" SomethingInstalled
2437 StrCmp $R1 "1" SomethingInstalled
2438 StrCmp $R2 "1" SomethingInstalled
2439 StrCmp $R3 "1" SomethingInstalled
2453 ;Install English Language Files
2454 Function AFSLangFiles
2456 SetOutPath "$INSTDIR\Common"
2457 File "${AFS_CLIENT_BUILDDIR}\afs_config.exe"
2458 File "${AFS_SERVER_BUILDDIR}\afsadminutil.dll"
2459 !insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afsauthent.dll" "$INSTDIR\Common\afsauthent.dll" "$INSTDIR"
2460 !insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afspthread.dll" "$INSTDIR\Common\afspthread.dll" "$INSTDIR"
2461 !insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afsrpc.dll" "$INSTDIR\Common\afsrpc.dll" "$INSTDIR"
2462 File "${AFS_SERVER_BUILDDIR}\afsclientadmin.dll"
2463 File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.dll"
2464 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
2465 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.dll"
2466 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
2467 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll"
2468 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
2469 File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
2470 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
2474 File "${SYSTEMDIR}\msvcr71d.dll"
2475 File "${SYSTEMDIR}\msvcr71d.pdb"
2476 File "${SYSTEMDIR}\msvcp71d.dll"
2477 File "${SYSTEMDIR}\msvcp71d.pdb"
2478 File "${SYSTEMDIR}\mfc71d.dll"
2479 File "${SYSTEMDIR}\mfc71d.pdb"
2480 File "${SYSTEMDIR}\MFC71CHS.DLL"
2481 File "${SYSTEMDIR}\MFC71CHT.DLL"
2482 File "${SYSTEMDIR}\MFC71DEU.DLL"
2483 File "${SYSTEMDIR}\MFC71ENU.DLL"
2484 File "${SYSTEMDIR}\MFC71ESP.DLL"
2485 File "${SYSTEMDIR}\MFC71FRA.DLL"
2486 File "${SYSTEMDIR}\MFC71ITA.DLL"
2487 File "${SYSTEMDIR}\MFC71JPN.DLL"
2488 File "${SYSTEMDIR}\MFC71KOR.DLL"
2491 File "${SYSTEMDIR}\msvcr70d.dll"
2492 File "${SYSTEMDIR}\msvcr70d.pdb"
2493 File "${SYSTEMDIR}\msvcp70d.dll"
2494 File "${SYSTEMDIR}\msvcp70d.pdb"
2495 File "${SYSTEMDIR}\mfc70d.dll"
2496 File "${SYSTEMDIR}\mfc70d.pdb"
2497 File "${SYSTEMDIR}\MFC70CHS.DLL"
2498 File "${SYSTEMDIR}\MFC70CHT.DLL"
2499 File "${SYSTEMDIR}\MFC70DEU.DLL"
2500 File "${SYSTEMDIR}\MFC70ENU.DLL"
2501 File "${SYSTEMDIR}\MFC70ESP.DLL"
2502 File "${SYSTEMDIR}\MFC70FRA.DLL"
2503 File "${SYSTEMDIR}\MFC70ITA.DLL"
2504 File "${SYSTEMDIR}\MFC70JPN.DLL"
2505 File "${SYSTEMDIR}\MFC70KOR.DLL"
2507 File "${SYSTEMDIR}\mfc42d.dll"
2508 File "${SYSTEMDIR}\mfc42d.pdb"
2509 File "${SYSTEMDIR}\msvcp60d.dll"
2510 File "${SYSTEMDIR}\msvcp60d.pdb"
2511 File "${SYSTEMDIR}\msvcrtd.dll"
2512 File "${SYSTEMDIR}\msvcrtd.pdb"
2517 File "${SYSTEMDIR}\mfc71.dll"
2518 File "${SYSTEMDIR}\msvcr71.dll"
2519 File "${SYSTEMDIR}\msvcp71.dll"
2520 File "${SYSTEMDIR}\MFC71CHS.DLL"
2521 File "${SYSTEMDIR}\MFC71CHT.DLL"
2522 File "${SYSTEMDIR}\MFC71DEU.DLL"
2523 File "${SYSTEMDIR}\MFC71ENU.DLL"
2524 File "${SYSTEMDIR}\MFC71ESP.DLL"
2525 File "${SYSTEMDIR}\MFC71FRA.DLL"
2526 File "${SYSTEMDIR}\MFC71ITA.DLL"
2527 File "${SYSTEMDIR}\MFC71JPN.DLL"
2528 File "${SYSTEMDIR}\MFC71KOR.DLL"
2531 File "${SYSTEMDIR}\mfc70.dll"
2532 File "${SYSTEMDIR}\msvcr70.dll"
2533 File "${SYSTEMDIR}\msvcp70.dll"
2534 File "${SYSTEMDIR}\MFC70CHS.DLL"
2535 File "${SYSTEMDIR}\MFC70CHT.DLL"
2536 File "${SYSTEMDIR}\MFC70DEU.DLL"
2537 File "${SYSTEMDIR}\MFC70ENU.DLL"
2538 File "${SYSTEMDIR}\MFC70ESP.DLL"
2539 File "${SYSTEMDIR}\MFC70FRA.DLL"
2540 File "${SYSTEMDIR}\MFC70ITA.DLL"
2541 File "${SYSTEMDIR}\MFC70JPN.DLL"
2542 File "${SYSTEMDIR}\MFC70KOR.DLL"
2544 File "${SYSTEMDIR}\mfc42.dll"
2545 File "${SYSTEMDIR}\msvcp60.dll"
2546 File "${SYSTEMDIR}\msvcrt.dll"
2552 File "${AFS_CLIENT_BUILDDIR}\afs_config.pdb"
2553 File "${AFS_SERVER_BUILDDIR}\afsadminutil.pdb"
2554 File "${AFS_DESTDIR}\lib\afsauthent.pdb"
2555 File "${AFS_DESTDIR}\lib\afspthread.pdb"
2556 File "${AFS_DESTDIR}\lib\afsrpc.pdb"
2557 File "${AFS_SERVER_BUILDDIR}\afsclientadmin.pdb"
2558 File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.pdb"
2559 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
2560 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.pdb"
2561 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
2562 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb"
2563 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb"
2564 File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb"
2565 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb"
2568 StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
2569 StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
2570 StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
2571 StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
2572 StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
2573 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
2574 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
2575 StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
2579 SetOutPath "$INSTDIR\Documentation"
2580 File "..\..\doc\install\Documentation\en_US\README.TXT"
2582 SetOutPath "$INSTDIR\Client\Program"
2583 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1033.dll" "$INSTDIR\Client\Program\afscreds_1033.dll" "$INSTDIR"
2584 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.dll" "$INSTDIR\Client\Program\afs_shl_ext_1033.dll" "$INSTDIR"
2586 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.pdb"
2587 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.pdb"
2590 SetOutPath "$INSTDIR\Common"
2591 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1033.dll" "$INSTDIR\Common\afs_config_1033.dll" "$INSTDIR"
2592 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.dll" "$INSTDIR\Common\afs_cpa_1033.dll" "$INSTDIR"
2593 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.dll" "$INSTDIR\Common\afseventmsg_1033.dll" "$INSTDIR"
2594 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1033.dll" "$INSTDIR\Common\afs_setup_utils_1033.dll" "$INSTDIR"
2595 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_1033.dll" "$INSTDIR\Common\afsserver_1033.dll" "$INSTDIR"
2596 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.dll" "$INSTDIR\Common\afssvrcfg_1033.dll" "$INSTDIR"
2597 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.dll" "$INSTDIR\Common\TaAfsAccountManager_1033.dll" "$INSTDIR"
2598 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.dll" "$INSTDIR\Common\TaAfsApplLib_1033.dll" "$INSTDIR"
2599 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.dll" "$INSTDIR\Common\TaAfsServerManager_1033.dll" "$INSTDIR"
2600 File "..\..\doc\help\en_US\afs-cc.CNT"
2601 File "..\..\doc\help\en_US\afs-cc.hlp"
2602 File "..\..\doc\help\en_US\afs-light.CNT"
2603 File "..\..\doc\help\en_US\afs-light.hlp"
2604 File "..\..\doc\help\en_US\afs-nt.CNT"
2605 File "..\..\doc\help\en_US\afs-nt.HLP"
2606 File "..\..\doc\help\en_US\taafscfg.CNT"
2607 File "..\..\doc\help\en_US\taafscfg.hlp"
2608 File "..\..\doc\help\en_US\taafssvrmgr.CNT"
2609 File "..\..\doc\help\en_US\taafssvrmgr.hlp"
2610 File "..\..\doc\help\en_US\taafsusrmgr.CNT"
2611 File "..\..\doc\help\en_US\taafsusrmgr.hlp"
2614 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.pdb"
2615 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.pdb"
2616 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.pdb"
2617 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1033.pdb"
2618 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.pdb"
2619 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.pdb"
2620 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.pdb"
2621 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.pdb"
2627 SetOutPath "$INSTDIR\Documentation"
2628 File "..\..\doc\install\Documentation\de_DE\README.TXT"
2630 SetOutPath "$INSTDIR\Client\Program"
2631 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1032.dll" "$INSTDIR\Client\Program\afscreds_1032.dll" "$INSTDIR"
2632 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1032.dll" "$INSTDIR\Client\Program\afs_shl_ext_1032.dll" "$INSTDIR"
2634 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1032.pdb"
2635 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1032.pdb"
2638 SetOutPath "$INSTDIR\Common"
2639 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1032.dll" "$INSTDIR\Common\afs_config_1032.dll" "$INSTDIR"
2640 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.dll" "$INSTDIR\Common\afs_cpa_1032.dll" "$INSTDIR"
2641 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1032.dll" "$INSTDIR\Common\afseventmsg_1032.dll" "$INSTDIR"
2642 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1032.dll" "$INSTDIR\Common\afs_setup_utils_1032.dll" "$INSTDIR"
2643 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_1032.dll" "$INSTDIR\Common\afsserver_1032.dll" "$INSTDIR"
2644 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1032.dll" "$INSTDIR\Common\afssvrcfg_1032.dll" "$INSTDIR"
2645 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1032.dll" "$INSTDIR\Common\TaAfsAccountManager_1032.dll" "$INSTDIR"
2646 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1032.dll" "$INSTDIR\Common\TaAfsAppLib_1032.dll" "$INSTDIR"
2647 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1032.dll" "$INSTDIR\Common\TaAfsServerManager_1032.dll" "$INSTDIR"
2648 File "..\..\doc\help\de_DE\afs-cc.CNT"
2649 File "..\..\doc\help\de_DE\afs-cc.hlp"
2650 File "..\..\doc\help\de_DE\afs-light.CNT"
2651 File "..\..\doc\help\de_DE\afs-light.hlp"
2652 File "..\..\doc\help\de_DE\afs-nt.CNT"
2653 File "..\..\doc\help\de_DE\afs-nt.HLP"
2654 File "..\..\doc\help\de_DE\taafscfg.CNT"
2655 File "..\..\doc\help\de_DE\taafscfg.hlp"
2656 File "..\..\doc\help\de_DE\taafssvrmgr.CNT"
2657 File "..\..\doc\help\de_DE\taafssvrmgr.hlp"
2658 File "..\..\doc\help\de_DE\taafsusrmgr.CNT"
2659 File "..\..\doc\help\de_DE\taafsusrmgr.hlp"
2662 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1032.pdb"
2663 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.pdb"
2664 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1032.pdb"
2665 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1032.pdb"
2666 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1032.pdb"
2667 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1032.pdb"
2668 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1032.pdb"
2669 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1032.pdb"
2675 SetOutPath "$INSTDIR\Documentation"
2676 File "..\..\doc\install\Documentation\es_ES\README.TXT"
2678 SetOutPath "$INSTDIR\Client\Program"
2679 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1034.dll" "$INSTDIR\Client\Program\afscreds_1034.dll" "$INSTDIR"
2680 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.dll" "$INSTDIR\Client\Program\afs_shl_ext_1034.dll" "$INSTDIR"
2682 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1034.pdb"
2683 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.pdb"
2686 SetOutPath "$INSTDIR\Common"
2687 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1034.dll" "$INSTDIR\Common\afs_config_1034.dll" "$INSTDIR"
2688 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.dll" "$INSTDIR\Common\afs_cpa_1034.dll" "$INSTDIR"
2689 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1034.dll" "$INSTDIR\Common\afseventmsg_1034.dll" "$INSTDIR"
2690 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1034.dll" "$INSTDIR\Common\afs_setup_utils_1034.dll" "$INSTDIR"
2691 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_1034.dll" "$INSTDIR\Common\afsserver_1034.dll" "$INSTDIR"
2692 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1034.dll" "$INSTDIR\Common\afssvrcfg_1034.dll" "$INSTDIR"
2693 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1034.dll" "$INSTDIR\Common\TaAfsAccountManager_1034.dll" "$INSTDIR"
2694 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1034.dll" "$INSTDIR\Common\TaAfsAppLib_1034.dll" "$INSTDIR"
2695 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1034.dll" "$INSTDIR\Common\TaAfsServerManager_1034.dll" "$INSTDIR"
2696 File "..\..\doc\help\es_ES\afs-cc.CNT"
2697 File "..\..\doc\help\es_ES\afs-cc.hlp"
2698 File "..\..\doc\help\es_ES\afs-light.CNT"
2699 File "..\..\doc\help\es_ES\afs-light.hlp"
2700 File "..\..\doc\help\es_ES\afs-nt.CNT"
2701 File "..\..\doc\help\es_ES\afs-nt.HLP"
2702 File "..\..\doc\help\es_ES\taafscfg.CNT"
2703 File "..\..\doc\help\es_ES\taafscfg.hlp"
2704 File "..\..\doc\help\es_ES\taafssvrmgr.CNT"
2705 File "..\..\doc\help\es_ES\taafssvrmgr.hlp"
2706 File "..\..\doc\help\es_ES\taafsusrmgr.CNT"
2707 File "..\..\doc\help\es_ES\taafsusrmgr.hlp"
2710 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1034.pdb"
2711 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.pdb"
2712 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1034.pdb"
2713 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1034.pdb"
2714 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1034.pdb"
2715 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1034.pdb"
2716 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1034.pdb"
2717 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1034.pdb"
2723 SetOutPath "$INSTDIR\Documentation"
2724 File "..\..\doc\install\Documentation\ja_JP\README.TXT"
2726 SetOutPath "$INSTDIR\Client\Program"
2727 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1041.dll" "$INSTDIR\Client\Program\afscreds_1041.dll" "$INSTDIR"
2728 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.dll" "$INSTDIR\Client\Program\afs_shl_ext_1041.dll" "$INSTDIR"
2730 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1041.pdb"
2731 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.pdb"
2734 SetOutPath "$INSTDIR\Common"
2735 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1041.dll" "$INSTDIR\Common\afs_config_1041.dll" "$INSTDIR"
2736 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.dll" "$INSTDIR\Common\afs_cpa_1041.dll" "$INSTDIR"
2737 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1041.dll" "$INSTDIR\Common\afseventmsg_1041.dll" "$INSTDIR"
2738 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1041.dll" "$INSTDIR\Common\afs_setup_utils_1041.dll" "$INSTDIR"
2739 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_1041.dll" "$INSTDIR\Common\afsserver_1041.dll" "$INSTDIR"
2740 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1041.dll" "$INSTDIR\Common\afssvrcfg_1041.dll" "$INSTDIR"
2741 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1041.dll" "$INSTDIR\Common\TaAfsAccountManager_1041.dll" "$INSTDIR"
2742 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1041.dll" "$INSTDIR\Common\TaAfsAppLib_1041.dll" "$INSTDIR"
2743 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1041.dll" "$INSTDIR\Common\TaAfsServerManager_1041.dll" "$INSTDIR"
2744 File "..\..\doc\help\ja_JP\afs-cc.CNT"
2745 File "..\..\doc\help\ja_JP\afs-cc.hlp"
2746 File "..\..\doc\help\ja_JP\afs-light.CNT"
2747 File "..\..\doc\help\ja_JP\afs-light.hlp"
2748 File "..\..\doc\help\ja_JP\afs-nt.CNT"
2749 File "..\..\doc\help\ja_JP\afs-nt.HLP"
2750 File "..\..\doc\help\ja_JP\taafscfg.CNT"
2751 File "..\..\doc\help\ja_JP\taafscfg.hlp"
2752 File "..\..\doc\help\ja_JP\taafssvrmgr.CNT"
2753 File "..\..\doc\help\ja_JP\taafssvrmgr.hlp"
2754 File "..\..\doc\help\ja_JP\taafsusrmgr.CNT"
2755 File "..\..\doc\help\ja_JP\taafsusrmgr.hlp"
2758 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1041.pdb"
2759 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.pdb"
2760 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1041.pdb"
2761 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1041.pdb"
2762 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1041.pdb"
2763 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1041.pdb"
2764 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1041.pdb"
2765 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1041.pdb"
2771 SetOutPath "$INSTDIR\Documentation"
2772 File "..\..\doc\install\Documentation\ko_KR\README.TXT"
2774 SetOutPath "$INSTDIR\Client\Program"
2775 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1042.dll" "$INSTDIR\Client\Program\afscreds_1042.dll" "$INSTDIR"
2776 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.dll" "$INSTDIR\Client\Program\afs_shl_ext_1042.dll" "$INSTDIR"
2778 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1042.pdb"
2779 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.pdb"
2782 SetOutPath "$INSTDIR\Common"
2783 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1042.dll" "$INSTDIR\Common\afs_config_1042.dll" "$INSTDIR"
2784 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.dll" "$INSTDIR\Common\afs_cpa_1042.dll" "$INSTDIR"
2785 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1042.dll" "$INSTDIR\Common\afseventmsg_1042.dll" "$INSTDIR"
2786 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1042.dll" "$INSTDIR\Common\afs_setup_utils_1042.dll" "$INSTDIR"
2787 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_1042.dll" "$INSTDIR\Common\afsserver_1042.dll" "$INSTDIR"
2788 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1042.dll" "$INSTDIR\Common\afssvrcfg_1042.dll" "$INSTDIR"
2789 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1042.dll" "$INSTDIR\Common\TaAfsAccountManager_1042.dll" "$INSTDIR"
2790 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1042.dll" "$INSTDIR\Common\TaAfsAppLib_1042.dll" "$INSTDIR"
2791 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1042.dll" "$INSTDIR\Common\TaAfsServerManager_1042.dll" "$INSTDIR"
2792 File "..\..\doc\help\ko_KR\afs-cc.CNT"
2793 File "..\..\doc\help\ko_KR\afs-cc.hlp"
2794 File "..\..\doc\help\ko_KR\afs-light.CNT"
2795 File "..\..\doc\help\ko_KR\afs-light.hlp"
2796 File "..\..\doc\help\ko_KR\afs-nt.CNT"
2797 File "..\..\doc\help\ko_KR\afs-nt.HLP"
2798 File "..\..\doc\help\ko_KR\taafscfg.CNT"
2799 File "..\..\doc\help\ko_KR\taafscfg.hlp"
2800 File "..\..\doc\help\ko_KR\taafssvrmgr.CNT"
2801 File "..\..\doc\help\ko_KR\taafssvrmgr.hlp"
2802 File "..\..\doc\help\ko_KR\taafsusrmgr.CNT"
2803 File "..\..\doc\help\ko_KR\taafsusrmgr.hlp"
2806 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1042.pdb"
2807 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.pdb"
2808 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1042.pdb"
2809 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1042.pdb"
2810 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1042.pdb"
2811 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1042.pdb"
2812 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1042.pdb"
2813 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1042.pdb"
2820 SetOutPath "$INSTDIR\Documentation"
2821 File "..\..\doc\install\Documentation\pt_BR\README.TXT"
2823 SetOutPath "$INSTDIR\Client\Program"
2824 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1046.dll" "$INSTDIR\Client\Program\afscreds_1046.dll" "$INSTDIR"
2825 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.dll" "$INSTDIR\Client\Program\afs_shl_ext_1046.dll" "$INSTDIR"
2827 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1046.pdb"
2828 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.pdb"
2831 SetOutPath "$INSTDIR\Common"
2832 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1046.dll" "$INSTDIR\Common\afs_config_1046.dll" "$INSTDIR"
2833 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.dll" "$INSTDIR\Common\afs_cpa_1046.dll" "$INSTDIR"
2834 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1046.dll" "$INSTDIR\Common\afseventmsg_1046.dll" "$INSTDIR"
2835 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1046.dll" "$INSTDIR\Common\afs_setup_utils_1046.dll" "$INSTDIR"
2836 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_1046.dll" "$INSTDIR\Common\afsserver_1046.dll" "$INSTDIR"
2837 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1046.dll" "$INSTDIR\Common\afssvrcfg_1046.dll" "$INSTDIR"
2838 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1046.dll" "$INSTDIR\Common\TaAfsAccountManager_1046.dll" "$INSTDIR"
2839 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1046.dll" "$INSTDIR\Common\TaAfsAppLib_1046.dll" "$INSTDIR"
2840 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1046.dll" "$INSTDIR\Common\TaAfsServerManager_1046.dll" "$INSTDIR"
2841 File "..\..\doc\help\pt_BR\afs-cc.CNT"
2842 File "..\..\doc\help\pt_BR\afs-cc.hlp"
2843 File "..\..\doc\help\pt_BR\afs-light.CNT"
2844 File "..\..\doc\help\pt_BR\afs-light.hlp"
2845 File "..\..\doc\help\pt_BR\afs-nt.CNT"
2846 File "..\..\doc\help\pt_BR\afs-nt.HLP"
2847 File "..\..\doc\help\pt_BR\taafscfg.CNT"
2848 File "..\..\doc\help\pt_BR\taafscfg.hlp"
2849 File "..\..\doc\help\pt_BR\taafssvrmgr.CNT"
2850 File "..\..\doc\help\pt_BR\taafssvrmgr.hlp"
2851 File "..\..\doc\help\pt_BR\taafsusrmgr.CNT"
2852 File "..\..\doc\help\pt_BR\taafsusrmgr.hlp"
2855 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1046.pdb"
2856 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.pdb"
2857 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1046.pdb"
2858 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1046.pdb"
2859 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1046.pdb"
2860 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1046.pdb"
2861 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1046.pdb"
2862 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1046.pdb"
2868 SetOutPath "$INSTDIR\Documentation"
2869 File "..\..\doc\install\Documentation\zh_CN\README.TXT"
2871 SetOutPath "$INSTDIR\Client\Program"
2872 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_2052.dll" "$INSTDIR\Client\Program\afscreds_2052.dll" "$INSTDIR"
2873 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.dll" "$INSTDIR\Client\Program\afs_shl_ext_2052.dll" "$INSTDIR"
2875 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_2052.pdb"
2876 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.pdb"
2879 SetOutPath "$INSTDIR\Common"
2880 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_2052.dll" "$INSTDIR\Common\afs_config_2052.dll" "$INSTDIR"
2881 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.dll" "$INSTDIR\Common\afs_cpa_2052.dll" "$INSTDIR"
2882 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_2052.dll" "$INSTDIR\Common\afseventmsg_2052.dll" "$INSTDIR"
2883 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_2052.dll" "$INSTDIR\Common\afs_setup_utils_2052.dll" "$INSTDIR"
2884 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_2052.dll" "$INSTDIR\Common\afsserver_2052.dll" "$INSTDIR"
2885 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_2052.dll" "$INSTDIR\Common\afssvrcfg_2052.dll" "$INSTDIR"
2886 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_2052.dll" "$INSTDIR\Common\TaAfsAccountManager_2052.dll" "$INSTDIR"
2887 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_2052.dll" "$INSTDIR\Common\TaAfsAppLib_2052.dll" "$INSTDIR"
2888 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_2052.dll" "$INSTDIR\Common\TaAfsServerManager_2052.dll" "$INSTDIR"
2889 File "..\..\doc\help\zh_CN\afs-cc.CNT"
2890 File "..\..\doc\help\zh_CN\afs-cc.hlp"
2891 File "..\..\doc\help\zh_CN\afs-light.CNT"
2892 File "..\..\doc\help\zh_CN\afs-light.hlp"
2893 File "..\..\doc\help\zh_CN\afs-nt.CNT"
2894 File "..\..\doc\help\zh_CN\afs-nt.HLP"
2895 File "..\..\doc\help\zh_CN\taafscfg.CNT"
2896 File "..\..\doc\help\zh_CN\taafscfg.hlp"
2897 File "..\..\doc\help\zh_CN\taafssvrmgr.CNT"
2898 File "..\..\doc\help\zh_CN\taafssvrmgr.hlp"
2899 File "..\..\doc\help\zh_CN\taafsusrmgr.CNT"
2900 File "..\..\doc\help\zh_CN\taafsusrmgr.hlp"
2903 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_2052.pdb"
2904 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.pdb"
2905 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_2052.pdb"
2906 ;File "${AFS_SERVER_BUILDDIR}\afsserver_2052.pdb"
2907 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_2052.pdb"
2908 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_2052.pdb"
2909 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_2052.pdb"
2910 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_2052.pdb"
2916 SetOutPath "$INSTDIR\Documentation"
2917 File "..\..\doc\install\Documentation\zh_TW\README.TXT"
2919 SetOutPath "$INSTDIR\Client\Program"
2920 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1028.dll" "$INSTDIR\Client\Program\_1028.dll" "$INSTDIR"
2921 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.dll" "$INSTDIR\Client\Program\afs_shl_ext_1028.dll" "$INSTDIR"
2923 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1028.pdb"
2924 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.pdb"
2927 SetOutPath "$INSTDIR\Common"
2928 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1028.dll" "$INSTDIR\Common\afs_config_1028.dll" "$INSTDIR"
2929 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.dll" "$INSTDIR\Common\afs_cpa_1028.dll" "$INSTDIR"
2930 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1028.dll" "$INSTDIR\Common\afseventmsg_1028.dll" "$INSTDIR"
2931 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1028.dll" "$INSTDIR\Common\afs_setup_utils_1028.dll" "$INSTDIR"
2932 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_1028.dll" "$INSTDIR\Common\afsserver_1028.dll" "$INSTDIR"
2933 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1028.dll" "$INSTDIR\Common\afssvrcfg_1028.dll" "$INSTDIR"
2934 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1028.dll" "$INSTDIR\Common\TaAfsAccountManager_1028.dll" "$INSTDIR"
2935 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1028.dll" "$INSTDIR\Common\TaAfsAppLib_1028.dll" "$INSTDIR"
2936 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1028.dll" "$INSTDIR\Common\TaAfsServerManager_1028.dll" "$INSTDIR"
2937 File "..\..\doc\help\zh_TW\afs-cc.CNT"
2938 File "..\..\doc\help\zh_TW\afs-cc.hlp"
2939 File "..\..\doc\help\zh_TW\afs-light.CNT"
2940 File "..\..\doc\help\zh_TW\afs-light.hlp"
2941 File "..\..\doc\help\zh_TW\afs-nt.CNT"
2942 File "..\..\doc\help\zh_TW\afs-nt.HLP"
2943 File "..\..\doc\help\zh_TW\taafscfg.CNT"
2944 File "..\..\doc\help\zh_TW\taafscfg.hlp"
2945 File "..\..\doc\help\zh_TW\taafssvrmgr.CNT"
2946 File "..\..\doc\help\zh_TW\taafssvrmgr.hlp"
2947 File "..\..\doc\help\zh_TW\taafsusrmgr.CNT"
2948 File "..\..\doc\help\zh_TW\taafsusrmgr.hlp"
2951 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1028.pdb"
2952 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.pdb"
2953 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1028.pdb"
2954 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1028.pdb"
2955 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1028.pdb"
2956 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1028.pdb"
2957 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1028.pdb"
2958 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1028.pdb"
2967 ;====================================================
2968 ; AddToPath - Adds the given dir to the search path.
2969 ; Input - head of the stack
2970 ; Note - Win9x systems requires reboot
2971 ;====================================================
2978 # don't add if the path doesn't exist
2979 IfFileExists $0 "" AddToPath_done
2986 StrCmp $2 "" "" AddToPath_done
2991 StrCmp $2 "" "" AddToPath_done
2992 GetFullPathName /SHORT $3 $0
2997 StrCmp $2 "" "" AddToPath_done
3002 StrCmp $2 "" "" AddToPath_done
3006 StrCmp $1 1 AddToPath_NT
3009 FileOpen $1 "$1\autoexec.bat" a
3012 IntCmp $2 26 0 +2 +2 # DOS EOF
3013 FileSeek $1 -1 END # write over EOF
3014 FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
3020 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
3021 StrCpy $2 $1 1 -1 # copy last char
3022 StrCmp $2 ";" 0 +2 # if last char == ;
3023 StrCpy $1 $1 -1 # remove last char
3024 StrCmp $1 "" AddToPath_NTdoIt
3027 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $0
3028 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
3037 ;====================================================
3038 ; RemoveFromPath - Remove a given dir from the path
3039 ; Input: head of the stack
3040 ;====================================================
3041 Function un.RemoveFromPath
3050 IntFmt $6 "%c" 26 # DOS EOF
3054 StrCmp $1 1 unRemoveFromPath_NT
3057 FileOpen $1 "$1\autoexec.bat" r
3060 GetFullPathName /SHORT $0 $0
3061 StrCpy $0 "SET PATH=%PATH%;$0"
3062 Goto unRemoveFromPath_dosLoop
3064 unRemoveFromPath_dosLoop:
3066 StrCpy $5 $3 1 -1 # read last char
3067 StrCmp $5 $6 0 +2 # if DOS EOF
3068 StrCpy $3 $3 -1 # remove DOS EOF so we can compare
3069 StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine
3070 StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine
3071 StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine
3072 StrCmp $3 "" unRemoveFromPath_dosLoopEnd
3074 Goto unRemoveFromPath_dosLoop
3075 unRemoveFromPath_dosLoopRemoveLine:
3077 Goto unRemoveFromPath_dosLoop
3079 unRemoveFromPath_dosLoopEnd:
3083 Delete "$1\autoexec.bat"
3084 CopyFiles /SILENT $4 "$1\autoexec.bat"
3086 Goto unRemoveFromPath_done
3088 unRemoveFromPath_NT:
3089 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
3090 StrCpy $5 $1 1 -1 # copy last char
3091 StrCmp $5 ";" +2 # if last char != ;
3092 StrCpy $1 "$1;" # append ;
3095 Call un.StrStr ; Find `$0;` in $1
3096 Pop $2 ; pos of our dir
3097 StrCmp $2 "" unRemoveFromPath_done
3098 ; else, it is in path
3103 StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
3104 StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
3107 StrCpy $5 $3 1 -1 # copy last char
3108 StrCmp $5 ";" 0 +2 # if last char == ;
3109 StrCpy $3 $3 -1 # remove last char
3111 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $3
3112 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
3114 unRemoveFromPath_done:
3124 ;====================================================
3125 ; IsNT - Returns 1 if the current system is NT, 0
3127 ; Output: head of the stack
3128 ;====================================================
3132 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
3133 StrCmp $0 "" 0 IsNT_yes
3145 !insertmacro IsNT ""
3146 !insertmacro IsNT "un."
3148 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3150 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3151 ;====================================================
3152 ; StrStr - Finds a given string in another given string.
3153 ; Returns -1 if not found and the pos if found.
3154 ; Input: head of the stack - string to find
3155 ; second in the stack - string to find in
3156 ; Output: head of the stack
3157 ;====================================================
3159 Function ${un}StrStr
3160 Exch $R1 ; st=haystack,old$R1, $R1=needle
3161 Exch ; st=old$R1,haystack
3162 Exch $R2 ; st=old$R1,old$R2, $R2=haystack
3174 StrCpy $R5 $R2 $R3 $R4
3180 StrCpy $R1 $R2 "" $R4
3188 !insertmacro StrStr ""
3189 !insertmacro StrStr "un."
3192 !ifdef ADDSHAREDDLLUSED
3195 ; Increments a shared DLLs reference count.
3196 ; Use by passing one item on the stack (the full path of the DLL).
3199 ; Push $SYSDIR\myDll.dll
3203 Function AddSharedDLL
3206 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
3208 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
3214 ; un.RemoveSharedDLL
3216 ; Decrements a shared DLLs reference count, and removes if necessary.
3217 ; Use by passing one item on the stack (the full path of the DLL).
3218 ; Note: for use in the main installer (not the uninstaller), rename the
3219 ; function to RemoveSharedDLL.
3222 ; Push $SYSDIR\myDll.dll
3223 ; Call un.RemoveSharedDLL
3226 Function un.RemoveSharedDLL
3229 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
3230 StrCmp $R0 "" remove
3232 IntCmp $R0 0 rk rk uk
3234 DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
3237 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
3240 Delete /REBOOTOK $R1
3249 !ifdef INSTALL_LOOPBACK
3250 Function afs.InstallMSLoopback
3252 File /oname=$R0 "loopback_install.dll"
3253 nsExec::Exec "rundll32.exe $R0 doLoopBackEntry quiet"
3254 Call GetWindowsVersion
3256 StrCmp $R1 "2000" +1 +2
3257 nsExec::Exec "rundll32.exe $R0 disableLoopBackEntry"
3265 ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
3266 ; Updated by Joost Verburg
3268 ; Returns on top of stack
3270 ; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003)
3272 ; '' (Unknown Windows Version)
3275 ; Call GetWindowsVersion
3277 ; ; at this point $R0 is "NT 4.0" or whatnot
3279 Function GetWindowsVersion
3286 ReadRegStr $R0 HKLM \
3287 "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
3289 IfErrors 0 lbl_winnt
3292 ReadRegStr $R0 HKLM \
3293 "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
3296 StrCmp $R1 '4' 0 lbl_error
3300 StrCmp $R1 '4.0' lbl_win32_95
3301 StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
3319 StrCmp $R1 '3' lbl_winnt_x
3320 StrCmp $R1 '4' lbl_winnt_x
3324 StrCmp $R1 '5.0' lbl_winnt_2000
3325 StrCmp $R1 '5.1' lbl_winnt_XP
3326 StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
3329 StrCpy $R0 "NT $R0" 6
3354 ; Author: Lilla (lilla@earthlink.net) 2003-06-13
3355 ; function IsUserAdmin uses plugin \NSIS\PlusgIns\UserInfo.dll
3356 ; This function is based upon code in \NSIS\Contrib\UserInfo\UserInfo.nsi
3357 ; This function was tested under NSIS 2 beta 4 (latest CVS as of this writing).
3361 ; Pop $R0 ; at this point $R0 is "true" or "false"
3363 Function IsUserAdmin
3372 UserInfo::GetAccountType
3375 StrCmp $R2 "Admin" 0 Continue
3376 ; Observation: I get here when running Win98SE. (Lilla)
3377 ; The functions UserInfo.dll looks for are there on Win98 too,
3378 ; but just don't work. So UserInfo.dll, knowing that admin isn't required
3379 ; on Win98, returns admin anyway. (per kichik)
3380 ; MessageBox MB_OK 'User "$R1" is in the Administrators group'
3385 ; You should still check for an empty string because the functions
3386 ; UserInfo.dll looks for may not be present on Windows 95. (per kichik)
3389 ;MessageBox MB_OK 'User "$R1" is in the "$R2" group'
3393 ; comment/message below is by UserInfo.nsi author:
3394 ; This one means you don't need to care about admin or
3395 ; not admin because Windows 9x doesn't either
3396 ;MessageBox MB_OK "Error! This DLL can't run under Windows 9x!"
3400 ;MessageBox MB_OK 'User= "$R1" AccountType= "$R2" IsUserAdmin= "$R0"'
3408 ; input, top of stack (e.g. C:\Program Files\Poop)
3409 ; output, top of stack (replaces, with e.g. C:\Program Files)
3410 ; modifies no other variables.
3413 ; Push "C:\Program Files\Directory\Whatever"
3416 ; ; at this point $R0 will equal "C:\Program Files\Directory"
3430 IntCmp $R1 $R2 get 0 get
3431 StrCpy $R3 $R0 1 -$R1
3446 ;--------------------------------
3447 ;Handle what must and what must not be installed
3448 Function .onSelChange
3449 ; If they install the server, they MUST install the client
3450 SectionGetFlags ${secServer} $R0
3451 IntOp $R0 $R0 & ${SF_SELECTED}
3452 StrCmp $R0 "1" MakeClientSelected
3454 ; If they install the control center, we'll give them the client.
3455 ; It may not be required, but it's a bit more useful
3456 SectionGetFlags ${secControl} $R0
3457 IntOp $R0 $R0 & ${SF_SELECTED}
3458 StrCmp $R0 "1" MakeClientSelected
3462 SectionGetFlags ${secClient} $R0
3463 IntOp $R0 $R0 | ${SF_SELECTED}
3464 SectionSetFlags ${secClient} $R0
3469 Function RegWriteMultiStr
3470 !define HKEY_CLASSES_ROOT 0x80000000
3471 !define HKEY_CURRENT_USER 0x80000001
3472 !define HKEY_LOCAL_MACHINE 0x80000002
3473 !define HKEY_USERS 0x80000003
3474 !define HKEY_PERFORMANCE_DATA 0x80000004
3475 !define HKEY_PERFORMANCE_TEXT 0x80000050
3476 !define HKEY_PERFORMANCE_NLSTEXT 0x80000060
3477 !define HKEY_CURRENT_CONFIG 0x80000005
3478 !define HKEY_DYN_DATA 0x80000006
3480 !define KEY_QUERY_VALUE 0x0001
3481 !define KEY_SET_VALUE 0x0002
3482 !define KEY_CREATE_SUB_KEY 0x0004
3483 !define KEY_ENUMERATE_SUB_KEYS 0x0008
3484 !define KEY_NOTIFY 0x0010
3485 !define KEY_CREATE_LINK 0x0020
3489 !define REG_EXPAND_SZ 2
3490 !define REG_BINARY 3
3492 !define REG_DWORD_LITTLE_ENDIAN 4
3493 !define REG_DWORD_BIG_ENDIAN 5
3495 !define REG_MULTI_SZ 7
3497 !define RegCreateKey "Advapi32::RegCreateKeyA(i, t, *i) i"
3498 !define RegSetValueEx "Advapi32::RegSetValueExA(i, t, i, i, i, i) i"
3499 !define RegCloseKey "Advapi32::RegCloseKeyA(i) i"
3506 SetPluginUnload alwaysoff
3507 ; Create a buffer for the multi_sz value
3508 System::Call "*(&t${NSIS_MAX_STRLEN}) i.r1"
3509 ; Open/create the registry key
3510 System::Call "${RegCreateKey}(${HKEY_LOCAL_MACHINE}, '$REG_SUB_KEY', .r0) .r9"
3513 MessageBox MB_OK|MB_ICONSTOP "Can't create registry key! ($9)"
3517 ; Fill in the buffer with our strings
3518 StrCpy $2 $1 ; Initial position
3520 StrLen $9 '$REG_DATA_1' ; Length of first string
3521 IntOp $9 $9 + 1 ; Plus null
3522 System::Call "*$2(&t$9 '$REG_DATA_1')" ; Place the string
3523 IntOp $2 $2 + $9 ; Advance to the next position
3525 StrCmp '$REG_DATA_2' "" terminate
3526 StrLen $9 '$REG_DATA_2' ; Length of second string
3527 IntOp $9 $9 + 1 ; Plus null
3528 System::Call "*$2(&t$9 '$REG_DATA_2')" ; Place the string
3529 IntOp $2 $2 + $9 ; Advance to the next position
3531 StrCmp '$REG_DATA_3' "" terminate
3532 StrLen $9 '$REG_DATA_3' ; Length of third string
3533 IntOp $9 $9 + 1 ; Plus null
3534 System::Call "*$2(&t$9 '$REG_DATA_3')" ; Place the string
3535 IntOp $2 $2 + $9 ; Advance to the next position
3538 System::Call "*$2(&t1 '')" ; Place the terminating null
3539 IntOp $2 $2 + 1 ; Advance to the next position
3541 ; Create/write the value
3542 IntOp $2 $2 - $1 ; Total length
3543 System::Call "${RegSetValueEx}(r0, '$REG_VALUE', 0, ${REG_MULTI_SZ}, r1, r2) .r9"
3546 MessageBox MB_OK|MB_ICONSTOP "Can't set key value! ($9)"
3550 ; Close the registry key
3551 System::Call "${RegCloseKey}(r0)"
3555 SetPluginUnload manual