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}\aklog.exe"
494 File "${AFS_CLIENT_BUILDDIR}\afscreds.exe"
495 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll" "$INSTDIR\Client\Program\afs_shl_ext.dll" "$INSTDIR"
496 File "${AFS_CLIENT_BUILDDIR}\afsd_service.exe"
497 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afslogon.dll" "$INSTDIR\Client\Program\afslogon.dll" "$INSTDIR"
498 File "${AFS_CLIENT_BUILDDIR}\symlink.exe"
499 File "${AFS_DESTDIR}\bin\kpasswd.exe"
500 File "${AFS_SERVER_BUILDDIR}\pts.exe"
501 File "${AFS_SERVER_BUILDDIR}\bos.exe"
502 File "${AFS_SERVER_BUILDDIR}\kas.exe"
503 File "${AFS_SERVER_BUILDDIR}\vos.exe"
504 File "${AFS_SERVER_BUILDDIR}\udebug.exe"
505 File "${AFS_DESTDIR}\bin\translate_et.exe"
506 File "${AFS_DESTDIR}\etc\rxdebug.exe"
507 File "${AFS_DESTDIR}\etc\backup.exe"
510 File "${AFS_CLIENT_BUILDDIR}\afsshare.pdb"
511 File "${AFS_CLIENT_BUILDDIR}\libosi.pdb"
512 File "${AFS_CLIENT_BUILDDIR}\libafsconf.pdb"
513 File "${AFS_CLIENT_BUILDDIR}\klog.pdb"
514 File "${AFS_CLIENT_BUILDDIR}\tokens.pdb"
515 File "${AFS_CLIENT_BUILDDIR}\unlog.pdb"
516 File "${AFS_CLIENT_BUILDDIR}\fs.pdb"
517 File "${AFS_CLIENT_BUILDDIR}\aklog.pdb"
518 File "${AFS_CLIENT_BUILDDIR}\afscreds.pdb"
519 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.pdb"
520 File "${AFS_CLIENT_BUILDDIR}\afsd_service.pdb"
521 File "${AFS_CLIENT_BUILDDIR}\afslogon.pdb"
522 File "${AFS_CLIENT_BUILDDIR}\symlink.pdb"
523 File "${AFS_DESTDIR}\bin\kpasswd.pdb"
524 File "${AFS_DESTDIR}\bin\pts.pdb"
525 File "${AFS_SERVER_BUILDDIR}\bos.pdb"
526 File "${AFS_SERVER_BUILDDIR}\kas.pdb"
527 File "${AFS_SERVER_BUILDDIR}\vos.pdb"
528 File "${AFS_SERVER_BUILDDIR}\udebug.pdb"
529 File "${AFS_DESTDIR}\bin\translate_et.pdb"
530 File "${AFS_DESTDIR}\etc\rxdebug.pdb"
531 File "${AFS_DESTDIR}\etc\backup.pdb"
539 ; Do WINDOWSDIR components
541 ; Do Windows SYSDIR (Control panel)
543 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa.cpl" "$SYSDIR\afs_cpa.cpl" "$INSTDIR"
545 File "${AFS_CLIENT_BUILDDIR}\afs_cpa.pdb"
548 ; Get AFS CellServDB file
549 Call afs.GetCellServDB
550 !ifdef INSTALL_LOOPBACK
551 Call afs.InstallMSLoopback
555 ; Include Kerberos for Windows files in the installer...
556 SetOutPath "$INSTDIR\kfw\bin\"
557 File "${KFW_SOURCE}\bin\*"
558 SetOutPath "$INSTDIR\kfw\doc"
559 File "${KFW_SOURCE}\doc\*"
562 ;Store install folder
563 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\Client" "" $INSTDIR
564 Call AFSCommon.Install
566 ; Write registry entries
567 WriteRegStr HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
568 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "" "AFS Client Shell Extension"
569 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "" "$INSTDIR\Client\Program\afs_shl_ext.dll"
570 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "ThreadingModel" "Apartment"
571 WriteRegStr HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
572 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "AFS Client Shell Extension"
575 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
576 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "VersionString" ${AFS_VERSION}
577 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Title" "AFS Client"
578 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Description" "AFS Client"
579 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PathName" "$INSTDIR\Client"
580 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Software Type" "File System"
581 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
582 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
583 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
584 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
585 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Title" "AFS Client"
586 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Description" "AFS Client"
587 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Software Type" "File System"
588 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "PathName" "$INSTDIR\Client\Program"
589 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
590 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
591 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
593 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Debug" 1
594 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Debug" 1
596 ; Delete the DEBUG string
597 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Debug"
598 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Debug"
601 ; On Windows 2000 work around KB301673. This is fixed in Windows XP and 2003
602 Call GetWindowsVersion
604 StrCmp $R1 "2000" +1 +2
605 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled" 0
607 ;Write start menu entries
608 CreateDirectory "$SMPROGRAMS\OpenAFS\Client"
609 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
610 CreateShortCut "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk" "$INSTDIR\Client\Program\afscreds.exe" "-A -M -N -Q"
611 CreateShortCut "$SMSTARTUP\AFS Credentials.lnk" "$INSTDIR\Client\Program\afscreds.exe" "-A -M -N -Q"
613 Push "$INSTDIR\Client\Program"
615 Push "$INSTDIR\Common"
619 ; Add kfw to path too
620 Push "$INSTDIR\kfw\bin"
624 ; Create the AFS service
625 SetOutPath "$INSTDIR\Common"
626 File "${AFS_WININSTALL_DIR}\Service.exe"
627 nsExec::Exec "net stop TransarcAFSDaemon"
628 ;IMPORTANT! If we are not refreshing the config files, do NOT remove the service
629 ;Don't re-install because it must be present or we wouldn't have passed the Reg check
631 ReadRegStr $R2 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell"
632 StrCmp $R2 "" +1 skipremove
633 nsExec::Exec '$INSTDIR\Common\Service.exe u TransarcAFSDaemon'
634 nsExec::Exec '$INSTDIR\Common\Service.exe TransarcAFSDaemon "$INSTDIR\Client\Program\afsd_service.exe" "OpenAFS Client Service"'
636 Delete "$INSTDIR\Common\service.exe"
639 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "" ""
640 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "ProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
641 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
642 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
643 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Class" 2
644 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "VerboseLogging" 10
646 ; Must also add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder
647 ; and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order
648 ; to also include the service name.
650 ReadINIStr $R0 $1 "Field 7" "State"
651 ReadINIStr $R1 $1 "Field 9" "State"
652 ; Complicated way to do $R1 = ($R1 *2) + $R0
655 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonOptions" $R1
656 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonScript" "$INSTDIR\Client\Program\afscreds.exe -:%s -x -a -m -n -q"
657 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Name" "OpenAFSDaemon"
660 ReadINIStr $R0 $1 "Field 2" "State"
661 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell" $R0
662 ReadINIStr $R0 $1 "Field 3" "State"
663 WriteRegDWORD HKLM "SOFTWARE\OpenAFS\Client" "ShowTrayIcon" 1
664 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "SecurityLevel" $R0
665 ReadINIStr $R0 $1 "Field 5" "State"
666 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "FreelanceClient" $R0
667 ReadINIStr $R0 $1 "Field 11" "State"
668 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "UseDNS" $R0
669 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "NetbiosName" "AFS"
670 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "MountRoot" "/afs"
671 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "RxMaxMTU" 1260
672 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "IsGateway" 0
673 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "HideDotFiles" 1
674 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "TruncateNetbios" "on"
676 ; Find Lana By Name appears to be causing grief for many people
677 ; I do not have time to track this down so I am simply going to disable it
678 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "NoFindLanaByName" 1
680 strcpy $REG_SUB_KEY "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon"
681 strcpy $REG_VALUE "DependOnGroup"
682 strcpy $REG_DATA_1 "PNP_TDI"
683 strcpy $REG_DATA_2 ""
684 strcpy $REG_DATA_3 ""
685 Call RegWriteMultiStr
686 strcpy $REG_SUB_KEY "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon"
687 strcpy $REG_VALUE "DependOnService"
688 strcpy $REG_DATA_1 "Tcpip"
689 strcpy $REG_DATA_2 "NETBIOS"
690 strcpy $REG_DATA_3 "RpcSs"
691 Call RegWriteMultiStr
695 WriteUninstaller "$INSTDIR\Uninstall.exe"
699 ;------------------------
701 Section "AFS Server" secServer
703 SetShellVarContext all
705 ; Check for bad previous installation (if we are doing a new install)
706 Call IsAnyAFSInstalled
708 StrCmp $R0 "0" +1 skipCheck
712 ; Stop any running services or we can't replace the files
713 ; Stop the running processes
715 File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe"
716 nsExec::Exec '$R0 afscreds.exe'
717 Exec "afscreds.exe -z"
718 ; in case we are upgrading an old version that does not support -z
720 nsExec::Exec '$R0 afscreds.exe'
722 ;nsExec::Exec '$R0 krbcc32s.exe'
727 nsExec::Exec "net stop TransarcAFSDaemon"
728 nsExec::Exec "net stop TransarcAFSServer"
730 CreateDirectory "$INSTDIR\Server\usr\afs\etc"
731 CreateDirectory "$INSTDIR\Server\usr\afs\local"
732 CreateDirectory "$INSTDIR\Server\usr\afs\etc\logs"
734 SetOutPath "$INSTDIR\Server\usr\afs\bin"
735 File "${AFS_SERVER_BUILDDIR}\afskill.exe"
736 File "${AFS_SERVER_BUILDDIR}\afssvrcfg.exe"
737 File "${AFS_SERVER_BUILDDIR}\bosctlsvc.exe"
738 File "${AFS_SERVER_BUILDDIR}\bosserver.exe"
739 File "${AFS_SERVER_BUILDDIR}\buserver.exe"
740 File "${AFS_ETC_BUILDDIR}\butc.exe"
741 File "${AFS_SERVER_BUILDDIR}\fileserver.exe"
742 File "${AFS_ETC_BUILDDIR}\fms.exe"
743 File "${AFS_SERVER_BUILDDIR}\kaserver.exe"
744 File "${AFS_SERVER_BUILDDIR}\ptserver.exe"
745 File "${AFS_SERVER_BUILDDIR}\salvager.exe"
746 File "${AFS_SERVER_BUILDDIR}\upclient.exe"
747 File "${AFS_SERVER_BUILDDIR}\upserver.exe"
748 File "${AFS_SERVER_BUILDDIR}\vlserver.exe"
749 File "${AFS_SERVER_BUILDDIR}\volinfo.exe"
750 File "${AFS_SERVER_BUILDDIR}\volserver.exe"
753 File "${AFS_SERVER_BUILDDIR}\afskill.pdb"
754 File "${AFS_SERVER_BUILDDIR}\afssvrcfg.pdb"
755 File "${AFS_SERVER_BUILDDIR}\bosctlsvc.pdb"
756 File "${AFS_SERVER_BUILDDIR}\bosserver.pdb"
757 File "${AFS_SERVER_BUILDDIR}\buserver.pdb"
758 File "${AFS_ETC_BUILDDIR}\butc.pdb"
759 File "${AFS_SERVER_BUILDDIR}\fileserver.pdb"
760 File "${AFS_ETC_BUILDDIR}\fms.pdb"
761 File "${AFS_SERVER_BUILDDIR}\kaserver.pdb"
762 File "${AFS_SERVER_BUILDDIR}\ptserver.pdb"
763 File "${AFS_SERVER_BUILDDIR}\salvager.pdb"
764 File "${AFS_SERVER_BUILDDIR}\upclient.pdb"
765 File "${AFS_SERVER_BUILDDIR}\upserver.pdb"
766 File "${AFS_SERVER_BUILDDIR}\vlserver.pdb"
767 File "${AFS_SERVER_BUILDDIR}\volinfo.pdb"
768 File "${AFS_SERVER_BUILDDIR}\volserver.pdb"
771 ;AFS Server common files
772 SetOutPath "$INSTDIR\Common"
773 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
774 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll"
775 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
776 File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
777 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
780 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
781 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb"
782 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb"
783 File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb"
784 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb"
786 SetOutPath "$INSTDIR\Common"
790 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver.cpl" "$SYSDIR\afsserver.cpl" "$INSTDIR"
793 File "${AFS_SERVER_BUILDDIR}\afsserver.pdb"
796 ;Store install folder
797 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\AFS Server" "" $INSTDIR
799 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
800 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "VersionString" ${AFS_VERSION}
801 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Title" "AFS Server"
802 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Description" "AFS Server for Windows"
803 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PathName" "$INSTDIR\Server"
804 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Software Type" "File System"
805 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
806 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
807 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
808 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
809 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Title" "AFS Server"
810 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Description" "AFS Server for Windows"
811 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Software Type" "File System"
812 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "PathName" "$INSTDIR\Server"
813 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
814 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
815 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
817 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Debug" 1
818 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Debug" 1
820 ; Delete the DEBUG string
821 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Debug"
822 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Debug"
824 ; Install the service
825 SetOutPath "$INSTDIR\Common"
826 File "${AFS_WININSTALL_DIR}\Service.exe"
828 File "${AFS_WININSTALL_DIR}\Service.pdb"
831 ; Check if the service exists--if it does, this is an upgrade/re-install
832 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSServer" "ImagePath"
833 StrCmp $R0 "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe" SkipStartup
835 ; If an uninstall was done, but we kept the config files, also skip
836 IfFileExists "$INSTDIR\Server\usr\afs\etc\ThisCell" SkipStartup
838 ; Make the server config wizard auto-start on bootup if this is an install (not an upgrade)
839 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" "AFS Server Wizard" '"$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe" /wizard"'
843 ;Don't want to whack existing settings... Make users un-install and then re-install if they want that
844 ;nsExec::Exec '$INSTDIR\Common\service.exe u TransarcAFSServer'
845 nsExec::Exec '$INSTDIR\Common\service.exe TransarcAFSServer "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe" "OpenAFS AFS Server"'
846 Delete "$INSTDIR\Common\service.exe"
848 CreateDirectory "$SMPROGRAMS\OpenAFS\Server"
849 CreateShortCut "$SMPROGRAMS\OpenAFS\Server\Server Configuration.lnk" "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe"
852 WriteUninstaller "$INSTDIR\Uninstall.exe"
857 ;----------------------------
858 ; OpenAFS Control Center
859 Section "AFS Control Center" secControl
861 SetShellVarContext all
863 SetOutPath "$INSTDIR\Control Center"
864 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager.exe"
865 File "${AFS_SERVER_BUILDDIR}\TaAfsAdmSvr.exe"
866 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager.exe"
869 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager.pdb"
870 File "${AFS_SERVER_BUILDDIR}\TaAfsAdmSvr.pdb"
871 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager.pdb"
874 ;AFS Server common files
875 Call AFSCommon.Install
877 SetOutPath "$INSTDIR\Common"
879 SetOutPath "$INSTDIR\Common"
882 File "${SYSTEMDIR}\msvcr71d.dll"
883 File "${SYSTEMDIR}\msvcr71d.pdb"
884 File "${SYSTEMDIR}\msvcp71d.dll"
885 File "${SYSTEMDIR}\msvcp71d.pdb"
886 File "${SYSTEMDIR}\mfc71d.dll"
887 File "${SYSTEMDIR}\mfc71d.pdb"
888 File "${SYSTEMDIR}\MFC71CHS.DLL"
889 File "${SYSTEMDIR}\MFC71CHT.DLL"
890 File "${SYSTEMDIR}\MFC71DEU.DLL"
891 File "${SYSTEMDIR}\MFC71ENU.DLL"
892 File "${SYSTEMDIR}\MFC71ESP.DLL"
893 File "${SYSTEMDIR}\MFC71FRA.DLL"
894 File "${SYSTEMDIR}\MFC71ITA.DLL"
895 File "${SYSTEMDIR}\MFC71JPN.DLL"
896 File "${SYSTEMDIR}\MFC71KOR.DLL"
899 File "${SYSTEMDIR}\msvcr70d.dll"
900 File "${SYSTEMDIR}\msvcr70d.pdb"
901 File "${SYSTEMDIR}\msvcp70d.dll"
902 File "${SYSTEMDIR}\msvcp70d.pdb"
903 File "${SYSTEMDIR}\mfc70d.dll"
904 File "${SYSTEMDIR}\mfc70d.pdb"
905 File "${SYSTEMDIR}\MFC70CHS.DLL"
906 File "${SYSTEMDIR}\MFC70CHT.DLL"
907 File "${SYSTEMDIR}\MFC70DEU.DLL"
908 File "${SYSTEMDIR}\MFC70ENU.DLL"
909 File "${SYSTEMDIR}\MFC70ESP.DLL"
910 File "${SYSTEMDIR}\MFC70FRA.DLL"
911 File "${SYSTEMDIR}\MFC70ITA.DLL"
912 File "${SYSTEMDIR}\MFC70JPN.DLL"
913 File "${SYSTEMDIR}\MFC70KOR.DLL"
915 File "${SYSTEMDIR}\mfc42d.dll"
916 File "${SYSTEMDIR}\mfc42d.pdb"
917 File "${SYSTEMDIR}\msvcp60d.dll"
918 File "${SYSTEMDIR}\msvcp60d.pdb"
919 File "${SYSTEMDIR}\msvcrtd.dll"
920 File "${SYSTEMDIR}\msvcrtd.pdb"
925 File "${SYSTEMDIR}\mfc71.dll"
926 File "${SYSTEMDIR}\msvcr71.dll"
927 File "${SYSTEMDIR}\msvcp71.dll"
928 File "${SYSTEMDIR}\MFC71CHS.DLL"
929 File "${SYSTEMDIR}\MFC71CHT.DLL"
930 File "${SYSTEMDIR}\MFC71DEU.DLL"
931 File "${SYSTEMDIR}\MFC71ENU.DLL"
932 File "${SYSTEMDIR}\MFC71ESP.DLL"
933 File "${SYSTEMDIR}\MFC71FRA.DLL"
934 File "${SYSTEMDIR}\MFC71ITA.DLL"
935 File "${SYSTEMDIR}\MFC71JPN.DLL"
936 File "${SYSTEMDIR}\MFC71KOR.DLL"
939 File "${SYSTEMDIR}\mfc70.dll"
940 File "${SYSTEMDIR}\msvcr70.dll"
941 File "${SYSTEMDIR}\msvcp70.dll"
942 File "${SYSTEMDIR}\MFC70CHS.DLL"
943 File "${SYSTEMDIR}\MFC70CHT.DLL"
944 File "${SYSTEMDIR}\MFC70DEU.DLL"
945 File "${SYSTEMDIR}\MFC70ENU.DLL"
946 File "${SYSTEMDIR}\MFC70ESP.DLL"
947 File "${SYSTEMDIR}\MFC70FRA.DLL"
948 File "${SYSTEMDIR}\MFC70ITA.DLL"
949 File "${SYSTEMDIR}\MFC70JPN.DLL"
950 File "${SYSTEMDIR}\MFC70KOR.DLL"
952 File "${SYSTEMDIR}\mfc42.dll"
953 File "${SYSTEMDIR}\msvcp60.dll"
954 File "${SYSTEMDIR}\msvcrt.dll"
958 ;Store install folder
959 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PathName" $INSTDIR
960 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "VersionString" ${AFS_VERSION}
961 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
962 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
963 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
964 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
965 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
966 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
967 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
969 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "Debug" 1
970 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "Debug" 1
972 ; Delete the DEBUG string
973 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "Debug"
974 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "Debug"
977 ;Write start menu entries
978 CreateDirectory "$SMPROGRAMS\OpenAFS\Control Center"
979 CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk" "$INSTDIR\Control Center\TaAfsAccountManager.exe"
980 CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk" "$INSTDIR\Control Center\TaAfsServerManager.exe"
982 WriteUninstaller "$INSTDIR\Uninstall.exe"
987 ;----------------------------
988 ; OpenAFS Supplemental Documentation
989 Section "Supplemental Documentation" secDocs
990 SetShellVarContext all
992 StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
993 StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
994 StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
995 StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
996 StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
997 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
998 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
999 StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
1003 SetOutPath "$INSTDIR\Documentation\html"
1004 File "..\..\doc\install\Documentation\en_US\html\*"
1005 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1006 File "..\..\doc\install\Documentation\en_US\html\CmdRef\*"
1007 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1008 File "..\..\doc\install\Documentation\en_US\html\InstallGd\*"
1009 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1010 File "..\..\doc\install\Documentation\en_US\html\ReleaseNotes\*"
1011 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1012 File "..\..\doc\install\Documentation\en_US\html\SysAdminGd\*"
1016 SetOutPath "$INSTDIR\Documentation"
1017 File "..\..\doc\install\Documentation\de_DE\README.TXT"
1018 SetOutPath "$INSTDIR\Documentation\html"
1019 File "..\..\doc\install\Documentation\de_DE\html\*"
1020 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1021 ;File "..\..\doc\install\Documentation\de_DE\html\CmdRef\*"
1022 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1023 File "..\..\doc\install\Documentation\de_DE\html\InstallGd\*"
1024 ;SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1025 ;File "..\..\doc\install\Documentation\de_DE\html\ReleaseNotes\*"
1026 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1027 ;File "..\..\doc\install\Documentation\de_DE\html\SysAdminGd\*"
1031 SetOutPath "$INSTDIR\Documentation"
1032 File "..\..\doc\install\Documentation\es_ES\README.TXT"
1033 SetOutPath "$INSTDIR\Documentation\html"
1034 File "..\..\doc\install\Documentation\es_ES\html\*"
1035 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1036 ;File "..\..\doc\install\Documentation\es_ES\html\CmdRef\*"
1037 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1038 ;File "..\..\doc\install\Documentation\es_ES\html\InstallGd\*"
1039 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1040 ;File "..\..\doc\install\Documentation\es_ES\html\ReleaseNotes\*"
1041 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1042 ;File "..\..\doc\install\Documentation\es_ES\html\SysAdminGd\*"
1046 SetOutPath "$INSTDIR\Documentation"
1047 File "..\..\doc\install\Documentation\ja_JP\README.TXT"
1048 SetOutPath "$INSTDIR\Documentation\html"
1049 File "..\..\doc\install\Documentation\ja_JP\html\*"
1050 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1051 File "..\..\doc\install\Documentation\ja_JP\html\CmdRef\*"
1052 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1053 File "..\..\doc\install\Documentation\ja_JP\html\InstallGd\*"
1054 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1055 ;File "..\..\doc\install\Documentation\ja_JP\html\ReleaseNotes\*"
1056 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1057 ;File "..\..\doc\install\Documentation\ja_JP\html\SysAdminGd\*"
1061 SetOutPath "$INSTDIR\Documentation"
1062 File "..\..\doc\install\Documentation\ko_KR\README.TXT"
1063 SetOutPath "$INSTDIR\Documentation\html"
1064 File "..\..\doc\install\Documentation\ko_KR\html\*"
1065 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1066 ;File "..\..\doc\install\Documentation\ko_KR\html\CmdRef\*"
1067 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1068 File "..\..\doc\install\Documentation\ko_KR\html\InstallGd\*"
1069 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1070 File "..\..\doc\install\Documentation\ko_KR\html\ReleaseNotes\*"
1071 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1072 File "..\..\doc\install\Documentation\ko_KR\html\SysAdminGd\*"
1076 SetOutPath "$INSTDIR\Documentation"
1077 File "..\..\doc\install\Documentation\pt_BR\README.TXT"
1078 SetOutPath "$INSTDIR\Documentation\html"
1079 File "..\..\doc\install\Documentation\pt_BR\html\*"
1080 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1081 ;File "..\..\doc\install\Documentation\pt_BR\html\CmdRef\*"
1082 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1083 File "..\..\doc\install\Documentation\pt_BR\html\InstallGd\*"
1084 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1085 File "..\..\doc\install\Documentation\pt_BR\html\ReleaseNotes\*"
1086 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1087 ;File "..\..\doc\install\Documentation\pt_BR\html\SysAdminGd\*"
1091 SetOutPath "$INSTDIR\Documentation"
1092 File "..\..\doc\install\Documentation\zh_CN\README.TXT"
1093 SetOutPath "$INSTDIR\Documentation\html"
1094 File "..\..\doc\install\Documentation\zh_CN\html\*"
1095 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1096 ;File "..\..\doc\install\Documentation\zh_CN\html\CmdRef\*"
1097 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1098 File "..\..\doc\install\Documentation\zh_CN\html\InstallGd\*"
1099 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1100 File "..\..\doc\install\Documentation\zh_CN\html\ReleaseNotes\*"
1101 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1102 ;File "..\..\doc\install\Documentation\zh_CN\html\SysAdminGd\*"
1106 SetOutPath "$INSTDIR\Documentation"
1107 File "..\..\doc\install\Documentation\zh_TW\README.TXT"
1108 SetOutPath "$INSTDIR\Documentation\html"
1109 File "..\..\doc\install\Documentation\zh_TW\html\*"
1110 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1111 ;File "..\..\doc\install\Documentation\zh_TW\html\CmdRef\*"
1112 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1113 File "..\..\doc\install\Documentation\zh_TW\html\InstallGd\*"
1114 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1115 File "..\..\doc\install\Documentation\zh_TW\html\ReleaseNotes\*"
1116 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1117 ;File "..\..\doc\install\Documentation\zh_TW\html\SysAdminGd\*"
1122 ;Store install folder
1123 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation" "" $INSTDIR
1124 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "VersionString" ${AFS_VERSION}
1125 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
1126 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
1127 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
1128 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
1129 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
1130 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
1131 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
1133 ; Write start menu shortcut
1134 SetOutPath "$SMPROGRAMS\OpenAFS"
1135 CreateShortCut "$SMPROGRAMS\OpenAFS\Documentation.lnk" "$INSTDIR\Documentation\html\index.htm"
1138 WriteUninstaller "$INSTDIR\Uninstall.exe"
1139 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
1140 Call AFSCommon.Install
1144 Section "Software Development Kit (SDK)" secSDK
1146 SetOutPath "$INSTDIR\Client\Program\lib"
1147 File /r "${AFS_CLIENT_LIBDIR}\*.*"
1149 SetOutPath "$INSTDIR\Client\Program\Include"
1150 File /r "${AFS_BUILD_INCDIR}\*.*"
1153 SetOutPath "$INSTDIR\Client\Program\Sample"
1154 File "..\..\afsd\sample\token.c"
1156 ;Store install folder
1157 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS SDK" "" $INSTDIR
1158 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "VersionString" ${AFS_VERSION}
1159 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
1160 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
1161 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
1162 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
1163 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
1164 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
1165 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
1167 WriteUninstaller "$INSTDIR\Uninstall.exe"
1168 SetOutPath "$SMPROGRAMS\OpenAFS"
1169 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
1171 Call AFSCommon.Install
1174 ;Display the Finish header
1175 ;Insert this macro after the sections if you are not using a finish page
1176 ;!insertmacro MUI_SECTIONS_FINISHHEADER
1178 ;--------------------------------
1179 ;Installer Functions
1183 !insertmacro MUI_LANGDLL_DISPLAY
1185 ; Set the default install options
1190 StrCmp $R0 "true" contInstall
1192 MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "You must be an administrator of this machine to install this software."
1197 ; Check that RPC functions are installed (I believe any one of these can be present for
1199 ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\RPC\ClientProtocols" "ncacn_np"
1200 StrCmp $R0 "rpcrt4.dll" contInstall2
1201 ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\RPC\ClientProtocols" "ncacn_ip_tcp"
1202 StrCmp $R0 "rpcrt4.dll" contInstall2
1203 ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\RPC\ClientProtocols" "ncadg_ip_udp"
1204 StrCmp $R0 "rpcrt4.dll" contInstall2
1206 MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "An error was detected with your Windows RPC installation. Please make sure Windows RPC is installed before installing OpenAFS."
1211 ; Our logic should be like this.
1212 ; 1) If no AFS components are installed, we do a clean install with default options. (Client/Docs)
1213 ; 2) If existing modules are installed, we keep them selected
1214 ; 3) If it is an upgrade, we set the text accordingly, else we mark it as a re-install
1216 Call IsAnyAFSInstalled
1218 StrCmp $R0 "0" DefaultOptions
1220 Call ShouldClientInstall
1223 ; Check if it was an IBM/Transarc version
1224 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "DisplayName"
1225 StrCmp $R0 "IBM AFS Client" DoIBM
1226 StrCmp $R0 "Transarc AFS Client" DoIBM
1229 StrCmp $R2 "0" NoClient
1230 StrCmp $R2 "1" ReinstallClient
1231 StrCmp $R2 "2" UpgradeClient
1232 StrCmp $R2 "3" DowngradeClient
1235 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\AFS Client\CurrentVersion" "MajorVersion"
1236 StrCmp $R0 "3" +1 NotIBM
1241 SectionGetFlags ${secClient} $0
1242 IntOp $0 $0 | ${SF_SELECTED}
1243 SectionSetFlags ${secClient} $0
1244 ;# !insertmacro SelectSection ${secClient}
1247 ;StrCpy $1 ${secClient} ; Gotta remember which section we are at now...
1248 SectionGetFlags ${secClient} $0
1249 IntOp $0 $0 & ${SECTION_OFF}
1250 SectionSetFlags ${secClient} $0
1253 SectionGetFlags ${secClient} $0
1254 IntOp $0 $0 | ${SF_SELECTED}
1255 SectionSetFlags ${secClient} $0
1256 SectionSetText ${secClient} $(UPGRADE_CLIENT)
1259 SectionGetFlags ${secClient} $0
1260 IntOp $0 $0 | ${SF_SELECTED}
1261 SectionSetFlags ${secClient} $0
1262 SectionSetText ${secClient} $(REINSTALL_CLIENT)
1265 SectionGetFlags ${secClient} $0
1266 IntOp $0 $0 | ${SF_SELECTED}
1267 SectionSetFlags ${secClient} $0
1268 SectionSetText ${secClient} $(REINSTALL_CLIENT)
1274 Call ShouldServerInstall
1276 StrCmp $R2 "0" NoServer
1277 StrCmp $R2 "1" ReinstallServer
1278 StrCmp $R2 "2" UpgradeServer
1279 StrCmp $R2 "3" DowngradeServer
1281 SectionGetFlags ${secServer} $0
1282 IntOp $0 $0 | ${SF_SELECTED}
1283 SectionSetFlags ${secServer} $0
1284 ;# !insertmacro UnselectSection ${secServer}
1288 SectionGetFlags ${secServer} $0
1289 IntOp $0 $0 | ${SF_SELECTED}
1290 SectionSetFlags ${secServer} $0
1291 SectionSetText ${secServer} $(UPGRADE_SERVER)
1295 SectionGetFlags ${secServer} $0
1296 IntOp $0 $0 | ${SF_SELECTED}
1297 SectionSetFlags ${secServer} $0
1298 SectionSetText ${secServer} $(REINSTALL_SERVER)
1302 SectionGetFlags ${secServer} $0
1303 IntOp $0 $0 | ${SF_SELECTED}
1304 SectionSetFlags ${secServer} $0
1305 SectionSetText ${secServer} $(REINSTALL_SERVER)
1309 SectionGetFlags ${secServer} $0
1310 IntOp $0 $0 & ${SECTION_OFF}
1311 SectionSetFlags ${secServer} $0
1312 ;# !insertmacro UnselectSection ${secServer}
1316 ; Check control center
1317 Call IsControlInstalled
1319 StrCmp $R2 "0" NoControl
1321 SectionGetFlags ${secControl} $0
1322 IntOp $0 $0 | ${SF_SELECTED}
1323 SectionSetFlags ${secControl} $0
1327 SectionGetFlags ${secControl} $0
1328 IntOp $0 $0 & ${SECTION_OFF}
1329 SectionSetFlags ${secControl} $0
1330 ;# !insertmacro UnselectSection ${secControl}
1333 ; Check Documentation
1334 Call IsDocumentationInstalled
1336 StrCmp $R2 "0" NoDocs
1337 SectionGetFlags ${secDocs} $0
1338 IntOp $0 $0 | ${SF_SELECTED}
1339 SectionSetFlags ${secDocs} $0
1343 SectionGetFlags ${secDocs} $0
1344 IntOp $0 $0 & ${SECTION_OFF}
1345 SectionSetFlags ${secDocs} $0
1348 ; To check the SDK, we simply look to see if the files exist. If they do,
1349 ; the SDK is installed. If not, we don't need to push it on the user.
1350 ; If they are there, we want to make sure they match the installed version.
1352 IfFileExists "$INSTDIR\Client\Program\Include\main.h" +1 NoSDK
1353 SectionGetFlags ${secSDK} $0
1354 IntOp $0 $0 | ${SF_SELECTED}
1355 SectionSetFlags ${secSDK} $0
1359 SectionGetFlags ${secSDK} $0
1360 IntOp $0 $0 & ${SECTION_OFF}
1361 SectionSetFlags ${secSDK} $0
1366 SectionGetFlags ${secClient} $0
1367 IntOp $0 $0 | ${SF_SELECTED}
1368 SectionSetFlags ${secClient} $0
1370 ; Server NOT selected
1371 SectionGetFlags ${secServer} $0
1372 IntOp $0 $0 & ${SECTION_OFF}
1373 SectionSetFlags ${secServer} $0
1375 ; Control Center NOT selected
1376 SectionGetFlags ${secControl} $0
1377 IntOp $0 $0 & ${SECTION_OFF}
1378 SectionSetFlags ${secControl} $0
1379 ;# !insertmacro UnselectSection ${secControl}
1381 ; Documentation selected
1382 SectionGetFlags ${secDocs} $0
1383 IntOp $0 $0 | ${SF_SELECTED}
1384 SectionSetFlags ${secDocs} $0
1385 ;# !insertmacro UnselectSection ${secDocs}
1388 SectionGetFlags ${secSDK} $0
1389 IntOp $0 $0 & ${SECTION_OFF}
1390 SectionSetFlags ${secSDK} $0
1391 ;# !insertmacro UnselectSection ${secSDK}
1400 ; See if we can set a default installation path...
1401 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PathName"
1402 StrCmp $R0 "" TryServer
1406 ; Work around bug in 1.3.5000, 1.3.5100, 1.3.5200, 1.3.5201, 1.3.5299 installers...
1407 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MajorVersion"
1408 StrCmp $R0 "1" +1 SkipParent
1409 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MinorVersion"
1410 StrCmp $R0 "3" +1 SkipParent
1411 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PatchLevel"
1412 StrCmp $R0 "5000" UpParent
1413 StrCmp $R0 "5100" UpParent
1414 StrCmp $R0 "5200" UpParent
1415 StrCmp $R0 "5201" UpParent
1416 StrCmp $R0 "5299" UpParent
1428 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PathName"
1429 StrCmp $R0 "" TryControl
1437 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PathName"
1445 File /oname=$0 CellServPage.ini
1447 File /oname=$1 AFSCell.ini
1448 ;File /oname=$1 ConfigURL.ini
1456 ;--------------------------------
1457 ; These are our cleanup functions
1458 Function .onInstFailed
1463 Function .onInstSuccess
1469 ;--------------------------------
1472 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
1473 !insertmacro MUI_DESCRIPTION_TEXT ${secServer} $(DESC_secServer)
1474 !insertmacro MUI_DESCRIPTION_TEXT ${secClient} $(DESC_secClient)
1475 !insertmacro MUI_DESCRIPTION_TEXT ${secControl} $(DESC_secControl)
1476 !insertmacro MUI_DESCRIPTION_TEXT ${secDocs} $(DESC_secDocs)
1477 !insertmacro MUI_DESCRIPTION_TEXT ${secSDK} $(DESC_secSDK)
1478 !insertmacro MUI_FUNCTION_DESCRIPTION_END
1480 ;--------------------------------
1481 ;Uninstaller Section
1484 ; Make sure the user REALLY wants to do this, unless they did a silent uninstall, in which case...let them!
1485 IfSilent StartRemove ; New in v2.0b4
1486 MessageBox MB_YESNO "Are you sure you want to remove OpenAFS from this machine?" IDYES StartRemove
1491 SetShellVarContext all
1492 ; Stop the running processes
1494 File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe"
1495 nsExec::Exec '$R0 afscreds.exe'
1496 Exec "afscreds.exe -z"
1497 ; in case we are upgrading an old version that does not support -z
1499 nsExec::Exec '$R0 afscreds.exe'
1501 nsExec::Exec '$R0 krbcc32s.exe'
1504 ; Delete the AFS service
1506 File /oname=$R0 "${AFS_WININSTALL_DIR}\Service.exe"
1507 nsExec::Exec "net stop TransarcAFSDaemon"
1508 nsExec::Exec "net stop TransarcAFSServer"
1509 nsExec::Exec '$R0 u TransarcAFSDaemon'
1510 ; After we stop the service, but before we delete it, we have to remove the volume data
1511 ; This is because the storage locations are in the registry under the service key.
1512 ; Call un.RemoveAFSVolumes
1513 nsExec::Exec '$R0 u TransarcAFSServer'
1516 Call un.RemoveProvider
1518 Push "$INSTDIR\Client\Program"
1519 Call un.RemoveFromPath
1520 Push "$INSTDIR\Common"
1521 Call un.RemoveFromPath
1523 Push "$INSTDIR\kfw\bin"
1524 Call un.RemoveFromPath
1527 ; Delete documentation
1528 Delete "$INSTDIR\Documentation\README.TXT"
1529 Delete "$INSTDIR\Documentation\html\*"
1530 Delete "$INSTDIR\Documentation\html\CmdRef\*"
1531 Delete "$INSTDIR\Documentation\html\InstallGd\*"
1532 Delete "$INSTDIR\Documentation\html\ReleaseNotes\*"
1533 Delete "$INSTDIR\Documentation\html\SysAdminGd\*"
1535 Delete /REBOOTOK "$INSTDIR\Common\afs_config.exe"
1536 Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.dll"
1537 Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.dll"
1538 Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.dll"
1539 Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.dll"
1540 Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.dll"
1541 Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.dll"
1542 Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.dll"
1543 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll"
1544 Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.dll"
1545 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll"
1546 Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.dll"
1547 Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.dll"
1548 Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.dll"
1549 Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.dll"
1552 Delete /REBOOTOK "$INSTDIR\Common\afs_config.pdb"
1553 Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.pdb"
1554 Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.pdb"
1555 Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.pdb"
1556 Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.pdb"
1557 Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.pdb"
1558 Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.pdb"
1559 Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.pdb"
1560 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.pdb"
1561 Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.pdb"
1562 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.pdb"
1563 Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.pdb"
1564 Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.pdb"
1565 Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.pdb"
1566 Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.pdb"
1569 Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.dll"
1570 Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.pdb"
1571 Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.dll"
1572 Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.pdb"
1573 Delete /REBOOTOK "$INSTDIR\bin\mfc71d.dll"
1574 Delete /REBOOTOK "$INSTDIR\bin\mfc71d.pdb"
1577 Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.dll"
1578 Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.pdb"
1579 Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.dll"
1580 Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.pdb"
1581 Delete /REBOOTOK "$INSTDIR\bin\mfc70d.dll"
1582 Delete /REBOOTOK "$INSTDIR\bin\mfc70d.pdb"
1584 Delete /REBOOTOK "$INSTDIR\bin\mfc42d.dll"
1585 Delete /REBOOTOK "$INSTDIR\bin\mfc42d.pdb"
1586 Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.dll"
1587 Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.pdb"
1588 Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.dll"
1589 Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.pdb"
1594 Delete /REBOOTOK "$INSTDIR\bin\mfc71.dll"
1595 Delete /REBOOTOK "$INSTDIR\bin\msvcr71.dll"
1596 Delete /REBOOTOK "$INSTDIR\bin\msvcp71.dll"
1597 Delete /REBOOTOK "$INSTDIR\bin\MFC71CHS.DLL"
1598 Delete /REBOOTOK "$INSTDIR\bin\MFC71CHT.DLL"
1599 Delete /REBOOTOK "$INSTDIR\bin\MFC71DEU.DLL"
1600 Delete /REBOOTOK "$INSTDIR\bin\MFC71ENU.DLL"
1601 Delete /REBOOTOK "$INSTDIR\bin\MFC71ESP.DLL"
1602 Delete /REBOOTOK "$INSTDIR\bin\MFC71FRA.DLL"
1603 Delete /REBOOTOK "$INSTDIR\bin\MFC71ITA.DLL"
1604 Delete /REBOOTOK "$INSTDIR\bin\MFC71JPN.DLL"
1605 Delete /REBOOTOK "$INSTDIR\bin\MFC71KOR.DLL"
1608 Delete /REBOOTOK "$INSTDIR\bin\mfc70.dll"
1609 Delete /REBOOTOK "$INSTDIR\bin\msvcr70.dll"
1610 Delete /REBOOTOK "$INSTDIR\bin\msvcp70.dll"
1611 Delete /REBOOTOK "$INSTDIR\bin\MFC70CHS.DLL"
1612 Delete /REBOOTOK "$INSTDIR\bin\MFC70CHT.DLL"
1613 Delete /REBOOTOK "$INSTDIR\bin\MFC70DEU.DLL"
1614 Delete /REBOOTOK "$INSTDIR\bin\MFC70ENU.DLL"
1615 Delete /REBOOTOK "$INSTDIR\bin\MFC70ESP.DLL"
1616 Delete /REBOOTOK "$INSTDIR\bin\MFC70FRA.DLL"
1617 Delete /REBOOTOK "$INSTDIR\bin\MFC70ITA.DLL"
1618 Delete /REBOOTOK "$INSTDIR\bin\MFC70JPN.DLL"
1619 Delete /REBOOTOK "$INSTDIR\bin\MFC70KOR.DLL"
1621 Delete /REBOOTOK "$INSTDIR\bin\mfc42.dll"
1622 Delete /REBOOTOK "$INSTDIR\bin\msvcp60.dll"
1623 Delete /REBOOTOK "$INSTDIR\bin\msvcrt.dll"
1629 ; IfFileExists "$WINDIR\afsdcell.ini" CellExists SkipDelAsk
1631 MessageBox MB_YESNO "Would you like to keep your configuration files?" IDYES SkipDel
1633 Delete "$WINDIR\afsdcell.ini"
1635 Delete "$WINDIR\afsdsbmt.ini"
1636 ; Only remove krb5.ini if KfW was installed
1638 Delete "$WINDIR\krb5.ini"
1640 Delete "$WINDIR\afsdns.ini"
1641 Delete "$WINDIR\afs_freelance.ini"
1644 Delete "$WINDIR\afsd_init.log"
1645 Delete "$INSTDIR\Uninstall.exe"
1648 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.exe"
1649 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe"
1650 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe"
1651 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.exe"
1652 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.exe"
1653 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.exe"
1654 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.exe"
1655 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.exe"
1656 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.exe"
1657 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.exe"
1658 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\salvager.exe"
1659 Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.dll"
1660 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\upclient.exe"
1661 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\upserver.exe"
1662 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\vlserver.exe"
1663 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\volinfo.exe"
1664 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\volserver.exe"
1667 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.pdb"
1668 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.pdb"
1669 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.pdb"
1670 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.pdb"
1671 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.pdb"
1672 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.pdb"
1673 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.pdb"
1674 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.pdb"
1675 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.pdb"
1676 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.pdb"
1677 Delete "$INSTDIR\Server\usr\afs\bin\salvager.pdb"
1678 Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.pdb"
1679 Delete "$INSTDIR\Server\usr\afs\bin\upclient.pdb"
1680 Delete "$INSTDIR\Server\usr\afs\bin\upserver.pdb"
1681 Delete "$INSTDIR\Server\usr\afs\bin\vlserver.pdb"
1682 Delete "$INSTDIR\Server\usr\afs\bin\volinfo.pdb"
1683 Delete "$INSTDIR\Server\usr\afs\bin\volserver.pdb"
1686 RMDir /r "$INSTDIR\Server\usr\afs\bin"
1687 ; do not delete the server configuration files
1688 ; or we will lose the volumes and authentication
1690 ;RmDir /r "$INSTDIR\Server\usr\afs\etc\logs"
1691 ;RmDir /r "$INSTDIR\Server\usr\afs\etc"
1692 ;RmDir /r "$INSTDIR\Server\usr\afs\local"
1693 ;RMDIR /r "$INSTDIR\Server\usr\afs\logs"
1695 Delete /REBOOTOK "$SYSDIR\afsserver.cpl"
1696 Delete /REBOOTOK "$SYSDIR\afs_cpa.cpl"
1699 Delete /REBOOTOK "$SYSDIR\afsserver.pdb"
1700 Delete /REBOOTOK "$SYSDIR\afs_cpa.pdb"
1703 RMDir /r "$INSTDIR\Documentation\html\CmdRef"
1704 RMDir /r "$INSTDIR\Documentation\html\InstallGd"
1705 RMDir /r "$INSTDIR\Documentation\html\ReleaseNotes"
1706 RMDir /r "$INSTDIR\Documentation\html\SysAdminGd"
1707 RMDIr /r "$INSTDIR\Documentation\html"
1709 RMDir "$INSTDIR\Documentation"
1710 ; Delete DOC short cut
1711 Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.exe"
1714 Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.pdb"
1717 Delete /REBOOTOK "$INSTDIR\Client\Program\*"
1718 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\*"
1719 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\afs\*"
1720 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\rx\*"
1721 Delete /REBOOTOK "$INSTDIR\Client\Program\Sample\*"
1722 RMDir "$INSTDIR\Client\Program\Sample"
1723 RMDir "$INSTDIR\Client\Program\Include\afs"
1724 RMDir "$INSTDIR\Client\Program\Include\rx"
1725 RMDir "$INSTDIR\Client\Program\Include"
1726 RMDir "$INSTDIR\Client\Program"
1727 RMDir "$INSTDIR\Client"
1731 Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.dll"
1732 Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.pdb"
1733 Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.dll"
1734 Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.pdb"
1735 Delete /REBOOTOK "$INSTDIR\bin\mfc71d.dll"
1736 Delete /REBOOTOK "$INSTDIR\bin\mfc71d.pdb"
1739 Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.dll"
1740 Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.pdb"
1741 Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.dll"
1742 Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.pdb"
1743 Delete /REBOOTOK "$INSTDIR\bin\mfc70d.dll"
1744 Delete /REBOOTOK "$INSTDIR\bin\mfc70d.pdb"
1746 Delete /REBOOTOK "$INSTDIR\bin\mfc42d.dll"
1747 Delete /REBOOTOK "$INSTDIR\bin\mfc42d.pdb"
1748 Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.dll"
1749 Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.pdb"
1750 Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.dll"
1751 Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.pdb"
1756 Delete /REBOOTOK "$INSTDIR\bin\mfc71.dll"
1757 Delete /REBOOTOK "$INSTDIR\bin\msvcr71.dll"
1758 Delete /REBOOTOK "$INSTDIR\bin\msvcp71.dll"
1759 Delete /REBOOTOK "$INSTDIR\bin\MFC71CHS.DLL"
1760 Delete /REBOOTOK "$INSTDIR\bin\MFC71CHT.DLL"
1761 Delete /REBOOTOK "$INSTDIR\bin\MFC71DEU.DLL"
1762 Delete /REBOOTOK "$INSTDIR\bin\MFC71ENU.DLL"
1763 Delete /REBOOTOK "$INSTDIR\bin\MFC71ESP.DLL"
1764 Delete /REBOOTOK "$INSTDIR\bin\MFC71FRA.DLL"
1765 Delete /REBOOTOK "$INSTDIR\bin\MFC71ITA.DLL"
1766 Delete /REBOOTOK "$INSTDIR\bin\MFC71JPN.DLL"
1767 Delete /REBOOTOK "$INSTDIR\bin\MFC71KOR.DLL"
1770 Delete /REBOOTOK "$INSTDIR\bin\mfc70.dll"
1771 Delete /REBOOTOK "$INSTDIR\bin\msvcr70.dll"
1772 Delete /REBOOTOK "$INSTDIR\bin\msvcp70.dll"
1773 Delete /REBOOTOK "$INSTDIR\bin\MFC70CHS.DLL"
1774 Delete /REBOOTOK "$INSTDIR\bin\MFC70CHT.DLL"
1775 Delete /REBOOTOK "$INSTDIR\bin\MFC70DEU.DLL"
1776 Delete /REBOOTOK "$INSTDIR\bin\MFC70ENU.DLL"
1777 Delete /REBOOTOK "$INSTDIR\bin\MFC70ESP.DLL"
1778 Delete /REBOOTOK "$INSTDIR\bin\MFC70FRA.DLL"
1779 Delete /REBOOTOK "$INSTDIR\bin\MFC70ITA.DLL"
1780 Delete /REBOOTOK "$INSTDIR\bin\MFC70JPN.DLL"
1781 Delete /REBOOTOK "$INSTDIR\bin\MFC70KOR.DLL"
1783 Delete /REBOOTOK "$INSTDIR\bin\mfc42.dll"
1784 Delete /REBOOTOK "$INSTDIR\bin\msvcp60.dll"
1785 Delete /REBOOTOK "$INSTDIR\bin\msvcrt.dll"
1790 Delete /REBOOTOK "$INSTDIR\Common\*"
1791 RMDir "$INSTDIR\Common"
1795 Delete /REBOOTOK "$INSTDIR\kfw\bin\*"
1796 RMDIR /r "$INSTDIR\kfw\bin"
1797 Delete /REBOOTOK "$INSTDIR\kfw\doc\*"
1798 RMDIR /r "$INSTDIR\kfw\doc"
1799 RMDIR /r "$INSTDIR\kfw"
1802 Delete "$SMPROGRAMS\OpenAFS\Documentation.lnk"
1804 ; Remove control center
1805 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.exe"
1806 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.exe"
1807 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.exe"
1808 Delete /REBOOTOK "$INSTDIR\Control Center\CCUninst.dll"
1810 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.pdb"
1811 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.pdb"
1812 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.pdb"
1814 RMDir "$INSTDIR\Control Center"
1816 Delete "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk"
1817 Delete "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk"
1818 Delete "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk"
1819 Delete "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk"
1820 RMDIR "$SMPROGRAMS\OpenAFS\Control Center"
1821 RMDir /r "$SMPROGRAMS\OpenAFS\Client"
1822 RMDir /r "$SMPROGRAMS\OpenAFS"
1823 Delete "$SMSTARTUP\AFS Credentials.lnk"
1825 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "CachePath"
1827 Delete "$R0\AFSCache"
1828 Delete "C:\AFSCache"
1830 DeleteRegKey HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension"
1831 DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32"
1832 DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
1833 DeleteRegKey HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension"
1834 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
1836 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
1837 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client"
1838 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion"
1839 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation"
1840 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion"
1841 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Control Center"
1842 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
1843 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server"
1844 DeleteRegKey /ifempty HKLM "${AFS_REGKEY_ROOT}"
1845 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS"
1846 DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled"
1852 ;--------------------------------
1853 ;Uninstaller Functions
1857 ;Get language from registry
1858 ReadRegStr $LANGUAGE HKCU "Software\OpenAFS\AFS" "Installer Language"
1862 Function un.onUninstSuccess
1864 MessageBox MB_OK "Please reboot your machine to complete uninstallation of the software"
1868 ;------------------------------
1869 ; Get the CellServDB file from the Internet
1871 Function afs.GetCellServDB
1873 ;Check if we should download CellServDB
1874 ReadINIStr $R0 $0 "Field 4" "State"
1875 StrCmp $R0 "1" DoDownload
1877 ;Do nothing if we're keeping the existing file
1878 ReadINIStr $R0 $0 "Field 2" "State"
1881 ReadINIStr $R0 $0 "Field 6" "State"
1882 StrCmp $R0 "1" CheckOther
1884 ReadINIStr $R0 $0 "Field 3" "State"
1885 StrCmp $R0 "1" UsePackaged
1887 ; If none of these, grab file from other location
1891 ReadINIStr $R0 $0 "Field 5" "State"
1892 NSISdl::download $R0 "$WINDIR\afsdcell.ini"
1893 Pop $R0 ;Get the return value
1894 StrCmp $R0 "success" +2
1895 MessageBox MB_OK|MB_ICONSTOP "Download failed: $R0"
1899 SetOutPath "$WINDIR"
1904 ReadINIStr $R0 $0 "Field 7" "State"
1906 CopyFiles $R0 "$WINDIR\afsdcell.ini"
1912 Function AddProvider
1915 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder" "ProviderOrder"
1917 StrCpy $R0 "TransarcAFSDaemon"
1921 StrCmp $R0 "" +1 DoOther
1922 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder" "ProviderOrder"
1923 StrCpy $R0 "$R1,TransarcAFSDaemon"
1924 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder" "ProviderOrder" $R0
1926 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order" "ProviderOrder"
1928 StrCpy $R0 "TransarcAFSDaemon"
1932 StrCmp $R0 "" +1 End
1933 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order" "ProviderOrder"
1934 StrCpy $R0 "$R1,TransarcAFSDaemon"
1935 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order" "ProviderOrder" $R0
1941 Function un.RemoveProvider
1943 StrCpy $R0 "TransarcAFSDaemon"
1945 StrCpy $R0 "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder"
1946 Call un.RemoveFromProvider
1947 StrCpy $R0 "TransarcAFSDaemon"
1949 StrCpy $R0 "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order"
1950 Call un.RemoveFromProvider
1954 Function un.RemoveFromProvider
1963 ReadRegStr $1 HKLM "$R0" "ProviderOrder"
1964 StrCpy $5 $1 1 -1 # copy last char
1965 StrCmp $5 "," +2 # if last char != ,
1966 StrCpy $1 "$1," # append ,
1969 Call un.StrStr ; Find `$0,` in $1
1970 Pop $2 ; pos of our dir
1971 StrCmp $2 "" unRemoveFromPath_done
1972 ; else, it is in path
1977 StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
1978 StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
1981 StrCpy $5 $3 1 -1 # copy last char
1982 StrCmp $5 "," 0 +2 # if last char == ,
1983 StrCpy $3 $3 -1 # remove last char
1985 WriteRegStr HKLM "$R0" "ProviderOrder" $3
1987 unRemoveFromPath_done:
1997 Function CheckPathForAFS
2002 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
2011 IfFileExists "$3\afsd_service.exe" Error
2012 StrCpy $1 $0 32768 1
2014 IntCmp $2 0 Done Done loop
2017 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."
2018 Abort "Unable to install OpenAFS"
2026 Function AddToUniquePath
2030 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
2034 StrCmp $R0 "" +1 Done
2040 ;-------------------------------
2041 ;Do the page to get the CellServDB
2043 Function AFSPageGetCellServDB
2044 ; Skip this page if we are not installing the client
2045 SectionGetFlags ${secClient} $R0
2046 IntOp $R0 $R0 & ${SF_SELECTED}
2049 ; Set the install options here
2052 WriteINIStr $0 "Field 2" "Flags" "DISABLED"
2053 WriteINIStr $0 "Field 3" "State" "1"
2054 WriteINISTR $0 "Field 4" "State" "0"
2055 WriteINIStr $0 "Field 6" "State" "0"
2057 ; If there is an existing afsdcell.ini file, allow the user to choose it and make it default
2058 IfFileExists "$WINDIR\afsdcell.ini" +1 notpresent
2059 WriteINIStr $0 "Field 2" "Flags" "ENABLED"
2060 WriteINIStr $0 "Field 2" "State" "1"
2061 WriteINIStr $0 "Field 3" "State" "0"
2065 !insertmacro MUI_HEADER_TEXT "CellServDB Configuration" "Please choose a method for installing the CellServDB file:"
2066 InstallOptions::dialog $0
2068 StrCmp $R1 "cancel" exit
2069 StrCmp $R1 "back" done
2070 StrCmp $R1 "success" done
2074 ; Check that if a file is set, a valid filename is entered...
2075 ReadINIStr $R0 $0 "Field 6" "State"
2076 StrCmp $R0 "1" CheckFileName
2078 ;Check if a URL is specified, one *IS* specified
2079 ReadINIStr $R0 $0 "Field 4" "State"
2080 StrCmp $R0 "1" CheckURL Skip
2083 ReadINIStr $R0 $0 "Field 5" "State"
2084 StrCmp $R0 "" +1 Skip
2085 MessageBox MB_OK|MB_ICONSTOP $(URLError)
2086 WriteINIStr $0 "Field 4" "State" "0"
2090 ReadINIStr $R0 $0 "Field 7" "State"
2091 IfFileExists $R0 Skip
2093 MessageBox MB_OK|MB_ICONSTOP $(CellError)
2094 WriteINIStr $0 "Field 6" "State" "0"
2102 Function AFSPageGetCellName
2104 ; Skip this page if we are not installing the client
2105 SectionGetFlags ${secClient} $R0
2106 IntOp $R0 $R0 & ${SF_SELECTED}
2110 ; If this is a server install, we do NOT want to recommend the Freelance client
2111 ; And we do not need to ask for the cell name.
2112 SectionGetFlags ${secServer} $R1
2113 IntOp $R1 $R1 & ${SF_SELECTED}
2114 StrCmp $R1 "1" +1 NotServer
2115 WriteINIStr $1 "Field 6" "Text" "Enable AFS Freelance client (Not Recommended for servers)"
2116 WriteINIStr $1 "Field 5" "State" "0"
2117 WriteINIStr $1 "Field 1" "Flags" "DISABLED"
2118 WriteINIStr $1 "Field 2" "Flags" "DISABLED"
2121 WriteINIStr $1 "Field 6" "Text" "Enable AFS Freelance client (Recommended)"
2122 WriteINIStr $1 "Field 5" "State" "1"
2123 WriteINIStr $1 "Field 1" "Flags" ""
2124 WriteINIStr $1 "Field 2" "Flags" ""
2126 ; Get the current cell name, if any
2127 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell"
2129 WriteINIStr $1 "Field 2" "State" $R1
2130 !insertmacro MUI_HEADER_TEXT "Client Cell Name Configuration" "Please enter the name for your default cell:"
2131 InstallOptions::dialog $1
2133 StrCmp $R1 "cancel" exit
2134 StrCmp $R1 "back" done
2135 StrCmp $R1 "success" done
2138 ReadINIStr $R0 $1 "Field 2" "State"
2139 StrCmp $R0 "" +1 good
2141 MessageBox MB_OK|MB_ICONSTOP $(CellNameError)
2147 ; Common install routines for each module
2148 Function AFSCommon.Install
2150 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayName" "OpenAFS for Windows"
2151 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "UninstallString" "$INSTDIR\uninstall.exe"
2153 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayVersion" "${AFS_VERSION}"
2155 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayVersion" "${AFS_VERSION} Checked/Debug"
2157 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "URLInfoAbout" "http://www.openafs.org/"
2162 ;-------------------
2163 ; Get the currently installed version and place it on the stack
2165 Function GetInstalledVersion
2170 ReadRegStr $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "VersionString"
2171 StrCmp $R0 "" NotTransarc done
2175 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "VersionString"
2184 ; Functions to get each component of the version number
2185 Function GetInstalledVersionMajor
2190 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "MajorVersion"
2191 StrCmp $R0 "" NotTransarc done
2195 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "MajorVersion"
2204 Function GetInstalledVersionMinor
2209 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "MinorVersion"
2210 StrCmp $R0 "" NotTransarc done
2214 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "MinorVersion"
2223 Function GetInstalledVersionPatch
2228 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "PatchLevel"
2229 StrCmp $R0 "" NotTransarc done
2233 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "PatchLevel"
2244 ;-------------------------------
2245 ; Check if the client should be checked for default install
2246 Function ShouldClientInstall
2248 StrCpy $R2 "AFS Client"
2249 Call GetInstalledVersion
2252 StrCmp $R0 "" NotInstalled
2253 ; Now we see if it's an older or newer version
2255 Call GetInstalledVersionMajor
2257 IntCmpU $R0 ${AFS_MAJORVERSION} +1 Upgrade Downgrade
2259 Call GetInstalledVersionMinor
2261 IntCmpU $R0 ${AFS_MINORVERSION} +1 Upgrade Downgrade
2263 Call GetInstalledVersionPatch
2265 IntCmpU $R0 ${AFS_PATCHLEVEL} Reinstall Upgrade Downgrade
2288 ;-------------------------------
2289 ; Check how the server options should be set
2290 Function ShouldServerInstall
2292 StrCpy $R2 "AFS Server"
2293 Call GetInstalledVersion
2296 StrCmp $R0 "" NotInstalled
2297 ; Now we see if it's an older or newer version
2299 Call GetInstalledVersionMajor
2301 IntCmpU $R0 ${AFS_MAJORVERSION} +1 Upgrade Downgrade
2303 Call GetInstalledVersionMinor
2305 IntCmpU $R0 ${AFS_MINORVERSION} +1 Upgrade Downgrade
2307 Call GetInstalledVersionPatch
2309 IntCmpU $R0 ${AFS_PATCHLEVEL} Reinstall Upgrade Downgrade
2334 ; See if AFS Server is installed
2335 ; Returns: "1" if it is, 0 if it is not (on the stack)
2336 Function IsServerInstalled
2338 StrCpy $R2 "AFS Server"
2339 Call GetInstalledVersion
2342 StrCmp $R0 "" NotInstalled
2355 ; See if AFS Client is installed
2356 ; Returns: "1" if it is, 0 if it is not (on the stack)
2357 Function IsClientInstalled
2359 StrCpy $R2 "AFS Client"
2360 Call GetInstalledVersion
2363 StrCmp $R0 "" NotInstalled
2377 ; See if AFS Documentation is installed
2378 ; Returns: "1" if it is, 0 if it is not (on the stack)
2379 Function IsDocumentationInstalled
2381 StrCpy $R2 "AFS Supplemental Documentation"
2382 Call GetInstalledVersion
2385 StrCmp $R0 "" NotInstalled
2398 ; See if Control Center is installed
2399 ; Returns: "1" if it is, 0 if it is not (on the stack)
2400 Function IsControlInstalled
2402 StrCpy $R2 "AFS Control Center"
2403 Call GetInstalledVersion
2406 StrCmp $R0 "" NotInstalled
2421 ; output, top of stack (replaces, with e.g. whatever)
2422 ; modifies no other variables.
2424 Function GetParameters
2428 StrCpy $R0 $CMDLINE 1
2432 StrCpy $R1 ' ' ; we're scanning for a space instead of a quote
2434 StrCpy $R0 $CMDLINE 1 $R2
2435 StrCmp $R0 $R1 loop2
2441 StrCpy $R0 $CMDLINE 1 $R2
2442 StrCmp $R0 " " loop2
2443 StrCpy $R0 $CMDLINE "" $R2
2450 ;Check to see if any AFS component is installed
2451 ;Returns: Value on stack: "1" if it is, "0" if it is not
2452 Function IsAnyAFSInstalled
2457 Call IsClientInstalled
2459 Call IsServerInstalled
2461 Call IsControlInstalled
2463 Call IsDocumentationInstalled
2465 ; Now we must see if ANY of the $Rn values are 1
2466 StrCmp $R0 "1" SomethingInstalled
2467 StrCmp $R1 "1" SomethingInstalled
2468 StrCmp $R2 "1" SomethingInstalled
2469 StrCmp $R3 "1" SomethingInstalled
2483 ;Install English Language Files
2484 Function AFSLangFiles
2486 SetOutPath "$INSTDIR\Common"
2487 File "${AFS_CLIENT_BUILDDIR}\afs_config.exe"
2488 File "${AFS_SERVER_BUILDDIR}\afsadminutil.dll"
2489 !insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afsauthent.dll" "$INSTDIR\Common\afsauthent.dll" "$INSTDIR"
2490 !insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afspthread.dll" "$INSTDIR\Common\afspthread.dll" "$INSTDIR"
2491 !insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afsrpc.dll" "$INSTDIR\Common\afsrpc.dll" "$INSTDIR"
2492 File "${AFS_SERVER_BUILDDIR}\afsclientadmin.dll"
2493 File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.dll"
2494 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
2495 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.dll"
2496 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
2497 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll"
2498 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
2499 File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
2500 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
2504 File "${SYSTEMDIR}\msvcr71d.dll"
2505 File "${SYSTEMDIR}\msvcr71d.pdb"
2506 File "${SYSTEMDIR}\msvcp71d.dll"
2507 File "${SYSTEMDIR}\msvcp71d.pdb"
2508 File "${SYSTEMDIR}\mfc71d.dll"
2509 File "${SYSTEMDIR}\mfc71d.pdb"
2510 File "${SYSTEMDIR}\MFC71CHS.DLL"
2511 File "${SYSTEMDIR}\MFC71CHT.DLL"
2512 File "${SYSTEMDIR}\MFC71DEU.DLL"
2513 File "${SYSTEMDIR}\MFC71ENU.DLL"
2514 File "${SYSTEMDIR}\MFC71ESP.DLL"
2515 File "${SYSTEMDIR}\MFC71FRA.DLL"
2516 File "${SYSTEMDIR}\MFC71ITA.DLL"
2517 File "${SYSTEMDIR}\MFC71JPN.DLL"
2518 File "${SYSTEMDIR}\MFC71KOR.DLL"
2521 File "${SYSTEMDIR}\msvcr70d.dll"
2522 File "${SYSTEMDIR}\msvcr70d.pdb"
2523 File "${SYSTEMDIR}\msvcp70d.dll"
2524 File "${SYSTEMDIR}\msvcp70d.pdb"
2525 File "${SYSTEMDIR}\mfc70d.dll"
2526 File "${SYSTEMDIR}\mfc70d.pdb"
2527 File "${SYSTEMDIR}\MFC70CHS.DLL"
2528 File "${SYSTEMDIR}\MFC70CHT.DLL"
2529 File "${SYSTEMDIR}\MFC70DEU.DLL"
2530 File "${SYSTEMDIR}\MFC70ENU.DLL"
2531 File "${SYSTEMDIR}\MFC70ESP.DLL"
2532 File "${SYSTEMDIR}\MFC70FRA.DLL"
2533 File "${SYSTEMDIR}\MFC70ITA.DLL"
2534 File "${SYSTEMDIR}\MFC70JPN.DLL"
2535 File "${SYSTEMDIR}\MFC70KOR.DLL"
2537 File "${SYSTEMDIR}\mfc42d.dll"
2538 File "${SYSTEMDIR}\mfc42d.pdb"
2539 File "${SYSTEMDIR}\msvcp60d.dll"
2540 File "${SYSTEMDIR}\msvcp60d.pdb"
2541 File "${SYSTEMDIR}\msvcrtd.dll"
2542 File "${SYSTEMDIR}\msvcrtd.pdb"
2547 File "${SYSTEMDIR}\mfc71.dll"
2548 File "${SYSTEMDIR}\msvcr71.dll"
2549 File "${SYSTEMDIR}\msvcp71.dll"
2550 File "${SYSTEMDIR}\MFC71CHS.DLL"
2551 File "${SYSTEMDIR}\MFC71CHT.DLL"
2552 File "${SYSTEMDIR}\MFC71DEU.DLL"
2553 File "${SYSTEMDIR}\MFC71ENU.DLL"
2554 File "${SYSTEMDIR}\MFC71ESP.DLL"
2555 File "${SYSTEMDIR}\MFC71FRA.DLL"
2556 File "${SYSTEMDIR}\MFC71ITA.DLL"
2557 File "${SYSTEMDIR}\MFC71JPN.DLL"
2558 File "${SYSTEMDIR}\MFC71KOR.DLL"
2561 File "${SYSTEMDIR}\mfc70.dll"
2562 File "${SYSTEMDIR}\msvcr70.dll"
2563 File "${SYSTEMDIR}\msvcp70.dll"
2564 File "${SYSTEMDIR}\MFC70CHS.DLL"
2565 File "${SYSTEMDIR}\MFC70CHT.DLL"
2566 File "${SYSTEMDIR}\MFC70DEU.DLL"
2567 File "${SYSTEMDIR}\MFC70ENU.DLL"
2568 File "${SYSTEMDIR}\MFC70ESP.DLL"
2569 File "${SYSTEMDIR}\MFC70FRA.DLL"
2570 File "${SYSTEMDIR}\MFC70ITA.DLL"
2571 File "${SYSTEMDIR}\MFC70JPN.DLL"
2572 File "${SYSTEMDIR}\MFC70KOR.DLL"
2574 File "${SYSTEMDIR}\mfc42.dll"
2575 File "${SYSTEMDIR}\msvcp60.dll"
2576 File "${SYSTEMDIR}\msvcrt.dll"
2582 File "${AFS_CLIENT_BUILDDIR}\afs_config.pdb"
2583 File "${AFS_SERVER_BUILDDIR}\afsadminutil.pdb"
2584 File "${AFS_DESTDIR}\lib\afsauthent.pdb"
2585 File "${AFS_DESTDIR}\lib\afspthread.pdb"
2586 File "${AFS_DESTDIR}\lib\afsrpc.pdb"
2587 File "${AFS_SERVER_BUILDDIR}\afsclientadmin.pdb"
2588 File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.pdb"
2589 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
2590 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.pdb"
2591 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
2592 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb"
2593 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb"
2594 File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb"
2595 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb"
2598 StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
2599 StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
2600 StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
2601 StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
2602 StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
2603 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
2604 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
2605 StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
2609 SetOutPath "$INSTDIR\Documentation"
2610 File "..\..\doc\install\Documentation\en_US\README.TXT"
2612 SetOutPath "$INSTDIR\Client\Program"
2613 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1033.dll" "$INSTDIR\Client\Program\afscreds_1033.dll" "$INSTDIR"
2614 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.dll" "$INSTDIR\Client\Program\afs_shl_ext_1033.dll" "$INSTDIR"
2616 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.pdb"
2617 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.pdb"
2620 SetOutPath "$INSTDIR\Common"
2621 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1033.dll" "$INSTDIR\Common\afs_config_1033.dll" "$INSTDIR"
2622 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.dll" "$INSTDIR\Common\afs_cpa_1033.dll" "$INSTDIR"
2623 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.dll" "$INSTDIR\Common\afseventmsg_1033.dll" "$INSTDIR"
2624 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1033.dll" "$INSTDIR\Common\afs_setup_utils_1033.dll" "$INSTDIR"
2625 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_1033.dll" "$INSTDIR\Common\afsserver_1033.dll" "$INSTDIR"
2626 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.dll" "$INSTDIR\Common\afssvrcfg_1033.dll" "$INSTDIR"
2627 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.dll" "$INSTDIR\Common\TaAfsAccountManager_1033.dll" "$INSTDIR"
2628 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.dll" "$INSTDIR\Common\TaAfsApplLib_1033.dll" "$INSTDIR"
2629 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.dll" "$INSTDIR\Common\TaAfsServerManager_1033.dll" "$INSTDIR"
2630 File "..\..\doc\help\en_US\afs-cc.CNT"
2631 File "..\..\doc\help\en_US\afs-cc.hlp"
2632 File "..\..\doc\help\en_US\afs-light.CNT"
2633 File "..\..\doc\help\en_US\afs-light.hlp"
2634 File "..\..\doc\help\en_US\afs-nt.CNT"
2635 File "..\..\doc\help\en_US\afs-nt.HLP"
2636 File "..\..\doc\help\en_US\taafscfg.CNT"
2637 File "..\..\doc\help\en_US\taafscfg.hlp"
2638 File "..\..\doc\help\en_US\taafssvrmgr.CNT"
2639 File "..\..\doc\help\en_US\taafssvrmgr.hlp"
2640 File "..\..\doc\help\en_US\taafsusrmgr.CNT"
2641 File "..\..\doc\help\en_US\taafsusrmgr.hlp"
2644 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.pdb"
2645 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.pdb"
2646 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.pdb"
2647 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1033.pdb"
2648 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.pdb"
2649 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.pdb"
2650 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.pdb"
2651 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.pdb"
2657 SetOutPath "$INSTDIR\Documentation"
2658 File "..\..\doc\install\Documentation\de_DE\README.TXT"
2660 SetOutPath "$INSTDIR\Client\Program"
2661 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1032.dll" "$INSTDIR\Client\Program\afscreds_1032.dll" "$INSTDIR"
2662 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1032.dll" "$INSTDIR\Client\Program\afs_shl_ext_1032.dll" "$INSTDIR"
2664 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1032.pdb"
2665 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1032.pdb"
2668 SetOutPath "$INSTDIR\Common"
2669 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1032.dll" "$INSTDIR\Common\afs_config_1032.dll" "$INSTDIR"
2670 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.dll" "$INSTDIR\Common\afs_cpa_1032.dll" "$INSTDIR"
2671 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1032.dll" "$INSTDIR\Common\afseventmsg_1032.dll" "$INSTDIR"
2672 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1032.dll" "$INSTDIR\Common\afs_setup_utils_1032.dll" "$INSTDIR"
2673 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_1032.dll" "$INSTDIR\Common\afsserver_1032.dll" "$INSTDIR"
2674 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1032.dll" "$INSTDIR\Common\afssvrcfg_1032.dll" "$INSTDIR"
2675 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1032.dll" "$INSTDIR\Common\TaAfsAccountManager_1032.dll" "$INSTDIR"
2676 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1032.dll" "$INSTDIR\Common\TaAfsAppLib_1032.dll" "$INSTDIR"
2677 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1032.dll" "$INSTDIR\Common\TaAfsServerManager_1032.dll" "$INSTDIR"
2678 File "..\..\doc\help\de_DE\afs-cc.CNT"
2679 File "..\..\doc\help\de_DE\afs-cc.hlp"
2680 File "..\..\doc\help\de_DE\afs-light.CNT"
2681 File "..\..\doc\help\de_DE\afs-light.hlp"
2682 File "..\..\doc\help\de_DE\afs-nt.CNT"
2683 File "..\..\doc\help\de_DE\afs-nt.HLP"
2684 File "..\..\doc\help\de_DE\taafscfg.CNT"
2685 File "..\..\doc\help\de_DE\taafscfg.hlp"
2686 File "..\..\doc\help\de_DE\taafssvrmgr.CNT"
2687 File "..\..\doc\help\de_DE\taafssvrmgr.hlp"
2688 File "..\..\doc\help\de_DE\taafsusrmgr.CNT"
2689 File "..\..\doc\help\de_DE\taafsusrmgr.hlp"
2692 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1032.pdb"
2693 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.pdb"
2694 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1032.pdb"
2695 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1032.pdb"
2696 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1032.pdb"
2697 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1032.pdb"
2698 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1032.pdb"
2699 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1032.pdb"
2705 SetOutPath "$INSTDIR\Documentation"
2706 File "..\..\doc\install\Documentation\es_ES\README.TXT"
2708 SetOutPath "$INSTDIR\Client\Program"
2709 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1034.dll" "$INSTDIR\Client\Program\afscreds_1034.dll" "$INSTDIR"
2710 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.dll" "$INSTDIR\Client\Program\afs_shl_ext_1034.dll" "$INSTDIR"
2712 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1034.pdb"
2713 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.pdb"
2716 SetOutPath "$INSTDIR\Common"
2717 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1034.dll" "$INSTDIR\Common\afs_config_1034.dll" "$INSTDIR"
2718 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.dll" "$INSTDIR\Common\afs_cpa_1034.dll" "$INSTDIR"
2719 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1034.dll" "$INSTDIR\Common\afseventmsg_1034.dll" "$INSTDIR"
2720 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1034.dll" "$INSTDIR\Common\afs_setup_utils_1034.dll" "$INSTDIR"
2721 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_1034.dll" "$INSTDIR\Common\afsserver_1034.dll" "$INSTDIR"
2722 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1034.dll" "$INSTDIR\Common\afssvrcfg_1034.dll" "$INSTDIR"
2723 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1034.dll" "$INSTDIR\Common\TaAfsAccountManager_1034.dll" "$INSTDIR"
2724 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1034.dll" "$INSTDIR\Common\TaAfsAppLib_1034.dll" "$INSTDIR"
2725 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1034.dll" "$INSTDIR\Common\TaAfsServerManager_1034.dll" "$INSTDIR"
2726 File "..\..\doc\help\es_ES\afs-cc.CNT"
2727 File "..\..\doc\help\es_ES\afs-cc.hlp"
2728 File "..\..\doc\help\es_ES\afs-light.CNT"
2729 File "..\..\doc\help\es_ES\afs-light.hlp"
2730 File "..\..\doc\help\es_ES\afs-nt.CNT"
2731 File "..\..\doc\help\es_ES\afs-nt.HLP"
2732 File "..\..\doc\help\es_ES\taafscfg.CNT"
2733 File "..\..\doc\help\es_ES\taafscfg.hlp"
2734 File "..\..\doc\help\es_ES\taafssvrmgr.CNT"
2735 File "..\..\doc\help\es_ES\taafssvrmgr.hlp"
2736 File "..\..\doc\help\es_ES\taafsusrmgr.CNT"
2737 File "..\..\doc\help\es_ES\taafsusrmgr.hlp"
2740 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1034.pdb"
2741 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.pdb"
2742 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1034.pdb"
2743 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1034.pdb"
2744 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1034.pdb"
2745 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1034.pdb"
2746 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1034.pdb"
2747 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1034.pdb"
2753 SetOutPath "$INSTDIR\Documentation"
2754 File "..\..\doc\install\Documentation\ja_JP\README.TXT"
2756 SetOutPath "$INSTDIR\Client\Program"
2757 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1041.dll" "$INSTDIR\Client\Program\afscreds_1041.dll" "$INSTDIR"
2758 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.dll" "$INSTDIR\Client\Program\afs_shl_ext_1041.dll" "$INSTDIR"
2760 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1041.pdb"
2761 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.pdb"
2764 SetOutPath "$INSTDIR\Common"
2765 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1041.dll" "$INSTDIR\Common\afs_config_1041.dll" "$INSTDIR"
2766 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.dll" "$INSTDIR\Common\afs_cpa_1041.dll" "$INSTDIR"
2767 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1041.dll" "$INSTDIR\Common\afseventmsg_1041.dll" "$INSTDIR"
2768 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1041.dll" "$INSTDIR\Common\afs_setup_utils_1041.dll" "$INSTDIR"
2769 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_1041.dll" "$INSTDIR\Common\afsserver_1041.dll" "$INSTDIR"
2770 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1041.dll" "$INSTDIR\Common\afssvrcfg_1041.dll" "$INSTDIR"
2771 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1041.dll" "$INSTDIR\Common\TaAfsAccountManager_1041.dll" "$INSTDIR"
2772 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1041.dll" "$INSTDIR\Common\TaAfsAppLib_1041.dll" "$INSTDIR"
2773 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1041.dll" "$INSTDIR\Common\TaAfsServerManager_1041.dll" "$INSTDIR"
2774 File "..\..\doc\help\ja_JP\afs-cc.CNT"
2775 File "..\..\doc\help\ja_JP\afs-cc.hlp"
2776 File "..\..\doc\help\ja_JP\afs-light.CNT"
2777 File "..\..\doc\help\ja_JP\afs-light.hlp"
2778 File "..\..\doc\help\ja_JP\afs-nt.CNT"
2779 File "..\..\doc\help\ja_JP\afs-nt.HLP"
2780 File "..\..\doc\help\ja_JP\taafscfg.CNT"
2781 File "..\..\doc\help\ja_JP\taafscfg.hlp"
2782 File "..\..\doc\help\ja_JP\taafssvrmgr.CNT"
2783 File "..\..\doc\help\ja_JP\taafssvrmgr.hlp"
2784 File "..\..\doc\help\ja_JP\taafsusrmgr.CNT"
2785 File "..\..\doc\help\ja_JP\taafsusrmgr.hlp"
2788 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1041.pdb"
2789 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.pdb"
2790 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1041.pdb"
2791 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1041.pdb"
2792 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1041.pdb"
2793 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1041.pdb"
2794 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1041.pdb"
2795 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1041.pdb"
2801 SetOutPath "$INSTDIR\Documentation"
2802 File "..\..\doc\install\Documentation\ko_KR\README.TXT"
2804 SetOutPath "$INSTDIR\Client\Program"
2805 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1042.dll" "$INSTDIR\Client\Program\afscreds_1042.dll" "$INSTDIR"
2806 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.dll" "$INSTDIR\Client\Program\afs_shl_ext_1042.dll" "$INSTDIR"
2808 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1042.pdb"
2809 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.pdb"
2812 SetOutPath "$INSTDIR\Common"
2813 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1042.dll" "$INSTDIR\Common\afs_config_1042.dll" "$INSTDIR"
2814 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.dll" "$INSTDIR\Common\afs_cpa_1042.dll" "$INSTDIR"
2815 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1042.dll" "$INSTDIR\Common\afseventmsg_1042.dll" "$INSTDIR"
2816 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1042.dll" "$INSTDIR\Common\afs_setup_utils_1042.dll" "$INSTDIR"
2817 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_1042.dll" "$INSTDIR\Common\afsserver_1042.dll" "$INSTDIR"
2818 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1042.dll" "$INSTDIR\Common\afssvrcfg_1042.dll" "$INSTDIR"
2819 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1042.dll" "$INSTDIR\Common\TaAfsAccountManager_1042.dll" "$INSTDIR"
2820 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1042.dll" "$INSTDIR\Common\TaAfsAppLib_1042.dll" "$INSTDIR"
2821 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1042.dll" "$INSTDIR\Common\TaAfsServerManager_1042.dll" "$INSTDIR"
2822 File "..\..\doc\help\ko_KR\afs-cc.CNT"
2823 File "..\..\doc\help\ko_KR\afs-cc.hlp"
2824 File "..\..\doc\help\ko_KR\afs-light.CNT"
2825 File "..\..\doc\help\ko_KR\afs-light.hlp"
2826 File "..\..\doc\help\ko_KR\afs-nt.CNT"
2827 File "..\..\doc\help\ko_KR\afs-nt.HLP"
2828 File "..\..\doc\help\ko_KR\taafscfg.CNT"
2829 File "..\..\doc\help\ko_KR\taafscfg.hlp"
2830 File "..\..\doc\help\ko_KR\taafssvrmgr.CNT"
2831 File "..\..\doc\help\ko_KR\taafssvrmgr.hlp"
2832 File "..\..\doc\help\ko_KR\taafsusrmgr.CNT"
2833 File "..\..\doc\help\ko_KR\taafsusrmgr.hlp"
2836 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1042.pdb"
2837 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.pdb"
2838 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1042.pdb"
2839 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1042.pdb"
2840 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1042.pdb"
2841 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1042.pdb"
2842 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1042.pdb"
2843 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1042.pdb"
2850 SetOutPath "$INSTDIR\Documentation"
2851 File "..\..\doc\install\Documentation\pt_BR\README.TXT"
2853 SetOutPath "$INSTDIR\Client\Program"
2854 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1046.dll" "$INSTDIR\Client\Program\afscreds_1046.dll" "$INSTDIR"
2855 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.dll" "$INSTDIR\Client\Program\afs_shl_ext_1046.dll" "$INSTDIR"
2857 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1046.pdb"
2858 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.pdb"
2861 SetOutPath "$INSTDIR\Common"
2862 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1046.dll" "$INSTDIR\Common\afs_config_1046.dll" "$INSTDIR"
2863 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.dll" "$INSTDIR\Common\afs_cpa_1046.dll" "$INSTDIR"
2864 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1046.dll" "$INSTDIR\Common\afseventmsg_1046.dll" "$INSTDIR"
2865 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1046.dll" "$INSTDIR\Common\afs_setup_utils_1046.dll" "$INSTDIR"
2866 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_1046.dll" "$INSTDIR\Common\afsserver_1046.dll" "$INSTDIR"
2867 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1046.dll" "$INSTDIR\Common\afssvrcfg_1046.dll" "$INSTDIR"
2868 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1046.dll" "$INSTDIR\Common\TaAfsAccountManager_1046.dll" "$INSTDIR"
2869 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1046.dll" "$INSTDIR\Common\TaAfsAppLib_1046.dll" "$INSTDIR"
2870 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1046.dll" "$INSTDIR\Common\TaAfsServerManager_1046.dll" "$INSTDIR"
2871 File "..\..\doc\help\pt_BR\afs-cc.CNT"
2872 File "..\..\doc\help\pt_BR\afs-cc.hlp"
2873 File "..\..\doc\help\pt_BR\afs-light.CNT"
2874 File "..\..\doc\help\pt_BR\afs-light.hlp"
2875 File "..\..\doc\help\pt_BR\afs-nt.CNT"
2876 File "..\..\doc\help\pt_BR\afs-nt.HLP"
2877 File "..\..\doc\help\pt_BR\taafscfg.CNT"
2878 File "..\..\doc\help\pt_BR\taafscfg.hlp"
2879 File "..\..\doc\help\pt_BR\taafssvrmgr.CNT"
2880 File "..\..\doc\help\pt_BR\taafssvrmgr.hlp"
2881 File "..\..\doc\help\pt_BR\taafsusrmgr.CNT"
2882 File "..\..\doc\help\pt_BR\taafsusrmgr.hlp"
2885 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1046.pdb"
2886 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.pdb"
2887 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1046.pdb"
2888 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1046.pdb"
2889 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1046.pdb"
2890 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1046.pdb"
2891 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1046.pdb"
2892 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1046.pdb"
2898 SetOutPath "$INSTDIR\Documentation"
2899 File "..\..\doc\install\Documentation\zh_CN\README.TXT"
2901 SetOutPath "$INSTDIR\Client\Program"
2902 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_2052.dll" "$INSTDIR\Client\Program\afscreds_2052.dll" "$INSTDIR"
2903 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.dll" "$INSTDIR\Client\Program\afs_shl_ext_2052.dll" "$INSTDIR"
2905 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_2052.pdb"
2906 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.pdb"
2909 SetOutPath "$INSTDIR\Common"
2910 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_2052.dll" "$INSTDIR\Common\afs_config_2052.dll" "$INSTDIR"
2911 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.dll" "$INSTDIR\Common\afs_cpa_2052.dll" "$INSTDIR"
2912 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_2052.dll" "$INSTDIR\Common\afseventmsg_2052.dll" "$INSTDIR"
2913 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_2052.dll" "$INSTDIR\Common\afs_setup_utils_2052.dll" "$INSTDIR"
2914 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_2052.dll" "$INSTDIR\Common\afsserver_2052.dll" "$INSTDIR"
2915 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_2052.dll" "$INSTDIR\Common\afssvrcfg_2052.dll" "$INSTDIR"
2916 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_2052.dll" "$INSTDIR\Common\TaAfsAccountManager_2052.dll" "$INSTDIR"
2917 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_2052.dll" "$INSTDIR\Common\TaAfsAppLib_2052.dll" "$INSTDIR"
2918 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_2052.dll" "$INSTDIR\Common\TaAfsServerManager_2052.dll" "$INSTDIR"
2919 File "..\..\doc\help\zh_CN\afs-cc.CNT"
2920 File "..\..\doc\help\zh_CN\afs-cc.hlp"
2921 File "..\..\doc\help\zh_CN\afs-light.CNT"
2922 File "..\..\doc\help\zh_CN\afs-light.hlp"
2923 File "..\..\doc\help\zh_CN\afs-nt.CNT"
2924 File "..\..\doc\help\zh_CN\afs-nt.HLP"
2925 File "..\..\doc\help\zh_CN\taafscfg.CNT"
2926 File "..\..\doc\help\zh_CN\taafscfg.hlp"
2927 File "..\..\doc\help\zh_CN\taafssvrmgr.CNT"
2928 File "..\..\doc\help\zh_CN\taafssvrmgr.hlp"
2929 File "..\..\doc\help\zh_CN\taafsusrmgr.CNT"
2930 File "..\..\doc\help\zh_CN\taafsusrmgr.hlp"
2933 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_2052.pdb"
2934 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.pdb"
2935 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_2052.pdb"
2936 ;File "${AFS_SERVER_BUILDDIR}\afsserver_2052.pdb"
2937 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_2052.pdb"
2938 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_2052.pdb"
2939 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_2052.pdb"
2940 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_2052.pdb"
2946 SetOutPath "$INSTDIR\Documentation"
2947 File "..\..\doc\install\Documentation\zh_TW\README.TXT"
2949 SetOutPath "$INSTDIR\Client\Program"
2950 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1028.dll" "$INSTDIR\Client\Program\_1028.dll" "$INSTDIR"
2951 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.dll" "$INSTDIR\Client\Program\afs_shl_ext_1028.dll" "$INSTDIR"
2953 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1028.pdb"
2954 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.pdb"
2957 SetOutPath "$INSTDIR\Common"
2958 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1028.dll" "$INSTDIR\Common\afs_config_1028.dll" "$INSTDIR"
2959 !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.dll" "$INSTDIR\Common\afs_cpa_1028.dll" "$INSTDIR"
2960 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1028.dll" "$INSTDIR\Common\afseventmsg_1028.dll" "$INSTDIR"
2961 ;!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1028.dll" "$INSTDIR\Common\afs_setup_utils_1028.dll" "$INSTDIR"
2962 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsserver_1028.dll" "$INSTDIR\Common\afsserver_1028.dll" "$INSTDIR"
2963 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1028.dll" "$INSTDIR\Common\afssvrcfg_1028.dll" "$INSTDIR"
2964 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1028.dll" "$INSTDIR\Common\TaAfsAccountManager_1028.dll" "$INSTDIR"
2965 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1028.dll" "$INSTDIR\Common\TaAfsAppLib_1028.dll" "$INSTDIR"
2966 !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1028.dll" "$INSTDIR\Common\TaAfsServerManager_1028.dll" "$INSTDIR"
2967 File "..\..\doc\help\zh_TW\afs-cc.CNT"
2968 File "..\..\doc\help\zh_TW\afs-cc.hlp"
2969 File "..\..\doc\help\zh_TW\afs-light.CNT"
2970 File "..\..\doc\help\zh_TW\afs-light.hlp"
2971 File "..\..\doc\help\zh_TW\afs-nt.CNT"
2972 File "..\..\doc\help\zh_TW\afs-nt.HLP"
2973 File "..\..\doc\help\zh_TW\taafscfg.CNT"
2974 File "..\..\doc\help\zh_TW\taafscfg.hlp"
2975 File "..\..\doc\help\zh_TW\taafssvrmgr.CNT"
2976 File "..\..\doc\help\zh_TW\taafssvrmgr.hlp"
2977 File "..\..\doc\help\zh_TW\taafsusrmgr.CNT"
2978 File "..\..\doc\help\zh_TW\taafsusrmgr.hlp"
2981 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1028.pdb"
2982 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.pdb"
2983 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1028.pdb"
2984 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1028.pdb"
2985 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1028.pdb"
2986 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1028.pdb"
2987 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1028.pdb"
2988 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1028.pdb"
2997 ;====================================================
2998 ; AddToPath - Adds the given dir to the search path.
2999 ; Input - head of the stack
3000 ; Note - Win9x systems requires reboot
3001 ;====================================================
3008 # don't add if the path doesn't exist
3009 IfFileExists $0 "" AddToPath_done
3016 StrCmp $2 "" "" AddToPath_done
3021 StrCmp $2 "" "" AddToPath_done
3022 GetFullPathName /SHORT $3 $0
3027 StrCmp $2 "" "" AddToPath_done
3032 StrCmp $2 "" "" AddToPath_done
3036 StrCmp $1 1 AddToPath_NT
3039 FileOpen $1 "$1\autoexec.bat" a
3042 IntCmp $2 26 0 +2 +2 # DOS EOF
3043 FileSeek $1 -1 END # write over EOF
3044 FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
3050 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
3051 StrCpy $2 $1 1 -1 # copy last char
3052 StrCmp $2 ";" 0 +2 # if last char == ;
3053 StrCpy $1 $1 -1 # remove last char
3054 StrCmp $1 "" AddToPath_NTdoIt
3057 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $0
3058 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
3067 ;====================================================
3068 ; RemoveFromPath - Remove a given dir from the path
3069 ; Input: head of the stack
3070 ;====================================================
3071 Function un.RemoveFromPath
3080 IntFmt $6 "%c" 26 # DOS EOF
3084 StrCmp $1 1 unRemoveFromPath_NT
3087 FileOpen $1 "$1\autoexec.bat" r
3090 GetFullPathName /SHORT $0 $0
3091 StrCpy $0 "SET PATH=%PATH%;$0"
3092 Goto unRemoveFromPath_dosLoop
3094 unRemoveFromPath_dosLoop:
3096 StrCpy $5 $3 1 -1 # read last char
3097 StrCmp $5 $6 0 +2 # if DOS EOF
3098 StrCpy $3 $3 -1 # remove DOS EOF so we can compare
3099 StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine
3100 StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine
3101 StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine
3102 StrCmp $3 "" unRemoveFromPath_dosLoopEnd
3104 Goto unRemoveFromPath_dosLoop
3105 unRemoveFromPath_dosLoopRemoveLine:
3107 Goto unRemoveFromPath_dosLoop
3109 unRemoveFromPath_dosLoopEnd:
3113 Delete "$1\autoexec.bat"
3114 CopyFiles /SILENT $4 "$1\autoexec.bat"
3116 Goto unRemoveFromPath_done
3118 unRemoveFromPath_NT:
3119 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
3120 StrCpy $5 $1 1 -1 # copy last char
3121 StrCmp $5 ";" +2 # if last char != ;
3122 StrCpy $1 "$1;" # append ;
3125 Call un.StrStr ; Find `$0;` in $1
3126 Pop $2 ; pos of our dir
3127 StrCmp $2 "" unRemoveFromPath_done
3128 ; else, it is in path
3133 StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
3134 StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
3137 StrCpy $5 $3 1 -1 # copy last char
3138 StrCmp $5 ";" 0 +2 # if last char == ;
3139 StrCpy $3 $3 -1 # remove last char
3141 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $3
3142 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
3144 unRemoveFromPath_done:
3154 ;====================================================
3155 ; IsNT - Returns 1 if the current system is NT, 0
3157 ; Output: head of the stack
3158 ;====================================================
3162 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
3163 StrCmp $0 "" 0 IsNT_yes
3175 !insertmacro IsNT ""
3176 !insertmacro IsNT "un."
3178 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3180 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3181 ;====================================================
3182 ; StrStr - Finds a given string in another given string.
3183 ; Returns -1 if not found and the pos if found.
3184 ; Input: head of the stack - string to find
3185 ; second in the stack - string to find in
3186 ; Output: head of the stack
3187 ;====================================================
3189 Function ${un}StrStr
3190 Exch $R1 ; st=haystack,old$R1, $R1=needle
3191 Exch ; st=old$R1,haystack
3192 Exch $R2 ; st=old$R1,old$R2, $R2=haystack
3204 StrCpy $R5 $R2 $R3 $R4
3210 StrCpy $R1 $R2 "" $R4
3218 !insertmacro StrStr ""
3219 !insertmacro StrStr "un."
3222 !ifdef ADDSHAREDDLLUSED
3225 ; Increments a shared DLLs reference count.
3226 ; Use by passing one item on the stack (the full path of the DLL).
3229 ; Push $SYSDIR\myDll.dll
3233 Function AddSharedDLL
3236 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
3238 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
3244 ; un.RemoveSharedDLL
3246 ; Decrements a shared DLLs reference count, and removes if necessary.
3247 ; Use by passing one item on the stack (the full path of the DLL).
3248 ; Note: for use in the main installer (not the uninstaller), rename the
3249 ; function to RemoveSharedDLL.
3252 ; Push $SYSDIR\myDll.dll
3253 ; Call un.RemoveSharedDLL
3256 Function un.RemoveSharedDLL
3259 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
3260 StrCmp $R0 "" remove
3262 IntCmp $R0 0 rk rk uk
3264 DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
3267 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
3270 Delete /REBOOTOK $R1
3279 !ifdef INSTALL_LOOPBACK
3280 Function afs.InstallMSLoopback
3282 File /oname=$R0 "loopback_install.dll"
3283 nsExec::Exec "rundll32.exe $R0 doLoopBackEntry quiet"
3284 Call GetWindowsVersion
3286 StrCmp $R1 "2000" +1 +2
3287 nsExec::Exec "rundll32.exe $R0 disableLoopBackEntry"
3295 ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
3296 ; Updated by Joost Verburg
3298 ; Returns on top of stack
3300 ; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003)
3302 ; '' (Unknown Windows Version)
3305 ; Call GetWindowsVersion
3307 ; ; at this point $R0 is "NT 4.0" or whatnot
3309 Function GetWindowsVersion
3316 ReadRegStr $R0 HKLM \
3317 "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
3319 IfErrors 0 lbl_winnt
3322 ReadRegStr $R0 HKLM \
3323 "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
3326 StrCmp $R1 '4' 0 lbl_error
3330 StrCmp $R1 '4.0' lbl_win32_95
3331 StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
3349 StrCmp $R1 '3' lbl_winnt_x
3350 StrCmp $R1 '4' lbl_winnt_x
3354 StrCmp $R1 '5.0' lbl_winnt_2000
3355 StrCmp $R1 '5.1' lbl_winnt_XP
3356 StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
3359 StrCpy $R0 "NT $R0" 6
3384 ; Author: Lilla (lilla@earthlink.net) 2003-06-13
3385 ; function IsUserAdmin uses plugin \NSIS\PlusgIns\UserInfo.dll
3386 ; This function is based upon code in \NSIS\Contrib\UserInfo\UserInfo.nsi
3387 ; This function was tested under NSIS 2 beta 4 (latest CVS as of this writing).
3391 ; Pop $R0 ; at this point $R0 is "true" or "false"
3393 Function IsUserAdmin
3402 UserInfo::GetAccountType
3405 StrCmp $R2 "Admin" 0 Continue
3406 ; Observation: I get here when running Win98SE. (Lilla)
3407 ; The functions UserInfo.dll looks for are there on Win98 too,
3408 ; but just don't work. So UserInfo.dll, knowing that admin isn't required
3409 ; on Win98, returns admin anyway. (per kichik)
3410 ; MessageBox MB_OK 'User "$R1" is in the Administrators group'
3415 ; You should still check for an empty string because the functions
3416 ; UserInfo.dll looks for may not be present on Windows 95. (per kichik)
3419 ;MessageBox MB_OK 'User "$R1" is in the "$R2" group'
3423 ; comment/message below is by UserInfo.nsi author:
3424 ; This one means you don't need to care about admin or
3425 ; not admin because Windows 9x doesn't either
3426 ;MessageBox MB_OK "Error! This DLL can't run under Windows 9x!"
3430 ;MessageBox MB_OK 'User= "$R1" AccountType= "$R2" IsUserAdmin= "$R0"'
3438 ; input, top of stack (e.g. C:\Program Files\Poop)
3439 ; output, top of stack (replaces, with e.g. C:\Program Files)
3440 ; modifies no other variables.
3443 ; Push "C:\Program Files\Directory\Whatever"
3446 ; ; at this point $R0 will equal "C:\Program Files\Directory"
3460 IntCmp $R1 $R2 get 0 get
3461 StrCpy $R3 $R0 1 -$R1
3476 ;--------------------------------
3477 ;Handle what must and what must not be installed
3478 Function .onSelChange
3479 ; If they install the server, they MUST install the client
3480 SectionGetFlags ${secServer} $R0
3481 IntOp $R0 $R0 & ${SF_SELECTED}
3482 StrCmp $R0 "1" MakeClientSelected
3484 ; If they install the control center, we'll give them the client.
3485 ; It may not be required, but it's a bit more useful
3486 SectionGetFlags ${secControl} $R0
3487 IntOp $R0 $R0 & ${SF_SELECTED}
3488 StrCmp $R0 "1" MakeClientSelected
3492 SectionGetFlags ${secClient} $R0
3493 IntOp $R0 $R0 | ${SF_SELECTED}
3494 SectionSetFlags ${secClient} $R0
3499 Function RegWriteMultiStr
3500 !define HKEY_CLASSES_ROOT 0x80000000
3501 !define HKEY_CURRENT_USER 0x80000001
3502 !define HKEY_LOCAL_MACHINE 0x80000002
3503 !define HKEY_USERS 0x80000003
3504 !define HKEY_PERFORMANCE_DATA 0x80000004
3505 !define HKEY_PERFORMANCE_TEXT 0x80000050
3506 !define HKEY_PERFORMANCE_NLSTEXT 0x80000060
3507 !define HKEY_CURRENT_CONFIG 0x80000005
3508 !define HKEY_DYN_DATA 0x80000006
3510 !define KEY_QUERY_VALUE 0x0001
3511 !define KEY_SET_VALUE 0x0002
3512 !define KEY_CREATE_SUB_KEY 0x0004
3513 !define KEY_ENUMERATE_SUB_KEYS 0x0008
3514 !define KEY_NOTIFY 0x0010
3515 !define KEY_CREATE_LINK 0x0020
3519 !define REG_EXPAND_SZ 2
3520 !define REG_BINARY 3
3522 !define REG_DWORD_LITTLE_ENDIAN 4
3523 !define REG_DWORD_BIG_ENDIAN 5
3525 !define REG_MULTI_SZ 7
3527 !define RegCreateKey "Advapi32::RegCreateKeyA(i, t, *i) i"
3528 !define RegSetValueEx "Advapi32::RegSetValueExA(i, t, i, i, i, i) i"
3529 !define RegCloseKey "Advapi32::RegCloseKeyA(i) i"
3536 SetPluginUnload alwaysoff
3537 ; Create a buffer for the multi_sz value
3538 System::Call "*(&t${NSIS_MAX_STRLEN}) i.r1"
3539 ; Open/create the registry key
3540 System::Call "${RegCreateKey}(${HKEY_LOCAL_MACHINE}, '$REG_SUB_KEY', .r0) .r9"
3543 MessageBox MB_OK|MB_ICONSTOP "Can't create registry key! ($9)"
3547 ; Fill in the buffer with our strings
3548 StrCpy $2 $1 ; Initial position
3550 StrLen $9 '$REG_DATA_1' ; Length of first string
3551 IntOp $9 $9 + 1 ; Plus null
3552 System::Call "*$2(&t$9 '$REG_DATA_1')" ; Place the string
3553 IntOp $2 $2 + $9 ; Advance to the next position
3555 StrCmp '$REG_DATA_2' "" terminate
3556 StrLen $9 '$REG_DATA_2' ; Length of second string
3557 IntOp $9 $9 + 1 ; Plus null
3558 System::Call "*$2(&t$9 '$REG_DATA_2')" ; Place the string
3559 IntOp $2 $2 + $9 ; Advance to the next position
3561 StrCmp '$REG_DATA_3' "" terminate
3562 StrLen $9 '$REG_DATA_3' ; Length of third string
3563 IntOp $9 $9 + 1 ; Plus null
3564 System::Call "*$2(&t$9 '$REG_DATA_3')" ; Place the string
3565 IntOp $2 $2 + $9 ; Advance to the next position
3568 System::Call "*$2(&t1 '')" ; Place the terminating null
3569 IntOp $2 $2 + 1 ; Advance to the next position
3571 ; Create/write the value
3572 IntOp $2 $2 - $1 ; Total length
3573 System::Call "${RegSetValueEx}(r0, '$REG_VALUE', 0, ${REG_MULTI_SZ}, r1, r2) .r9"
3576 MessageBox MB_OK|MB_ICONSTOP "Can't set key value! ($9)"
3580 ; Close the registry key
3581 System::Call "${RegCloseKey}(r0)"
3585 SetPluginUnload manual