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 ;--------------------------------
49 OutFile "${AFS_DESTDIR}\WinInstall\OpenAFSforWindows.exe"
51 OutFile "${AFS_DESTDIR}\WinInstall\OpenAFSforWindows-DEBUG.exe"
55 !define MUI_ICON "..\..\client_config\afs_config.ico"
56 !define MUI_UNICON "..\..\client_config\afs_config.ico"
57 !define AFS_COMPANY_NAME "OpenAFS"
58 !define AFS_PRODUCT_NAME "OpenAFS"
59 !define AFS_REGKEY_ROOT "Software\TransarcCorporation"
62 ;Folder selection page
63 InstallDir "$PROGRAMFILES\OpenAFS" ; Install to shorter path
65 ;Remember install folder
66 InstallDirRegKey HKCU ${AFS_REGKEY_ROOT} ""
68 ;Remember the installer language
69 !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
70 !define MUI_LANGDLL_REGISTRY_KEY ${AFS_REGKEY_ROOT}
71 !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
74 !define AFS_CLIENT_BUILDDIR "${AFS_DESTDIR}\root.client\usr\vice\etc"
75 !define AFS_WININSTALL_DIR "${AFS_DESTDIR}\WinInstall\Config"
76 !define AFS_BUILD_INCDIR "${AFS_DESTDIR}\include"
77 !define AFS_CLIENT_LIBDIR "${AFS_DESTDIR}\lib"
78 !define AFS_SERVER_BUILDDIR "${AFS_DESTDIR}\root.server\usr\afs\bin"
79 !define AFS_ETC_BUILDDIR "${AFS_DESTDIR}\etc"
80 !define SYSTEMDIR "$%SystemRoot%\System32"
82 ;--------------------------------
83 ;Modern UI Configuration
85 ;!define MUI_LICENSEPAGE
86 !define MUI_CUSTOMPAGECOMMANDS
87 !define MUI_WELCOMEPAGE
88 !define MUI_COMPONENTSPAGE
89 !define MUI_COMPONENTSPAGE_SMALLDESC
90 !define MUI_DIRECTORYPAGE
92 !define MUI_ABORTWARNING
93 !define MUI_FINISHPAGE
95 !define MUI_UNINSTALLER
96 !define MUI_UNCONFIRMPAGE
99 !insertmacro MUI_PAGE_WELCOME
100 !insertmacro MUI_PAGE_COMPONENTS
101 !insertmacro MUI_PAGE_DIRECTORY
102 Page custom AFSPageGetCellServDB
103 Page custom AFSPageGetCellName
104 !insertmacro MUI_PAGE_INSTFILES
105 !insertmacro MUI_PAGE_FINISH
107 ;LicenseData "Licenses.rtf"
108 ;--------------------------------
111 !insertmacro MUI_LANGUAGE "English"
112 ;!insertmacro MUI_LANGUAGE "French"
113 !insertmacro MUI_LANGUAGE "German"
114 !insertmacro MUI_LANGUAGE "Spanish"
115 !insertmacro MUI_LANGUAGE "SimpChinese"
116 !insertmacro MUI_LANGUAGE "TradChinese"
117 !insertmacro MUI_LANGUAGE "Japanese"
118 !insertmacro MUI_LANGUAGE "Korean"
119 ;!insertmacro MUI_LANGUAGE "Italian"
120 ;!insertmacro MUI_LANGUAGE "Dutch"
121 ;!insertmacro MUI_LANGUAGE "Danish"
122 ;!insertmacro MUI_LANGUAGE "Greek"
123 ;!insertmacro MUI_LANGUAGE "Russian"
124 !insertmacro MUI_LANGUAGE "PortugueseBR"
125 ;!insertmacro MUI_LANGUAGE "Polish"
126 ;!insertmacro MUI_LANGUAGE "Ukrainian"
127 ;!insertmacro MUI_LANGUAGE "Czech"
128 ;!insertmacro MUI_LANGUAGE "Slovak"
129 ;!insertmacro MUI_LANGUAGE "Croatian"
130 ;!insertmacro MUI_LANGUAGE "Bulgarian"
131 ;!insertmacro MUI_LANGUAGE "Hungarian"
132 ;!insertmacro MUI_LANGUAGE "Thai"
133 ;!insertmacro MUI_LANGUAGE "Romanian"
134 ;!insertmacro MUI_LANGUAGE "Macedonian"
135 ;!insertmacro MUI_LANGUAGE "Turkish"
137 ;--------------------------------
141 LangString DESC_SecCopyUI ${LANG_ENGLISH} "OpenAFS for Windows: English"
142 ;LangString DESC_SecCopyUI ${LANG_FRENCH} "OpenAFS for Windows: French"
143 LangString DESC_SecCopyUI ${LANG_GERMAN} "OpenAFS for Windows: German"
144 LangString DESC_SecCopyUI ${LANG_SPANISH} "OpenAFS for Windows: Spanish"
145 LangString DESC_SecCopyUI ${LANG_SIMPCHINESE} "OpenAFS for Windows: Simplified Chinese"
146 LangString DESC_SecCopyUI ${LANG_TRADCHINESE} "OpenAFS for Windows: Traditional Chinese description"
147 LangString DESC_SecCopyUI ${LANG_JAPANESE} "OpenAFS for Windows: Japanese description"
148 LangString DESC_SecCopyUI ${LANG_KOREAN} "OpenAFS for Windows: Korean description"
149 ;LangString DESC_SecCopyUI ${LANG_ITALIAN} "OpenAFS for Windows: Italian description"
150 ;LangString DESC_SecCopyUI ${LANG_DUTCH} "OpenAFS for Windows: Dutch description"
151 ;LangString DESC_SecCopyUI ${LANG_DANISH} "OpenAFS for Windows: Danish description"
152 ;LangString DESC_SecCopyUI ${LANG_GREEK} "OpenAFS for Windows: Greek description"
153 ;LangString DESC_SecCopyUI ${LANG_RUSSIAN} "OpenAFS for Windows: Russian description"
154 LangString DESC_SecCopyUI ${LANG_PORTUGUESEBR} "OpenAFS for Windows: Portuguese (Brasil) description"
155 ;LangString DESC_SecCopyUI ${LANG_POLISH} "OpenAFS for Windows: Polish description"
156 ;LangString DESC_SecCopyUI ${LANG_UKRAINIAN} "OpenAFS for Windows: Ukrainian description"
157 ;LangString DESC_SecCopyUI ${LANG_CZECH} "OpenAFS for Windows: Czechian description"
158 ;LangString DESC_SecCopyUI ${LANG_SLOVAK} "OpenAFS for Windows: Slovakian description"
159 ;LangString DESC_SecCopyUI ${LANG_CROATIAN} "OpenAFS for Windows: Slovakian description"
160 ;LangString DESC_SecCopyUI ${LANG_BULGARIAN} "OpenAFS for Windows: Bulgarian description"
161 ;LangString DESC_SecCopyUI ${LANG_HUNGARIAN} "OpenAFS for Windows: Hungarian description"
162 ;LangString DESC_SecCopyUI ${LANG_THAI} "OpenAFS for Windows: Thai description"
163 ;LangString DESC_SecCopyUI ${LANG_ROMANIAN} "OpenAFS for Windows: Romanian description"
164 ;LangString DESC_SecCopyUI ${LANG_MACEDONIAN} "OpenAFS for Windows: Macedonian description"
165 ;LangString DESC_SecCopyUI ${LANG_TURKISH} "OpenAFS for Windows: Turkish description"
167 LangString DESC_secClient ${LANG_ENGLISH} "OpenAFS Client: Allows you to access AFS from your Windows PC."
168 LangString DESC_secClient ${LANG_GERMAN} "OpenAFS Client: Allows you to access AFS from your Windows PC."
169 LangString DESC_secClient ${LANG_SPANISH} "OpenAFS Client: Allows you to access AFS from your Windows PC."
170 LangString DESC_secClient ${LANG_SIMPCHINESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
171 LangString DESC_secClient ${LANG_TRADCHINESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
172 LangString DESC_secClient ${LANG_JAPANESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
173 LangString DESC_secClient ${LANG_KOREAN} "OpenAFS Client: Allows you to access AFS from your Windows PC."
174 LangString DESC_secClient ${LANG_PORTUGUESEBR} "OpenAFS Client: Allows you to access AFS from your Windows PC."
176 LangString DESC_secServer ${LANG_ENGLISH} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
177 LangString DESC_secServer ${LANG_GERMAN} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
178 LangString DESC_secServer ${LANG_SPANISH} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
179 LangString DESC_secServer ${LANG_SIMPCHINESE} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
180 LangString DESC_secServer ${LANG_TRADCHINESE} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
181 LangString DESC_secServer ${LANG_JAPANESE} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
182 LangString DESC_secServer ${LANG_KOREAN} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
183 LangString DESC_secServer ${LANG_PORTUGUESEBR} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
185 LangString DESC_secControl ${LANG_ENGLISH} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
186 LangString DESC_secControl ${LANG_GERMAN} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
187 LangString DESC_secControl ${LANG_SPANISH} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
188 LangString DESC_secControl ${LANG_SIMPCHINESE} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
189 LangString DESC_secControl ${LANG_TRADCHINESE} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
190 LangString DESC_secControl ${LANG_JAPANESE} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
191 LangString DESC_secControl ${LANG_KOREAN} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
192 LangString DESC_secControl ${LANG_PORTUGUESEBR} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
194 LangString DESC_secDocs ${LANG_ENGLISH} "Supplemental Documentation: Additional documentation for using OpenAFS."
195 LangString DESC_secDocs ${LANG_GERMAN} "Supplemental Documentation: Additional documentation for using OpenAFS."
196 LangString DESC_secDocs ${LANG_SPANISH} "Supplemental Documentation: Additional documentation for using OpenAFS."
197 LangString DESC_secDocs ${LANG_SIMPCHINESE} "Supplemental Documentation: Additional documentation for using OpenAFS."
198 LangString DESC_secDocs ${LANG_TRADCHINESE} "Supplemental Documentation: Additional documentation for using OpenAFS."
199 LangString DESC_secDocs ${LANG_JAPANESE} "Supplemental Documentation: Additional documentation for using OpenAFS."
200 LangString DESC_secDocs ${LANG_KOREAN} "Supplemental Documentation: Additional documentation for using OpenAFS."
201 LangString DESC_secDocs ${LANG_PORTUGUESEBR} "Supplemental Documentation: Additional documentation for using OpenAFS."
203 LangString DESC_secSDK ${LANG_ENGLISH} "SDK: Header files and libraries for developing software with OpenAFS."
204 LangString DESC_secSDK ${LANG_GERMAN} "SDK: Header files and libraries for developing software with OpenAFS."
205 LangString DESC_secSDK ${LANG_SPANISH} "SDK: Header files and libraries for developing software with OpenAFS."
206 LangString DESC_secSDK ${LANG_SIMPCHINESE} "SDK: Header files and libraries for developing software with OpenAFS."
207 LangString DESC_secSDK ${LANG_TRADCHINESE} "SDK: Header files and libraries for developing software with OpenAFS."
208 LangString DESC_secSDK ${LANG_JAPANESE} "SDK: Header files and libraries for developing software with OpenAFS."
209 LangString DESC_secSDK ${LANG_KOREAN} "SDK: Header files and libraries for developing software with OpenAFS."
210 LangString DESC_secSDK ${LANG_PORTUGUESEBR} "SDK: Header files and libraries for developing software with OpenAFS."
212 ; Popup error messages
213 LangString CellError ${LANG_ENGLISH} "You must specify a valid CellServDB file to copy during install"
214 LangString CellError ${LANG_GERMAN} "You must specify a valid CellServDB file to copy during the install"
215 LangString CellError ${LANG_SPANISH} "You must specify a valid CellServDB file to copy during the install"
216 LangString CellError ${LANG_SIMPCHINESE} "You must specify a valid CellServDB file to copy during the install"
217 LangString CellError ${LANG_TRADCHINESE} "You must specify a valid CellServDB file to copy during the install"
218 LangString CellError ${LANG_JAPANESE} "You must specify a valid CellServDB file to copy during the install"
219 LangString CellError ${LANG_KOREAN} "You must specify a valid CellServDB file to copy during the install"
220 LangString CellError ${LANG_PORTUGUESEBR} "You must specify a valid CellServDB file to copy during the install"
222 LangString CellNameError ${LANG_ENGLISH} "You must specify a cell name for your client to use."
223 LangString CellNameError ${LANG_GERMAN} "You must specify a cell name for your client to use."
224 LangString CellNameError ${LANG_SPANISH} "You must specify a cell name for your client to use."
225 LangString CellNameError ${LANG_SIMPCHINESE} "You must specify a cell name for your client to use."
226 LangString CellNameError ${LANG_TRADCHINESE} "You must specify a cell name for your client to use."
227 LangString CellNameError ${LANG_JAPANESE} "You must specify a cell name for your client to use."
228 LangString CellNameError ${LANG_KOREAN} "You must specify a cell name for your client to use."
229 LangString CellNameError ${LANG_PORTUGUESEBR} "You must specify a cell name for your client to use."
231 LangString URLError ${LANG_ENGLISH} "You must specify a URL if you choose the option to download the CellServDB."
232 LangString URLError ${LANG_GERMAN} "You must specify a URL if you choose the option to download the CellServDB."
233 LangString URLError ${LANG_SPANISH} "You must specify a URL if you choose the option to download the CellServDB."
234 LangString URLError ${LANG_SIMPCHINESE} "You must specify a URL if you choose the option to download the CellServDB."
235 LangString URLError ${LANG_TRADCHINESE} "You must specify a URL if you choose the option to download the CellServDB."
236 LangString URLError ${LANG_JAPANESE} "You must specify a URL if you choose the option to download the CellServDB."
237 LangString URLError ${LANG_KOREAN} "You must specify a URL if you choose the option to download the CellServDB."
238 LangString URLError ${LANG_PORTUGUESEBR} "You must specify a URL if you choose the option to download the CellServDB."
241 ; Upgrade/re-install strings
242 LangString UPGRADE_CLIENT ${LANG_ENGLISH} "Upgrade AFS Client"
243 LangString UPGRADE_CLIENT ${LANG_GERMAN} "Upgrade AFS Client"
244 LangString UPGRADE_CLIENT ${LANG_SPANISH} "Upgrade AFS Client"
245 LangString UPGRADE_CLIENT ${LANG_SIMPCHINESE} "Upgrade AFS Client"
246 LangString UPGRADE_CLIENT ${LANG_TRADCHINESE} "Upgrade AFS Client"
247 LangString UPGRADE_CLIENT ${LANG_JAPANESE} "Upgrade AFS Client"
248 LangString UPGRADE_CLIENT ${LANG_KOREAN} "Upgrade AFS Client"
249 LangString UPGRADE_CLIENT ${LANG_PORTUGUESEBR} "Upgrade AFS Client"
251 LangString REINSTALL_CLIENT ${LANG_ENGLISH} "Re-install AFS Client"
252 LangString REINSTALL_CLIENT ${LANG_GERMAN} "Re-install AFS Client"
253 LangString REINSTALL_CLIENT ${LANG_SPANISH} "Re-install AFS Client"
254 LangString REINSTALL_CLIENT ${LANG_SIMPCHINESE} "Re-install AFS Client"
255 LangString REINSTALL_CLIENT ${LANG_TRADCHINESE} "Re-install AFS Client"
256 LangString REINSTALL_CLIENT ${LANG_JAPANESE} "Re-install AFS Client"
257 LangString REINSTALL_CLIENT ${LANG_KOREAN} "Re-install AFS Client"
258 LangString REINSTALL_CLIENT ${LANG_PORTUGUESEBR} "Re-install AFS Client"
260 LangString UPGRADE_SERVER ${LANG_ENGLISH} "Upgrade AFS Server"
261 LangString UPGRADE_SERVER ${LANG_GERMAN} "Upgrade AFS Server"
262 LangString UPGRADE_SERVER ${LANG_SPANISH} "Upgrade AFS Server"
263 LangString UPGRADE_SERVER ${LANG_SIMPCHINESE} "Upgrade AFS Server"
264 LangString UPGRADE_SERVER ${LANG_TRADCHINESE} "Upgrade AFS Server"
265 LangString UPGRADE_SERVER ${LANG_JAPANESE} "Upgrade AFS Server"
266 LangString UPGRADE_SERVER ${LANG_KOREAN} "Upgrade AFS Server"
267 LangString UPGRADE_SERVER ${LANG_PORTUGUESEBR} "Upgrade AFS Server"
269 LangString REINSTALL_SERVER ${LANG_ENGLISH} "Re-install AFS Server"
270 LangString REINSTALL_SERVER ${LANG_GERMAN} "Re-install AFS Server"
271 LangString REINSTALL_SERVER ${LANG_SPANISH} "Re-install AFS Server"
272 LangString REINSTALL_SERVER ${LANG_SIMPCHINESE} "Re-install AFS Server"
273 LangString REINSTALL_SERVER ${LANG_TRADCHINESE} "Re-install AFS Server"
274 LangString REINSTALL_SERVER ${LANG_JAPANESE} "Re-install AFS Server"
275 LangString REINSTALL_SERVER ${LANG_KOREAN} "Re-install AFS Server"
276 LangString REINSTALL_SERVER ${LANG_PORTUGUESEBR} "Re-install AFS Server"
278 ReserveFile "CellServPage.ini"
279 ReserveFile "AFSCell.ini"
280 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ;InstallOptions plug-in
281 !insertmacro MUI_RESERVEFILE_LANGDLL ;Language selection dialog
282 ;--------------------------------
284 ; Macro - Upgrade DLL File
285 ; Written by Joost Verburg
286 ; ------------------------
289 ; LOCALFILE - Location of the new DLL file (on the compiler system)
290 ; DESTFILE - Location of the DLL file that should be upgraded
291 ; (on the user's system)
292 ; TEMPBASEDIR - Directory on the user's system to store a temporary file
293 ; when the system has to be rebooted.
294 ; For Win9x support, this should be on the same volume as the
296 ; The Windows temp directory could be located on any volume,
297 ; so you cannot use this directory.
299 ; Define UPGRADEDLL_NOREGISTER if you want to upgrade a DLL that does not
300 ; have to be registered.
302 ; Note: If you want to support Win9x, you can only use
303 ; short filenames (8.3).
306 ; !insertmacro UpgradeDLL "dllname.dll" "$SYSDIR\dllname.dll" "$SYSDIR"
309 !macro UpgradeDLL LOCALFILE DESTFILE TEMPBASEDIR
318 ;------------------------
319 ;Unique number for labels
321 !define UPGRADEDLL_UNIQUE ${__LINE__}
323 ;------------------------
324 ;Copy the parameters used on run-time to a variable
325 ;This allows the usage of variables as paramter
327 StrCpy $R4 "${DESTFILE}"
328 StrCpy $R5 "${TEMPBASEDIR}"
330 ;------------------------
331 ;Check file and version
333 IfFileExists $R4 0 upgradedll.copy_${UPGRADEDLL_UNIQUE}
336 GetDLLVersionLocal "${LOCALFILE}" $R0 $R1
337 GetDLLVersion $R4 $R2 $R3
338 IfErrors upgradedll.upgrade_${UPGRADEDLL_UNIQUE}
340 IntCmpU $R0 $R2 0 upgradedll.done_${UPGRADEDLL_UNIQUE} \
341 upgradedll.upgrade_${UPGRADEDLL_UNIQUE}
342 IntCmpU $R1 $R3 upgradedll.done_${UPGRADEDLL_UNIQUE} \
343 upgradedll.done_${UPGRADEDLL_UNIQUE} \
344 upgradedll.upgrade_${UPGRADEDLL_UNIQUE}
346 ;------------------------
347 ;Let's upgrade the DLL!
351 upgradedll.upgrade_${UPGRADEDLL_UNIQUE}:
352 !ifndef UPGRADEDLL_NOREGISTER
357 ;------------------------
358 ;Try to copy the DLL directly
362 Call :upgradedll.file_${UPGRADEDLL_UNIQUE}
363 IfErrors 0 upgradedll.noreboot_${UPGRADEDLL_UNIQUE}
365 ;------------------------
366 ;DLL is in use. Copy it to a temp file and Rename it on reboot.
368 GetTempFileName $R0 $R5
369 Call :upgradedll.file_${UPGRADEDLL_UNIQUE}
370 Rename /REBOOTOK $R0 $R4
372 ;------------------------
373 ;Register the DLL on reboot
375 !ifndef UPGRADEDLL_NOREGISTER
376 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" \
377 "Register $R4" 'rundll32.exe "$R4",DllRegisterServer'
380 Goto upgradedll.done_${UPGRADEDLL_UNIQUE}
382 ;------------------------
383 ;DLL does not exist - just extract
385 upgradedll.copy_${UPGRADEDLL_UNIQUE}:
387 Call :upgradedll.file_${UPGRADEDLL_UNIQUE}
389 ;------------------------
392 upgradedll.noreboot_${UPGRADEDLL_UNIQUE}:
393 !ifndef UPGRADEDLL_NOREGISTER
397 ;------------------------
400 upgradedll.done_${UPGRADEDLL_UNIQUE}:
409 ;------------------------
412 Goto upgradedll.end_${UPGRADEDLL_UNIQUE}
414 ;------------------------
415 ;Called to extract the DLL
417 upgradedll.file_${UPGRADEDLL_UNIQUE}:
418 File /oname=$R0 "${LOCALFILE}"
421 upgradedll.end_${UPGRADEDLL_UNIQUE}:
423 ;------------------------
426 SetOverwrite lastused
428 !undef UPGRADEDLL_UNIQUE
433 ;--------------------------------
436 ;Things that need to be extracted on first (keep these lines before any File command!)
437 ;Only useful for BZIP2 compression
438 !insertmacro MUI_RESERVEFILE_LANGDLL
440 ;--------------------------------
450 ;--------------------------------
453 ;----------------------
455 Section "AFS Client" secClient
457 SetShellVarContext all
459 ; Check for bad previous installation (if we are doing a new install)
460 Call IsAnyAFSInstalled
462 StrCmp $R0 "0" +1 skipCheck
466 ; Stop any running services or we can't replace the files
467 ; Stop the running processes
469 File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe" ; Might not have the MSVCR71.DLL file to run
470 nsExec::Exec '$R0 afsd_service.exe'
471 nsExec::Exec '$R0 afscreds.exe'
472 Exec "afscreds.exe -z"
473 ; in case we are upgrading an old version that does not support -z
474 nsExec::Exec '$R0 afscreds.exe'
476 ;nsExec::Exec '$R0 krbcc32s.exe'
479 nsExec::Exec "net stop TransarcAFSDaemon"
480 nsExec::Exec "net stop TransarcAFSServer"
482 ; Do client components
483 SetOutPath "$INSTDIR\Client\Program"
484 File "${AFS_CLIENT_BUILDDIR}\afsshare.exe"
485 !define UPGRADEDLL_NOREGISTER
486 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\libosi.dll" "$INSTDIR\Client\Program\libosi.dll" "$INSTDIR"
487 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\libafsconf.dll" "$INSTDIR\Client\Program\libafsconf.dll" "$INSTDIR"
488 File "${AFS_CLIENT_BUILDDIR}\klog.exe"
489 File "${AFS_CLIENT_BUILDDIR}\tokens.exe"
490 File "${AFS_CLIENT_BUILDDIR}\unlog.exe"
491 File "${AFS_CLIENT_BUILDDIR}\fs.exe"
492 File "${AFS_CLIENT_BUILDDIR}\afscreds.exe"
493 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll" "$INSTDIR\Client\Program\afs_shl_ext.dll" "$INSTDIR"
494 File "${AFS_BUILD_INCDIR}\afs\auth.h"
495 File "${AFS_CLIENT_BUILDDIR}\afsd_service.exe"
496 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afslogon.dll" "$INSTDIR\Client\Program\afslogon.dll" "$INSTDIR"
497 File "${AFS_CLIENT_BUILDDIR}\symlink.exe"
498 File "${AFS_DESTDIR}\bin\kpasswd.exe"
499 File "${AFS_SERVER_BUILDDIR}\pts.exe"
500 File "${AFS_SERVER_BUILDDIR}\bos.exe"
501 File "${AFS_SERVER_BUILDDIR}\kas.exe"
502 File "${AFS_SERVER_BUILDDIR}\vos.exe"
503 File "${AFS_SERVER_BUILDDIR}\udebug.exe"
504 File "${AFS_DESTDIR}\bin\translate_et.exe"
505 File "${AFS_DESTDIR}\etc\rxdebug.exe"
506 File "${AFS_DESTDIR}\etc\backup.exe"
509 File "${AFS_CLIENT_BUILDDIR}\afsshare.pdb"
510 File "${AFS_CLIENT_BUILDDIR}\libosi.pdb"
511 File "${AFS_CLIENT_BUILDDIR}\libafsconf.pdb"
512 File "${AFS_CLIENT_BUILDDIR}\klog.pdb"
513 File "${AFS_CLIENT_BUILDDIR}\tokens.pdb"
514 File "${AFS_CLIENT_BUILDDIR}\unlog.pdb"
515 File "${AFS_CLIENT_BUILDDIR}\fs.pdb"
516 File "${AFS_CLIENT_BUILDDIR}\afscreds.pdb"
517 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.pdb"
518 File "${AFS_CLIENT_BUILDDIR}\afsd_service.pdb"
519 File "${AFS_CLIENT_BUILDDIR}\afslogon.pdb"
520 File "${AFS_CLIENT_BUILDDIR}\symlink.pdb"
521 File "${AFS_DESTDIR}\bin\kpasswd.pdb"
522 ;File "${AFS_SERVER_BUILDDIR}\pts.pdb"
523 File "${AFS_SERVER_BUILDDIR}\bos.pdb"
524 File "${AFS_SERVER_BUILDDIR}\kas.pdb"
525 File "${AFS_SERVER_BUILDDIR}\vos.pdb"
526 File "${AFS_SERVER_BUILDDIR}\udebug.pdb"
527 File "${AFS_DESTDIR}\bin\translate_et.pdb"
528 File "${AFS_DESTDIR}\etc\rxdebug.pdb"
529 File "${AFS_DESTDIR}\etc\backup.pdb"
537 ; Do WINDOWSDIR components
539 ; Do Windows SYSDIR (Control panel)
541 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa.cpl" "$SYSDIR\afs_cpa.cpl" "$INSTDIR"
543 File "${AFS_CLIENT_BUILDDIR}\afs_cpa.pdb"
546 ; Get AFS CellServDB file
547 Call afs.GetCellServDB
548 !ifdef INSTALL_LOOPBACK
549 Call afs.InstallMSLoopback
553 ; Include Kerberos for Windows files in the installer...
554 SetOutPath "$INSTDIR\kfw\bin\"
555 File "${KFW_SOURCE}\bin\*"
556 SetOutPath "$INSTDIR\kfw\doc"
557 File "${KFW_SOURCE}\doc\*"
560 ;Store install folder
561 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\Client" "" $INSTDIR
562 Call AFSCommon.Install
564 ; Write registry entries
565 WriteRegStr HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
566 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "" "AFS Client Shell Extension"
567 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "" "$INSTDIR\Client\Program\afs_shl_ext.dll"
568 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "ThreadingModel" "Apartment"
569 WriteRegStr HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
570 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "AFS Client Shell Extension"
573 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
574 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "VersionString" ${AFS_VERSION}
575 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Title" "AFS Client"
576 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Description" "AFS Client"
577 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PathName" "$INSTDIR\Client"
578 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Software Type" "File System"
579 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
580 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
581 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
582 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
583 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Title" "AFS Client"
584 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Description" "AFS Client"
585 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Software Type" "File System"
586 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "PathName" "$INSTDIR\Client\Program"
587 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
588 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
589 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
591 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Debug" 1
592 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Debug" 1
594 ; Delete the DEBUG string
595 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Debug"
596 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Debug"
599 ; On Windows 2000 work around KB301673. This is fixed in Windows XP and 2003
600 Call GetWindowsVersion
602 StrCmp $R1 "2000" +1 +2
603 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled" 0
605 ;Write start menu entries
606 CreateDirectory "$SMPROGRAMS\OpenAFS\Client"
607 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
608 CreateShortCut "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk" "$INSTDIR\Client\Program\afscreds.exe" "-A -M -N -Q"
609 CreateShortCut "$SMSTARTUP\AFS Credentials.lnk" "$INSTDIR\Client\Program\afscreds.exe" "-A -M -N -Q"
611 Push "$INSTDIR\Client\Program"
613 Push "$INSTDIR\Common"
617 ; Add kfw to path too
618 Push "$INSTDIR\kfw\bin"
622 ; Create the AFS service
623 SetOutPath "$INSTDIR\Common"
624 File "${AFS_WININSTALL_DIR}\Service.exe"
625 nsExec::Exec "net stop TransarcAFSDaemon"
626 ;IMPORTANT! If we are not refreshing the config files, do NOT remove the service
627 ;Don't re-install because it must be present or we wouldn't have passed the Reg check
629 ReadRegStr $R2 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell"
630 StrCmp $R2 "" +1 skipremove
631 nsExec::Exec '$INSTDIR\Common\Service.exe u TransarcAFSDaemon'
632 nsExec::Exec '$INSTDIR\Common\Service.exe TransarcAFSDaemon "$INSTDIR\Client\Program\afsd_service.exe" "OpenAFS Client Service"'
634 Delete "$INSTDIR\Common\service.exe"
637 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "" ""
638 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "ProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
639 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
640 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
641 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Class" 2
642 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "VerboseLogging" 10
644 ; Must also add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder
645 ; and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order
646 ; to also include the service name.
648 ReadINIStr $R0 $1 "Field 7" "State"
649 ReadINIStr $R1 $1 "Field 9" "State"
650 ; Complicated way to do $R1 = ($R1 *2) + $R0
653 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonOptions" $R1
654 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonScript" "$INSTDIR\Client\Program\afscreds.exe -:%s -x -a -m -n -q"
655 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Name" "OpenAFSDaemon"
658 ReadINIStr $R0 $1 "Field 2" "State"
659 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell" $R0
660 ReadINIStr $R0 $1 "Field 3" "State"
661 WriteRegDWORD HKLM "SOFTWARE\OpenAFS\Client" "ShowTrayIcon" 1
662 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "SecurityLevel" $R0
663 ReadINIStr $R0 $1 "Field 5" "State"
664 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "FreelanceClient" $R0
665 ReadINIStr $R0 $1 "Field 11" "State"
666 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "UseDNS" $R0
667 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "NetbiosName" "AFS"
668 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "MountRoot" "/afs"
669 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "RxMaxMTU" 1260
670 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "IsGateway" 0
671 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "HideDotFiles" 1
672 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "TruncateNetbios" "on"
674 ; Find Lana By Name appears to be causing grief for many people
675 ; I do not have time to track this down so I am simply going to disable it
676 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "NoFindLanaByName" 1
678 strcpy $REG_SUB_KEY "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon"
679 strcpy $REG_VALUE "DependOnGroup"
680 strcpy $REG_DATA_1 "PNP_TDI"
681 strcpy $REG_DATA_2 ""
682 strcpy $REG_DATA_3 ""
683 Call RegWriteMultiStr
684 strcpy $REG_SUB_KEY "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon"
685 strcpy $REG_VALUE "DependOnService"
686 strcpy $REG_DATA_1 "Tcpip"
687 strcpy $REG_DATA_2 "NETBIOS"
688 strcpy $REG_DATA_3 "RpcSs"
689 Call RegWriteMultiStr
693 WriteUninstaller "$INSTDIR\Uninstall.exe"
697 ;------------------------
699 Section "AFS Server" secServer
701 SetShellVarContext all
703 ; Check for bad previous installation (if we are doing a new install)
704 Call IsAnyAFSInstalled
706 StrCmp $R0 "0" +1 skipCheck
710 ; Stop any running services or we can't replace the files
711 ; Stop the running processes
713 File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe" ; Might not have the MSVCR71.DLL file to run
714 nsExec::Exec '$R0 afscreds.exe'
715 Exec "afscreds.exe -z"
716 ; in case we are upgrading an old version that does not support -z
718 nsExec::Exec '$R0 afscreds.exe'
720 ;nsExec::Exec '$R0 krbcc32s.exe'
723 nsExec::Exec "net stop TransarcAFSDaemon"
724 nsExec::Exec "net stop TransarcAFSServer"
726 CreateDirectory "$INSTDIR\Server\usr\afs\etc"
727 CreateDirectory "$INSTDIR\Server\usr\afs\local"
728 CreateDirectory "$INSTDIR\Server\usr\afs\etc\logs"
730 SetOutPath "$INSTDIR\Server\usr\afs\bin"
731 File "${AFS_SERVER_BUILDDIR}\afskill.exe"
732 File "${AFS_SERVER_BUILDDIR}\afssvrcfg.exe"
733 File "${AFS_SERVER_BUILDDIR}\bosctlsvc.exe"
734 File "${AFS_SERVER_BUILDDIR}\bosserver.exe"
735 File "${AFS_SERVER_BUILDDIR}\buserver.exe"
736 File "${AFS_ETC_BUILDDIR}\butc.exe"
737 File "${AFS_SERVER_BUILDDIR}\fileserver.exe"
738 File "${AFS_ETC_BUILDDIR}\fms.exe"
739 File "${AFS_SERVER_BUILDDIR}\kaserver.exe"
740 File "${AFS_SERVER_BUILDDIR}\ptserver.exe"
741 File "${AFS_SERVER_BUILDDIR}\salvager.exe"
742 File "${AFS_SERVER_BUILDDIR}\upclient.exe"
743 File "${AFS_SERVER_BUILDDIR}\upserver.exe"
744 File "${AFS_SERVER_BUILDDIR}\vlserver.exe"
745 File "${AFS_SERVER_BUILDDIR}\volinfo.exe"
746 File "${AFS_SERVER_BUILDDIR}\volserver.exe"
749 File "${AFS_SERVER_BUILDDIR}\afskill.pdb"
750 File "${AFS_SERVER_BUILDDIR}\afssvrcfg.pdb"
751 File "${AFS_SERVER_BUILDDIR}\bosctlsvc.pdb"
752 File "${AFS_SERVER_BUILDDIR}\bosserver.pdb"
753 File "${AFS_SERVER_BUILDDIR}\buserver.pdb"
754 File "${AFS_ETC_BUILDDIR}\butc.pdb"
755 File "${AFS_SERVER_BUILDDIR}\fileserver.pdb"
756 File "${AFS_ETC_BUILDDIR}\fms.pdb"
757 File "${AFS_SERVER_BUILDDIR}\kaserver.pdb"
758 File "${AFS_SERVER_BUILDDIR}\ptserver.pdb"
759 File "${AFS_SERVER_BUILDDIR}\salvager.pdb"
760 File "${AFS_SERVER_BUILDDIR}\upclient.pdb"
761 File "${AFS_SERVER_BUILDDIR}\upserver.pdb"
762 File "${AFS_SERVER_BUILDDIR}\vlserver.pdb"
763 File "${AFS_SERVER_BUILDDIR}\volinfo.pdb"
764 File "${AFS_SERVER_BUILDDIR}\volserver.pdb"
767 ;AFS Server common files
768 SetOutPath "$INSTDIR\Common"
769 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
770 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll"
771 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
772 File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
773 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
776 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
777 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb"
778 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb"
779 File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb"
780 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb"
782 SetOutPath "$INSTDIR\Common"
786 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afsserver.cpl" "$SYSDIR\afsserver.cpl" "$INSTDIR"
789 File "${AFS_SERVER_BUILDDIR}\afsserver.pdb"
792 ;Store install folder
793 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\AFS Server" "" $INSTDIR
795 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
796 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "VersionString" ${AFS_VERSION}
797 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Title" "AFS Server"
798 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Description" "AFS Server for Windows"
799 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PathName" "$INSTDIR\Server"
800 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Software Type" "File System"
801 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
802 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
803 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
804 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
805 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Title" "AFS Server"
806 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Description" "AFS Server for Windows"
807 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Software Type" "File System"
808 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "PathName" "$INSTDIR\Server"
809 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
810 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
811 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
813 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Debug" 1
814 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Debug" 1
816 ; Delete the DEBUG string
817 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Debug"
818 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Debug"
820 ; Install the service
821 SetOutPath "$INSTDIR\Common"
822 File "${AFS_WININSTALL_DIR}\Service.exe"
824 File "${AFS_WININSTALL_DIR}\Service.pdb"
826 ;Don't want to whack existing settings... Make users un-install and then re-install if they want that
827 ;nsExec::Exec '$INSTDIR\Common\service.exe u TransarcAFSServer'
828 nsExec::Exec '$INSTDIR\Common\service.exe TransarcAFSServer "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe" "OpenAFS AFS Server"'
829 Delete "$INSTDIR\Common\service.exe"
831 CreateDirectory "$SMPROGRAMS\OpenAFS\Server"
832 CreateShortCut "$SMPROGRAMS\OpenAFS\Server\Server Configuration.lnk" "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe"
834 ; Make the server config wizard auto-start on bootup
835 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" "AFS Server Wizard" '"$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe" /wizard"'
837 WriteUninstaller "$INSTDIR\Uninstall.exe"
842 ;----------------------------
843 ; OpenAFS Control Center
844 Section "AFS Control Center" secControl
846 SetShellVarContext all
848 SetOutPath "$INSTDIR\Control Center"
849 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager.exe"
850 File "${AFS_SERVER_BUILDDIR}\TaAfsAdmSvr.exe"
851 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager.exe"
854 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager.pdb"
855 File "${AFS_SERVER_BUILDDIR}\TaAfsAdmSvr.pdb"
856 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager.pdb"
859 ;AFS Server common files
860 Call AFSCommon.Install
862 SetOutPath "$INSTDIR\Common"
864 SetOutPath "$INSTDIR\Common"
867 File "${SYSTEMDIR}\msvcr71d.dll"
868 File "${SYSTEMDIR}\msvcr71d.pdb"
869 File "${SYSTEMDIR}\msvcp71d.dll"
870 File "${SYSTEMDIR}\msvcp71d.pdb"
871 File "${SYSTEMDIR}\mfc71d.dll"
872 File "${SYSTEMDIR}\mfc71d.pdb"
873 File "${SYSTEMDIR}\MFC71CHS.DLL"
874 File "${SYSTEMDIR}\MFC71CHT.DLL"
875 File "${SYSTEMDIR}\MFC71DEU.DLL"
876 File "${SYSTEMDIR}\MFC71ENU.DLL"
877 File "${SYSTEMDIR}\MFC71ESP.DLL"
878 File "${SYSTEMDIR}\MFC71FRA.DLL"
879 File "${SYSTEMDIR}\MFC71ITA.DLL"
880 File "${SYSTEMDIR}\MFC71JPN.DLL"
881 File "${SYSTEMDIR}\MFC71KOR.DLL"
884 File "${SYSTEMDIR}\msvcr70d.dll"
885 File "${SYSTEMDIR}\msvcr70d.pdb"
886 File "${SYSTEMDIR}\msvcp70d.dll"
887 File "${SYSTEMDIR}\msvcp70d.pdb"
888 File "${SYSTEMDIR}\mfc70d.dll"
889 File "${SYSTEMDIR}\mfc70d.pdb"
890 File "${SYSTEMDIR}\MFC70CHS.DLL"
891 File "${SYSTEMDIR}\MFC70CHT.DLL"
892 File "${SYSTEMDIR}\MFC70DEU.DLL"
893 File "${SYSTEMDIR}\MFC70ENU.DLL"
894 File "${SYSTEMDIR}\MFC70ESP.DLL"
895 File "${SYSTEMDIR}\MFC70FRA.DLL"
896 File "${SYSTEMDIR}\MFC70ITA.DLL"
897 File "${SYSTEMDIR}\MFC70JPN.DLL"
898 File "${SYSTEMDIR}\MFC70KOR.DLL"
900 File "${SYSTEMDIR}\mfc42d.dll"
901 File "${SYSTEMDIR}\mfc42d.pdb"
902 File "${SYSTEMDIR}\msvcp60d.dll"
903 File "${SYSTEMDIR}\msvcp60d.pdb"
904 File "${SYSTEMDIR}\msvcrtd.dll"
905 File "${SYSTEMDIR}\msvcrtd.pdb"
910 File "${SYSTEMDIR}\mfc71.dll"
911 File "${SYSTEMDIR}\msvcr71.dll"
912 File "${SYSTEMDIR}\msvcp71.dll"
913 File "${SYSTEMDIR}\MFC71CHS.DLL"
914 File "${SYSTEMDIR}\MFC71CHT.DLL"
915 File "${SYSTEMDIR}\MFC71DEU.DLL"
916 File "${SYSTEMDIR}\MFC71ENU.DLL"
917 File "${SYSTEMDIR}\MFC71ESP.DLL"
918 File "${SYSTEMDIR}\MFC71FRA.DLL"
919 File "${SYSTEMDIR}\MFC71ITA.DLL"
920 File "${SYSTEMDIR}\MFC71JPN.DLL"
921 File "${SYSTEMDIR}\MFC71KOR.DLL"
924 File "${SYSTEMDIR}\mfc70.dll"
925 File "${SYSTEMDIR}\msvcr70.dll"
926 File "${SYSTEMDIR}\msvcp70.dll"
927 File "${SYSTEMDIR}\MFC70CHS.DLL"
928 File "${SYSTEMDIR}\MFC70CHT.DLL"
929 File "${SYSTEMDIR}\MFC70DEU.DLL"
930 File "${SYSTEMDIR}\MFC70ENU.DLL"
931 File "${SYSTEMDIR}\MFC70ESP.DLL"
932 File "${SYSTEMDIR}\MFC70FRA.DLL"
933 File "${SYSTEMDIR}\MFC70ITA.DLL"
934 File "${SYSTEMDIR}\MFC70JPN.DLL"
935 File "${SYSTEMDIR}\MFC70KOR.DLL"
937 File "${SYSTEMDIR}\mfc42.dll"
938 File "${SYSTEMDIR}\msvcp60.dll"
939 File "${SYSTEMDIR}\msvcrt.dll"
943 ;Store install folder
944 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PathName" $INSTDIR
945 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "VersionString" ${AFS_VERSION}
946 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
947 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
948 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
949 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
950 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
951 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
952 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
954 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "Debug" 1
955 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "Debug" 1
957 ; Delete the DEBUG string
958 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "Debug"
959 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "Debug"
962 ;Write start menu entries
963 CreateDirectory "$SMPROGRAMS\OpenAFS\Control Center"
964 CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk" "$INSTDIR\Control Center\TaAfsAccountManager.exe"
965 CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk" "$INSTDIR\Control Center\TaAfsServerManager.exe"
967 WriteUninstaller "$INSTDIR\Uninstall.exe"
972 ;----------------------------
973 ; OpenAFS Supplemental Documentation
974 Section "Supplemental Documentation" secDocs
975 SetShellVarContext all
977 StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
978 StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
979 StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
980 StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
981 StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
982 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
983 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
984 StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
988 SetOutPath "$INSTDIR\Documentation\html"
989 File "..\..\doc\install\Documentation\en_US\html\*"
990 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
991 File "..\..\doc\install\Documentation\en_US\html\CmdRef\*"
992 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
993 File "..\..\doc\install\Documentation\en_US\html\InstallGd\*"
994 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
995 File "..\..\doc\install\Documentation\en_US\html\ReleaseNotes\*"
996 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
997 File "..\..\doc\install\Documentation\en_US\html\SysAdminGd\*"
1001 SetOutPath "$INSTDIR\Documentation"
1002 File "..\..\doc\install\Documentation\de_DE\README.TXT"
1003 SetOutPath "$INSTDIR\Documentation\html"
1004 File "..\..\doc\install\Documentation\de_DE\html\*"
1005 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1006 ;File "..\..\doc\install\Documentation\de_DE\html\CmdRef\*"
1007 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1008 File "..\..\doc\install\Documentation\de_DE\html\InstallGd\*"
1009 ;SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1010 ;File "..\..\doc\install\Documentation\de_DE\html\ReleaseNotes\*"
1011 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1012 ;File "..\..\doc\install\Documentation\de_DE\html\SysAdminGd\*"
1016 SetOutPath "$INSTDIR\Documentation"
1017 File "..\..\doc\install\Documentation\es_ES\README.TXT"
1018 SetOutPath "$INSTDIR\Documentation\html"
1019 File "..\..\doc\install\Documentation\es_ES\html\*"
1020 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1021 ;File "..\..\doc\install\Documentation\es_ES\html\CmdRef\*"
1022 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1023 ;File "..\..\doc\install\Documentation\es_ES\html\InstallGd\*"
1024 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1025 ;File "..\..\doc\install\Documentation\es_ES\html\ReleaseNotes\*"
1026 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1027 ;File "..\..\doc\install\Documentation\es_ES\html\SysAdminGd\*"
1031 SetOutPath "$INSTDIR\Documentation"
1032 File "..\..\doc\install\Documentation\ja_JP\README.TXT"
1033 SetOutPath "$INSTDIR\Documentation\html"
1034 File "..\..\doc\install\Documentation\ja_JP\html\*"
1035 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1036 File "..\..\doc\install\Documentation\ja_JP\html\CmdRef\*"
1037 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1038 File "..\..\doc\install\Documentation\ja_JP\html\InstallGd\*"
1039 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1040 ;File "..\..\doc\install\Documentation\ja_JP\html\ReleaseNotes\*"
1041 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1042 ;File "..\..\doc\install\Documentation\ja_JP\html\SysAdminGd\*"
1046 SetOutPath "$INSTDIR\Documentation"
1047 File "..\..\doc\install\Documentation\ko_KR\README.TXT"
1048 SetOutPath "$INSTDIR\Documentation\html"
1049 File "..\..\doc\install\Documentation\ko_KR\html\*"
1050 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1051 ;File "..\..\doc\install\Documentation\ko_KR\html\CmdRef\*"
1052 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1053 File "..\..\doc\install\Documentation\ko_KR\html\InstallGd\*"
1054 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1055 File "..\..\doc\install\Documentation\ko_KR\html\ReleaseNotes\*"
1056 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1057 File "..\..\doc\install\Documentation\ko_KR\html\SysAdminGd\*"
1061 SetOutPath "$INSTDIR\Documentation"
1062 File "..\..\doc\install\Documentation\pt_BR\README.TXT"
1063 SetOutPath "$INSTDIR\Documentation\html"
1064 File "..\..\doc\install\Documentation\pt_BR\html\*"
1065 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1066 ;File "..\..\doc\install\Documentation\pt_BR\html\CmdRef\*"
1067 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1068 File "..\..\doc\install\Documentation\pt_BR\html\InstallGd\*"
1069 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1070 File "..\..\doc\install\Documentation\pt_BR\html\ReleaseNotes\*"
1071 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1072 ;File "..\..\doc\install\Documentation\pt_BR\html\SysAdminGd\*"
1076 SetOutPath "$INSTDIR\Documentation"
1077 File "..\..\doc\install\Documentation\zh_CN\README.TXT"
1078 SetOutPath "$INSTDIR\Documentation\html"
1079 File "..\..\doc\install\Documentation\zh_CN\html\*"
1080 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1081 ;File "..\..\doc\install\Documentation\zh_CN\html\CmdRef\*"
1082 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1083 File "..\..\doc\install\Documentation\zh_CN\html\InstallGd\*"
1084 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1085 File "..\..\doc\install\Documentation\zh_CN\html\ReleaseNotes\*"
1086 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1087 ;File "..\..\doc\install\Documentation\zh_CN\html\SysAdminGd\*"
1091 SetOutPath "$INSTDIR\Documentation"
1092 File "..\..\doc\install\Documentation\zh_TW\README.TXT"
1093 SetOutPath "$INSTDIR\Documentation\html"
1094 File "..\..\doc\install\Documentation\zh_TW\html\*"
1095 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1096 ;File "..\..\doc\install\Documentation\zh_TW\html\CmdRef\*"
1097 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1098 File "..\..\doc\install\Documentation\zh_TW\html\InstallGd\*"
1099 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1100 File "..\..\doc\install\Documentation\zh_TW\html\ReleaseNotes\*"
1101 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1102 ;File "..\..\doc\install\Documentation\zh_TW\html\SysAdminGd\*"
1107 ;Store install folder
1108 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation" "" $INSTDIR
1109 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "VersionString" ${AFS_VERSION}
1110 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
1111 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
1112 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
1113 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
1114 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
1115 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
1116 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
1118 ; Write start menu shortcut
1119 SetOutPath "$SMPROGRAMS\OpenAFS"
1120 CreateShortCut "$SMPROGRAMS\OpenAFS\Documentation.lnk" "$INSTDIR\Documentation\html\index.htm"
1123 WriteUninstaller "$INSTDIR\Uninstall.exe"
1124 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
1125 Call AFSCommon.Install
1129 Section "Software Development Kit (SDK)" secSDK
1131 SetOutPath "$INSTDIR\Client\Program\lib"
1132 File /r "${AFS_CLIENT_LIBDIR}\*.*"
1134 SetOutPath "$INSTDIR\Client\Program\Include"
1135 File /r "${AFS_BUILD_INCDIR}\*.*"
1138 SetOutPath "$INSTDIR\Client\Program\Sample"
1139 File "..\..\afsd\sample\token.c"
1141 ;Store install folder
1142 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS SDK" "" $INSTDIR
1143 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "VersionString" ${AFS_VERSION}
1144 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
1145 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
1146 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
1147 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
1148 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
1149 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
1150 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
1152 WriteUninstaller "$INSTDIR\Uninstall.exe"
1153 SetOutPath "$SMPROGRAMS\OpenAFS"
1154 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
1156 Call AFSCommon.Install
1159 ;Display the Finish header
1160 ;Insert this macro after the sections if you are not using a finish page
1161 ;!insertmacro MUI_SECTIONS_FINISHHEADER
1163 ;--------------------------------
1164 ;Installer Functions
1168 !insertmacro MUI_LANGDLL_DISPLAY
1170 ; Set the default install options
1175 StrCmp $R0 "true" contInstall
1177 MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "You must be an administrator of this machine to install this software."
1181 ; Our logic should be like this.
1182 ; 1) If no AFS components are installed, we do a clean install with default options. (Client/Docs)
1183 ; 2) If existing modules are installed, we keep them selected
1184 ; 3) If it is an upgrade, we set the text accordingly, else we mark it as a re-install
1186 Call IsAnyAFSInstalled
1188 StrCmp $R0 "0" DefaultOptions
1190 Call ShouldClientInstall
1193 ; Check if it was an IBM/Transarc version
1194 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "DisplayName"
1195 StrCmp $R0 "IBM AFS Client" DoIBM
1196 StrCmp $R0 "Transarc AFS Client" DoIBM
1199 StrCmp $R2 "0" NoClient
1200 StrCmp $R2 "1" ReinstallClient
1201 StrCmp $R2 "2" UpgradeClient
1202 StrCmp $R2 "3" DowngradeClient
1205 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\AFS Client\CurrentVersion" "MajorVersion"
1206 StrCmp $R0 "3" +1 NotIBM
1211 SectionGetFlags ${secClient} $0
1212 IntOp $0 $0 | ${SF_SELECTED}
1213 SectionSetFlags ${secClient} $0
1214 ;# !insertmacro SelectSection ${secClient}
1217 ;StrCpy $1 ${secClient} ; Gotta remember which section we are at now...
1218 SectionGetFlags ${secClient} $0
1219 IntOp $0 $0 & ${SECTION_OFF}
1220 SectionSetFlags ${secClient} $0
1223 SectionGetFlags ${secClient} $0
1224 IntOp $0 $0 | ${SF_SELECTED}
1225 SectionSetFlags ${secClient} $0
1226 SectionSetText ${secClient} $(UPGRADE_CLIENT)
1229 SectionGetFlags ${secClient} $0
1230 IntOp $0 $0 | ${SF_SELECTED}
1231 SectionSetFlags ${secClient} $0
1232 SectionSetText ${secClient} $(REINSTALL_CLIENT)
1235 SectionGetFlags ${secClient} $0
1236 IntOp $0 $0 | ${SF_SELECTED}
1237 SectionSetFlags ${secClient} $0
1238 SectionSetText ${secClient} $(REINSTALL_CLIENT)
1244 Call ShouldServerInstall
1246 StrCmp $R2 "0" NoServer
1247 StrCmp $R2 "1" ReinstallServer
1248 StrCmp $R2 "2" UpgradeServer
1249 StrCmp $R2 "3" DowngradeServer
1251 SectionGetFlags ${secServer} $0
1252 IntOp $0 $0 | ${SF_SELECTED}
1253 SectionSetFlags ${secServer} $0
1254 ;# !insertmacro UnselectSection ${secServer}
1258 SectionGetFlags ${secServer} $0
1259 IntOp $0 $0 | ${SF_SELECTED}
1260 SectionSetFlags ${secServer} $0
1261 SectionSetText ${secServer} $(UPGRADE_SERVER)
1265 SectionGetFlags ${secServer} $0
1266 IntOp $0 $0 | ${SF_SELECTED}
1267 SectionSetFlags ${secServer} $0
1268 SectionSetText ${secServer} $(REINSTALL_SERVER)
1272 SectionGetFlags ${secServer} $0
1273 IntOp $0 $0 | ${SF_SELECTED}
1274 SectionSetFlags ${secServer} $0
1275 SectionSetText ${secServer} $(REINSTALL_SERVER)
1279 SectionGetFlags ${secServer} $0
1280 IntOp $0 $0 & ${SECTION_OFF}
1281 SectionSetFlags ${secServer} $0
1282 ;# !insertmacro UnselectSection ${secServer}
1286 ; Check control center
1287 Call IsControlInstalled
1289 StrCmp $R2 "0" NoControl
1291 SectionGetFlags ${secControl} $0
1292 IntOp $0 $0 | ${SF_SELECTED}
1293 SectionSetFlags ${secControl} $0
1297 SectionGetFlags ${secControl} $0
1298 IntOp $0 $0 & ${SECTION_OFF}
1299 SectionSetFlags ${secControl} $0
1300 ;# !insertmacro UnselectSection ${secControl}
1303 ; Check Documentation
1304 Call IsDocumentationInstalled
1306 StrCmp $R2 "0" NoDocs
1307 SectionGetFlags ${secDocs} $0
1308 IntOp $0 $0 | ${SF_SELECTED}
1309 SectionSetFlags ${secDocs} $0
1313 SectionGetFlags ${secDocs} $0
1314 IntOp $0 $0 & ${SECTION_OFF}
1315 SectionSetFlags ${secDocs} $0
1318 ; To check the SDK, we simply look to see if the files exist. If they do,
1319 ; the SDK is installed. If not, we don't need to push it on the user.
1320 ; If they are there, we want to make sure they match the installed version.
1322 IfFileExists "$INSTDIR\Client\Program\Include\main.h" +1 NoSDK
1323 SectionGetFlags ${secSDK} $0
1324 IntOp $0 $0 | ${SF_SELECTED}
1325 SectionSetFlags ${secSDK} $0
1329 SectionGetFlags ${secSDK} $0
1330 IntOp $0 $0 & ${SECTION_OFF}
1331 SectionSetFlags ${secSDK} $0
1336 SectionGetFlags ${secClient} $0
1337 IntOp $0 $0 | ${SF_SELECTED}
1338 SectionSetFlags ${secClient} $0
1340 ; Server NOT selected
1341 SectionGetFlags ${secServer} $0
1342 IntOp $0 $0 & ${SECTION_OFF}
1343 SectionSetFlags ${secServer} $0
1345 ; Control Center NOT selected
1346 SectionGetFlags ${secControl} $0
1347 IntOp $0 $0 & ${SECTION_OFF}
1348 SectionSetFlags ${secControl} $0
1349 ;# !insertmacro UnselectSection ${secControl}
1351 ; Documentation selected
1352 SectionGetFlags ${secDocs} $0
1353 IntOp $0 $0 | ${SF_SELECTED}
1354 SectionSetFlags ${secDocs} $0
1355 ;# !insertmacro UnselectSection ${secDocs}
1358 SectionGetFlags ${secSDK} $0
1359 IntOp $0 $0 & ${SECTION_OFF}
1360 SectionSetFlags ${secSDK} $0
1361 ;# !insertmacro UnselectSection ${secSDK}
1370 ; See if we can set a default installation path...
1371 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PathName"
1372 StrCmp $R0 "" TryServer
1376 ; Work around bug in 1.3.5000, 1.3.5100, 1.3.5200, 1.3.5201, 1.3.5299 installers...
1377 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MajorVersion"
1378 StrCmp $R0 "1" +1 SkipParent
1379 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MinorVersion"
1380 StrCmp $R0 "3" +1 SkipParent
1381 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PatchLevel"
1382 StrCmp $R0 "5000" UpParent
1383 StrCmp $R0 "5100" UpParent
1384 StrCmp $R0 "5200" UpParent
1385 StrCmp $R0 "5201" UpParent
1386 StrCmp $R0 "5299" UpParent
1398 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PathName"
1399 StrCmp $R0 "" TryControl
1407 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PathName"
1415 File /oname=$0 CellServPage.ini
1417 File /oname=$1 AFSCell.ini
1418 ;File /oname=$1 ConfigURL.ini
1426 ;--------------------------------
1427 ; These are our cleanup functions
1428 Function .onInstFailed
1433 Function .onInstSuccess
1439 ;--------------------------------
1442 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
1443 !insertmacro MUI_DESCRIPTION_TEXT ${secServer} $(DESC_secServer)
1444 !insertmacro MUI_DESCRIPTION_TEXT ${secClient} $(DESC_secClient)
1445 !insertmacro MUI_DESCRIPTION_TEXT ${secControl} $(DESC_secControl)
1446 !insertmacro MUI_DESCRIPTION_TEXT ${secDocs} $(DESC_secDocs)
1447 !insertmacro MUI_DESCRIPTION_TEXT ${secSDK} $(DESC_secSDK)
1448 !insertmacro MUI_FUNCTION_DESCRIPTION_END
1450 ;--------------------------------
1451 ;Uninstaller Section
1454 ; Make sure the user REALLY wants to do this, unless they did a silent uninstall, in which case...let them!
1455 IfSilent StartRemove ; New in v2.0b4
1456 MessageBox MB_YESNO "Are you sure you want to remove OpenAFS from this machine?" IDYES StartRemove
1461 SetShellVarContext all
1462 ; Stop the running processes
1464 File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe"
1465 nsExec::Exec '$R0 afscreds.exe'
1466 Exec "afscreds.exe -z"
1467 ; in case we are upgrading an old version that does not support -z
1469 nsExec::Exec '$R0 afscreds.exe'
1471 nsExec::Exec '$R0 krbcc32s.exe'
1474 ; Delete the AFS service
1476 File /oname=$R0 "${AFS_WININSTALL_DIR}\Service.exe"
1477 nsExec::Exec "net stop TransarcAFSDaemon"
1478 nsExec::Exec "net stop TransarcAFSServer"
1479 nsExec::Exec '$R0 u TransarcAFSDaemon'
1480 ; After we stop the service, but before we delete it, we have to remove the volume data
1481 ; This is because the storage locations are in the registry under the service key.
1482 ; Call un.RemoveAFSVolumes
1483 nsExec::Exec '$R0 u TransarcAFSServer'
1486 Call un.RemoveProvider
1488 Push "$INSTDIR\Client\Program"
1489 Call un.RemoveFromPath
1490 Push "$INSTDIR\Common"
1491 Call un.RemoveFromPath
1493 Push "$INSTDIR\kfw\bin"
1494 Call un.RemoveFromPath
1497 ; Delete documentation
1498 Delete "$INSTDIR\Documentation\README.TXT"
1499 Delete "$INSTDIR\Documentation\html\*"
1500 Delete "$INSTDIR\Documentation\html\CmdRef\*"
1501 Delete "$INSTDIR\Documentation\html\InstallGd\*"
1502 Delete "$INSTDIR\Documentation\html\ReleaseNotes\*"
1503 Delete "$INSTDIR\Documentation\html\SysAdminGd\*"
1505 Delete /REBOOTOK "$INSTDIR\Common\afs_config.exe"
1506 Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.dll"
1507 Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.dll"
1508 Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.dll"
1509 Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.dll"
1510 Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.dll"
1511 Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.dll"
1512 Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.dll"
1513 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll"
1514 Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.dll"
1515 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll"
1516 Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.dll"
1517 Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.dll"
1518 Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.dll"
1519 Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.dll"
1522 Delete /REBOOTOK "$INSTDIR\Common\afs_config.pdb"
1523 Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.pdb"
1524 Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.pdb"
1525 Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.pdb"
1526 Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.pdb"
1527 Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.pdb"
1528 Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.pdb"
1529 Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.pdb"
1530 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.pdb"
1531 Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.pdb"
1532 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.pdb"
1533 Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.pdb"
1534 Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.pdb"
1535 Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.pdb"
1536 Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.pdb"
1539 Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.dll"
1540 Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.pdb"
1541 Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.dll"
1542 Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.pdb"
1543 Delete /REBOOTOK "$INSTDIR\bin\mfc71d.dll"
1544 Delete /REBOOTOK "$INSTDIR\bin\mfc71d.pdb"
1547 Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.dll"
1548 Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.pdb"
1549 Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.dll"
1550 Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.pdb"
1551 Delete /REBOOTOK "$INSTDIR\bin\mfc70d.dll"
1552 Delete /REBOOTOK "$INSTDIR\bin\mfc70d.pdb"
1554 Delete /REBOOTOK "$INSTDIR\bin\mfc42d.dll"
1555 Delete /REBOOTOK "$INSTDIR\bin\mfc42d.pdb"
1556 Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.dll"
1557 Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.pdb"
1558 Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.dll"
1559 Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.pdb"
1564 Delete /REBOOTOK "$INSTDIR\bin\mfc71.dll"
1565 Delete /REBOOTOK "$INSTDIR\bin\msvcr71.dll"
1566 Delete /REBOOTOK "$INSTDIR\bin\msvcp71.dll"
1567 Delete /REBOOTOK "$INSTDIR\bin\MFC71CHS.DLL"
1568 Delete /REBOOTOK "$INSTDIR\bin\MFC71CHT.DLL"
1569 Delete /REBOOTOK "$INSTDIR\bin\MFC71DEU.DLL"
1570 Delete /REBOOTOK "$INSTDIR\bin\MFC71ENU.DLL"
1571 Delete /REBOOTOK "$INSTDIR\bin\MFC71ESP.DLL"
1572 Delete /REBOOTOK "$INSTDIR\bin\MFC71FRA.DLL"
1573 Delete /REBOOTOK "$INSTDIR\bin\MFC71ITA.DLL"
1574 Delete /REBOOTOK "$INSTDIR\bin\MFC71JPN.DLL"
1575 Delete /REBOOTOK "$INSTDIR\bin\MFC71KOR.DLL"
1578 Delete /REBOOTOK "$INSTDIR\bin\mfc70.dll"
1579 Delete /REBOOTOK "$INSTDIR\bin\msvcr70.dll"
1580 Delete /REBOOTOK "$INSTDIR\bin\msvcp70.dll"
1581 Delete /REBOOTOK "$INSTDIR\bin\MFC70CHS.DLL"
1582 Delete /REBOOTOK "$INSTDIR\bin\MFC70CHT.DLL"
1583 Delete /REBOOTOK "$INSTDIR\bin\MFC70DEU.DLL"
1584 Delete /REBOOTOK "$INSTDIR\bin\MFC70ENU.DLL"
1585 Delete /REBOOTOK "$INSTDIR\bin\MFC70ESP.DLL"
1586 Delete /REBOOTOK "$INSTDIR\bin\MFC70FRA.DLL"
1587 Delete /REBOOTOK "$INSTDIR\bin\MFC70ITA.DLL"
1588 Delete /REBOOTOK "$INSTDIR\bin\MFC70JPN.DLL"
1589 Delete /REBOOTOK "$INSTDIR\bin\MFC70KOR.DLL"
1591 Delete /REBOOTOK "$INSTDIR\bin\mfc42.dll"
1592 Delete /REBOOTOK "$INSTDIR\bin\msvcp60.dll"
1593 Delete /REBOOTOK "$INSTDIR\bin\msvcrt.dll"
1599 ; IfFileExists "$WINDIR\afsdcell.ini" CellExists SkipDelAsk
1601 MessageBox MB_YESNO "Would you like to keep your configuration files?" IDYES SkipDel
1603 Delete "$WINDIR\afsdcell.ini"
1605 Delete "$WINDIR\afsdsbmt.ini"
1606 ; Only remove krb5.ini if KfW was installed
1608 Delete "$WINDIR\krb5.ini"
1610 Delete "$WINDIR\afsdns.ini"
1611 Delete "$WINDIR\afs_freelance.ini"
1614 Delete "$WINDIR\afsd_init.log"
1615 Delete "$INSTDIR\Uninstall.exe"
1618 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.exe"
1619 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe"
1620 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe"
1621 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.exe"
1622 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.exe"
1623 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.exe"
1624 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.exe"
1625 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.exe"
1626 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.exe"
1627 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.exe"
1628 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\salvager.exe"
1629 Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.dll"
1630 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\upclient.exe"
1631 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\upserver.exe"
1632 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\vlserver.exe"
1633 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\volinfo.exe"
1634 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\volserver.exe"
1637 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.pdb"
1638 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.pdb"
1639 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.pdb"
1640 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.pdb"
1641 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.pdb"
1642 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.pdb"
1643 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.pdb"
1644 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.pdb"
1645 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.pdb"
1646 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.pdb"
1647 Delete "$INSTDIR\Server\usr\afs\bin\salvager.pdb"
1648 Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.pdb"
1649 Delete "$INSTDIR\Server\usr\afs\bin\upclient.pdb"
1650 Delete "$INSTDIR\Server\usr\afs\bin\upserver.pdb"
1651 Delete "$INSTDIR\Server\usr\afs\bin\vlserver.pdb"
1652 Delete "$INSTDIR\Server\usr\afs\bin\volinfo.pdb"
1653 Delete "$INSTDIR\Server\usr\afs\bin\volserver.pdb"
1656 RMDir /r "$INSTDIR\Server\usr\afs\bin"
1657 RmDir /r "$INSTDIR\Server\usr\afs\etc\logs"
1658 RmDir /r "$INSTDIR\Server\usr\afs\etc"
1659 RmDir /r "$INSTDIR\Server\usr\afs\local"
1660 RMDIR /r "$INSTDIR\Server\usr\afs\logs"
1662 Delete /REBOOTOK "$SYSDIR\afsserver.cpl"
1663 Delete /REBOOTOK "$SYSDIR\afs_cpa.cpl"
1666 Delete /REBOOTOK "$SYSDIR\afsserver.pdb"
1667 Delete /REBOOTOK "$SYSDIR\afs_cpa.pdb"
1670 RMDir /r "$INSTDIR\Documentation\html\CmdRef"
1671 RMDir /r "$INSTDIR\Documentation\html\InstallGd"
1672 RMDir /r "$INSTDIR\Documentation\html\ReleaseNotes"
1673 RMDir /r "$INSTDIR\Documentation\html\SysAdminGd"
1674 RMDIr /r "$INSTDIR\Documentation\html"
1676 RMDir "$INSTDIR\Documentation"
1677 ; Delete DOC short cut
1678 Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.exe"
1681 Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.pdb"
1684 Delete /REBOOTOK "$INSTDIR\Client\Program\*"
1685 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\*"
1686 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\afs\*"
1687 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\rx\*"
1688 Delete /REBOOTOK "$INSTDIR\Client\Program\Sample\*"
1689 RMDir "$INSTDIR\Client\Program\Sample"
1690 RMDir "$INSTDIR\Client\Program\Include\afs"
1691 RMDir "$INSTDIR\Client\Program\Include\rx"
1692 RMDir "$INSTDIR\Client\Program\Include"
1693 RMDir "$INSTDIR\Client\Program"
1694 RMDir "$INSTDIR\Client"
1698 Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.dll"
1699 Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.pdb"
1700 Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.dll"
1701 Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.pdb"
1702 Delete /REBOOTOK "$INSTDIR\bin\mfc71d.dll"
1703 Delete /REBOOTOK "$INSTDIR\bin\mfc71d.pdb"
1706 Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.dll"
1707 Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.pdb"
1708 Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.dll"
1709 Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.pdb"
1710 Delete /REBOOTOK "$INSTDIR\bin\mfc70d.dll"
1711 Delete /REBOOTOK "$INSTDIR\bin\mfc70d.pdb"
1713 Delete /REBOOTOK "$INSTDIR\bin\mfc42d.dll"
1714 Delete /REBOOTOK "$INSTDIR\bin\mfc42d.pdb"
1715 Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.dll"
1716 Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.pdb"
1717 Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.dll"
1718 Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.pdb"
1723 Delete /REBOOTOK "$INSTDIR\bin\mfc71.dll"
1724 Delete /REBOOTOK "$INSTDIR\bin\msvcr71.dll"
1725 Delete /REBOOTOK "$INSTDIR\bin\msvcp71.dll"
1726 Delete /REBOOTOK "$INSTDIR\bin\MFC71CHS.DLL"
1727 Delete /REBOOTOK "$INSTDIR\bin\MFC71CHT.DLL"
1728 Delete /REBOOTOK "$INSTDIR\bin\MFC71DEU.DLL"
1729 Delete /REBOOTOK "$INSTDIR\bin\MFC71ENU.DLL"
1730 Delete /REBOOTOK "$INSTDIR\bin\MFC71ESP.DLL"
1731 Delete /REBOOTOK "$INSTDIR\bin\MFC71FRA.DLL"
1732 Delete /REBOOTOK "$INSTDIR\bin\MFC71ITA.DLL"
1733 Delete /REBOOTOK "$INSTDIR\bin\MFC71JPN.DLL"
1734 Delete /REBOOTOK "$INSTDIR\bin\MFC71KOR.DLL"
1737 Delete /REBOOTOK "$INSTDIR\bin\mfc70.dll"
1738 Delete /REBOOTOK "$INSTDIR\bin\msvcr70.dll"
1739 Delete /REBOOTOK "$INSTDIR\bin\msvcp70.dll"
1740 Delete /REBOOTOK "$INSTDIR\bin\MFC70CHS.DLL"
1741 Delete /REBOOTOK "$INSTDIR\bin\MFC70CHT.DLL"
1742 Delete /REBOOTOK "$INSTDIR\bin\MFC70DEU.DLL"
1743 Delete /REBOOTOK "$INSTDIR\bin\MFC70ENU.DLL"
1744 Delete /REBOOTOK "$INSTDIR\bin\MFC70ESP.DLL"
1745 Delete /REBOOTOK "$INSTDIR\bin\MFC70FRA.DLL"
1746 Delete /REBOOTOK "$INSTDIR\bin\MFC70ITA.DLL"
1747 Delete /REBOOTOK "$INSTDIR\bin\MFC70JPN.DLL"
1748 Delete /REBOOTOK "$INSTDIR\bin\MFC70KOR.DLL"
1750 Delete /REBOOTOK "$INSTDIR\bin\mfc42.dll"
1751 Delete /REBOOTOK "$INSTDIR\bin\msvcp60.dll"
1752 Delete /REBOOTOK "$INSTDIR\bin\msvcrt.dll"
1757 Delete /REBOOTOK "$INSTDIR\Common\*"
1758 RMDir "$INSTDIR\Common"
1762 Delete /REBOOTOK "$INSTDIR\kfw\bin\*"
1763 RMDIR /r "$INSTDIR\kfw\bin"
1764 Delete /REBOOTOK "$INSTDIR\kfw\doc\*"
1765 RMDIR /r "$INSTDIR\kfw\doc"
1766 RMDIR /r "$INSTDIR\kfw"
1769 Delete "$SMPROGRAMS\OpenAFS\Documentation.lnk"
1771 ; Remove control center
1772 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.exe"
1773 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.exe"
1774 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.exe"
1775 Delete /REBOOTOK "$INSTDIR\Control Center\CCUninst.dll"
1777 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.pdb"
1778 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.pdb"
1779 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.pdb"
1781 RMDir "$INSTDIR\Control Center"
1783 Delete "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk"
1784 Delete "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk"
1785 Delete "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk"
1786 Delete "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk"
1787 RMDIR "$SMPROGRAMS\OpenAFS\Control Center"
1788 RMDir /r "$SMPROGRAMS\OpenAFS\Client"
1789 RMDir /r "$SMPROGRAMS\OpenAFS"
1790 Delete "$SMSTARTUP\AFS Credentials.lnk"
1792 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "CachePath"
1794 Delete "$R0\AFSCache"
1795 Delete "C:\AFSCache"
1797 DeleteRegKey HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension"
1798 DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32"
1799 DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
1800 DeleteRegKey HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension"
1801 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
1803 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
1804 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client"
1805 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion"
1806 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation"
1807 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion"
1808 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Control Center"
1809 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
1810 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server"
1811 DeleteRegKey /ifempty HKLM "${AFS_REGKEY_ROOT}"
1812 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS"
1813 DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled"
1819 ;--------------------------------
1820 ;Uninstaller Functions
1824 ;Get language from registry
1825 ReadRegStr $LANGUAGE HKCU "Software\OpenAFS\AFS" "Installer Language"
1829 Function un.onUninstSuccess
1831 MessageBox MB_OK "Please reboot your machine to complete uninstallation of the software"
1835 ;------------------------------
1836 ; Get the CellServDB file from the Internet
1838 Function afs.GetCellServDB
1840 ;Check if we should download CellServDB
1841 ReadINIStr $R0 $0 "Field 4" "State"
1842 StrCmp $R0 "1" DoDownload
1844 ;Do nothing if we're keeping the existing file
1845 ReadINIStr $R0 $0 "Field 2" "State"
1848 ReadINIStr $R0 $0 "Field 6" "State"
1849 StrCmp $R0 "1" CheckOther
1851 ReadINIStr $R0 $0 "Field 3" "State"
1852 StrCmp $R0 "1" UsePackaged
1854 ; If none of these, grab file from other location
1858 ReadINIStr $R0 $0 "Field 5" "State"
1859 NSISdl::download $R0 "$WINDIR\afsdcell.ini"
1860 Pop $R0 ;Get the return value
1861 StrCmp $R0 "success" +2
1862 MessageBox MB_OK|MB_ICONSTOP "Download failed: $R0"
1866 SetOutPath "$WINDIR"
1871 ReadINIStr $R0 $0 "Field 7" "State"
1873 CopyFiles $R0 "$WINDIR\afsdcell.ini"
1879 Function AddProvider
1882 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder" "ProviderOrder"
1884 StrCpy $R0 "TransarcAFSDaemon"
1888 StrCmp $R0 "" +1 DoOther
1889 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder" "ProviderOrder"
1890 StrCpy $R0 "$R1,TransarcAFSDaemon"
1891 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder" "ProviderOrder" $R0
1893 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order" "ProviderOrder"
1895 StrCpy $R0 "TransarcAFSDaemon"
1899 StrCmp $R0 "" +1 End
1900 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order" "ProviderOrder"
1901 StrCpy $R0 "$R1,TransarcAFSDaemon"
1902 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order" "ProviderOrder" $R0
1908 Function un.RemoveProvider
1910 StrCpy $R0 "TransarcAFSDaemon"
1912 StrCpy $R0 "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder"
1913 Call un.RemoveFromProvider
1914 StrCpy $R0 "TransarcAFSDaemon"
1916 StrCpy $R0 "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order"
1917 Call un.RemoveFromProvider
1921 Function un.RemoveFromProvider
1930 ReadRegStr $1 HKLM "$R0" "ProviderOrder"
1931 StrCpy $5 $1 1 -1 # copy last char
1932 StrCmp $5 "," +2 # if last char != ,
1933 StrCpy $1 "$1," # append ,
1936 Call un.StrStr ; Find `$0,` in $1
1937 Pop $2 ; pos of our dir
1938 StrCmp $2 "" unRemoveFromPath_done
1939 ; else, it is in path
1944 StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
1945 StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
1948 StrCpy $5 $3 1 -1 # copy last char
1949 StrCmp $5 "," 0 +2 # if last char == ,
1950 StrCpy $3 $3 -1 # remove last char
1952 WriteRegStr HKLM "$R0" "ProviderOrder" $3
1954 unRemoveFromPath_done:
1964 Function CheckPathForAFS
1969 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
1978 IfFileExists "$3\afsd_service.exe" Error
1979 StrCpy $1 $0 32768 1
1981 IntCmp $2 0 Done Done loop
1984 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."
1985 Abort "Unable to install OpenAFS"
1993 Function AddToUniquePath
1997 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
2001 StrCmp $R0 "" +1 Done
2007 ;-------------------------------
2008 ;Do the page to get the CellServDB
2010 Function AFSPageGetCellServDB
2011 ; Skip this page if we are not installing the client
2012 SectionGetFlags ${secClient} $R0
2013 IntOp $R0 $R0 & ${SF_SELECTED}
2016 ; Set the install options here
2019 WriteINIStr $0 "Field 2" "Flags" "DISABLED"
2020 WriteINIStr $0 "Field 3" "State" "1"
2021 WriteINISTR $0 "Field 4" "State" "0"
2022 WriteINIStr $0 "Field 6" "State" "0"
2024 ; If there is an existing afsdcell.ini file, allow the user to choose it and make it default
2025 IfFileExists "$WINDIR\afsdcell.ini" +1 notpresent
2026 WriteINIStr $0 "Field 2" "Flags" "ENABLED"
2027 WriteINIStr $0 "Field 2" "State" "1"
2028 WriteINIStr $0 "Field 3" "State" "0"
2032 !insertmacro MUI_HEADER_TEXT "CellServDB Configuration" "Please choose a method for installing the CellServDB file:"
2033 InstallOptions::dialog $0
2035 StrCmp $R1 "cancel" exit
2036 StrCmp $R1 "back" done
2037 StrCmp $R1 "success" done
2041 ; Check that if a file is set, a valid filename is entered...
2042 ReadINIStr $R0 $0 "Field 6" "State"
2043 StrCmp $R0 "1" CheckFileName
2045 ;Check if a URL is specified, one *IS* specified
2046 ReadINIStr $R0 $0 "Field 4" "State"
2047 StrCmp $R0 "1" CheckURL Skip
2050 ReadINIStr $R0 $0 "Field 5" "State"
2051 StrCmp $R0 "" +1 Skip
2052 MessageBox MB_OK|MB_ICONSTOP $(URLError)
2053 WriteINIStr $0 "Field 4" "State" "0"
2057 ReadINIStr $R0 $0 "Field 7" "State"
2058 IfFileExists $R0 Skip
2060 MessageBox MB_OK|MB_ICONSTOP $(CellError)
2061 WriteINIStr $0 "Field 6" "State" "0"
2069 Function AFSPageGetCellName
2071 ; Skip this page if we are not installing the client
2072 SectionGetFlags ${secClient} $R0
2073 IntOp $R0 $R0 & ${SF_SELECTED}
2077 ; If this is a server install, we do NOT want to recommend the Freelance client
2078 ; And we do not need to ask for the cell name.
2079 SectionGetFlags ${secServer} $R1
2080 IntOp $R1 $R1 & ${SF_SELECTED}
2081 StrCmp $R1 "1" +1 NotServer
2082 WriteINIStr $1 "Field 6" "Text" "Enable AFS Freelance client (Not Recommended for servers)"
2083 WriteINIStr $1 "Field 5" "State" "0"
2084 WriteINIStr $1 "Field 1" "Flags" "DISABLED"
2085 WriteINIStr $1 "Field 2" "Flags" "DISABLED"
2088 WriteINIStr $1 "Field 6" "Text" "Enable AFS Freelance client (Recommended)"
2089 WriteINIStr $1 "Field 5" "State" "1"
2090 WriteINIStr $1 "Field 1" "Flags" ""
2091 WriteINIStr $1 "Field 2" "Flags" ""
2093 ; Get the current cell name, if any
2094 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell"
2096 WriteINIStr $1 "Field 2" "State" $R1
2097 !insertmacro MUI_HEADER_TEXT "Client Cell Name Configuration" "Please enter the name for your default cell:"
2098 InstallOptions::dialog $1
2100 StrCmp $R1 "cancel" exit
2101 StrCmp $R1 "back" done
2102 StrCmp $R1 "success" done
2105 ReadINIStr $R0 $1 "Field 2" "State"
2106 StrCmp $R0 "" +1 good
2108 MessageBox MB_OK|MB_ICONSTOP $(CellNameError)
2114 ; Common install routines for each module
2115 Function AFSCommon.Install
2117 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayName" "OpenAFS for Windows"
2118 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "UninstallString" "$INSTDIR\uninstall.exe"
2120 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayVersion" "${AFS_VERSION}"
2122 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayVersion" "${AFS_VERSION} Checked/Debug"
2124 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "URLInfoAbout" "http://www.openafs.org/"
2129 ;-------------------
2130 ; Get the currently installed version and place it on the stack
2132 Function GetInstalledVersion
2137 ReadRegStr $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "VersionString"
2138 StrCmp $R0 "" NotTransarc done
2142 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "VersionString"
2151 ; Functions to get each component of the version number
2152 Function GetInstalledVersionMajor
2157 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "MajorVersion"
2158 StrCmp $R0 "" NotTransarc done
2162 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "MajorVersion"
2171 Function GetInstalledVersionMinor
2176 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "MinorVersion"
2177 StrCmp $R0 "" NotTransarc done
2181 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "MinorVersion"
2190 Function GetInstalledVersionPatch
2195 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "PatchLevel"
2196 StrCmp $R0 "" NotTransarc done
2200 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "PatchLevel"
2211 ;-------------------------------
2212 ; Check if the client should be checked for default install
2213 Function ShouldClientInstall
2215 StrCpy $R2 "AFS Client"
2216 Call GetInstalledVersion
2219 StrCmp $R0 "" NotInstalled
2220 ; Now we see if it's an older or newer version
2222 Call GetInstalledVersionMajor
2224 IntCmpU $R0 ${AFS_MAJORVERSION} +1 Upgrade Downgrade
2226 Call GetInstalledVersionMinor
2228 IntCmpU $R0 ${AFS_MINORVERSION} +1 Upgrade Downgrade
2230 Call GetInstalledVersionPatch
2232 IntCmpU $R0 ${AFS_PATCHLEVEL} Reinstall Upgrade Downgrade
2255 ;-------------------------------
2256 ; Check how the server options should be set
2257 Function ShouldServerInstall
2259 StrCpy $R2 "AFS Server"
2260 Call GetInstalledVersion
2263 StrCmp $R0 "" NotInstalled
2264 ; Now we see if it's an older or newer version
2266 Call GetInstalledVersionMajor
2268 IntCmpU $R0 ${AFS_MAJORVERSION} +1 Upgrade Downgrade
2270 Call GetInstalledVersionMinor
2272 IntCmpU $R0 ${AFS_MINORVERSION} +1 Upgrade Downgrade
2274 Call GetInstalledVersionPatch
2276 IntCmpU $R0 ${AFS_PATCHLEVEL} Reinstall Upgrade Downgrade
2301 ; See if AFS Server is installed
2302 ; Returns: "1" if it is, 0 if it is not (on the stack)
2303 Function IsServerInstalled
2305 StrCpy $R2 "AFS Server"
2306 Call GetInstalledVersion
2309 StrCmp $R0 "" NotInstalled
2322 ; See if AFS Client is installed
2323 ; Returns: "1" if it is, 0 if it is not (on the stack)
2324 Function IsClientInstalled
2326 StrCpy $R2 "AFS Client"
2327 Call GetInstalledVersion
2330 StrCmp $R0 "" NotInstalled
2344 ; See if AFS Documentation is installed
2345 ; Returns: "1" if it is, 0 if it is not (on the stack)
2346 Function IsDocumentationInstalled
2348 StrCpy $R2 "AFS Supplemental Documentation"
2349 Call GetInstalledVersion
2352 StrCmp $R0 "" NotInstalled
2365 ; See if Control Center is installed
2366 ; Returns: "1" if it is, 0 if it is not (on the stack)
2367 Function IsControlInstalled
2369 StrCpy $R2 "AFS Control Center"
2370 Call GetInstalledVersion
2373 StrCmp $R0 "" NotInstalled
2388 ; output, top of stack (replaces, with e.g. whatever)
2389 ; modifies no other variables.
2391 Function GetParameters
2395 StrCpy $R0 $CMDLINE 1
2399 StrCpy $R1 ' ' ; we're scanning for a space instead of a quote
2401 StrCpy $R0 $CMDLINE 1 $R2
2402 StrCmp $R0 $R1 loop2
2408 StrCpy $R0 $CMDLINE 1 $R2
2409 StrCmp $R0 " " loop2
2410 StrCpy $R0 $CMDLINE "" $R2
2417 ;Check to see if any AFS component is installed
2418 ;Returns: Value on stack: "1" if it is, "0" if it is not
2419 Function IsAnyAFSInstalled
2424 Call IsClientInstalled
2426 Call IsServerInstalled
2428 Call IsControlInstalled
2430 Call IsDocumentationInstalled
2432 ; Now we must see if ANY of the $Rn values are 1
2433 StrCmp $R0 "1" SomethingInstalled
2434 StrCmp $R1 "1" SomethingInstalled
2435 StrCmp $R2 "1" SomethingInstalled
2436 StrCmp $R3 "1" SomethingInstalled
2450 ;Install English Language Files
2451 Function AFSLangFiles
2453 SetOutPath "$INSTDIR\Common"
2454 File "${AFS_CLIENT_BUILDDIR}\afs_config.exe"
2455 File "${AFS_SERVER_BUILDDIR}\afsadminutil.dll"
2456 !insertmacro UpgradeDLL "${AFS_DESTDIR}\lib\afsauthent.dll" "$INSTDIR\Common\afsauthent.dll" "$INSTDIR"
2457 !insertmacro UpgradeDLL "${AFS_DESTDIR}\lib\afspthread.dll" "$INSTDIR\Common\afspthread.dll" "$INSTDIR"
2458 !insertmacro UpgradeDLL "${AFS_DESTDIR}\lib\afsrpc.dll" "$INSTDIR\Common\afsrpc.dll" "$INSTDIR"
2459 File "${AFS_SERVER_BUILDDIR}\afsclientadmin.dll"
2460 File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.dll"
2461 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
2462 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.dll"
2463 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
2464 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll"
2465 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
2466 File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
2467 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
2471 File "${SYSTEMDIR}\msvcr71d.dll"
2472 File "${SYSTEMDIR}\msvcr71d.pdb"
2473 File "${SYSTEMDIR}\msvcp71d.dll"
2474 File "${SYSTEMDIR}\msvcp71d.pdb"
2475 File "${SYSTEMDIR}\mfc71d.dll"
2476 File "${SYSTEMDIR}\mfc71d.pdb"
2477 File "${SYSTEMDIR}\MFC71CHS.DLL"
2478 File "${SYSTEMDIR}\MFC71CHT.DLL"
2479 File "${SYSTEMDIR}\MFC71DEU.DLL"
2480 File "${SYSTEMDIR}\MFC71ENU.DLL"
2481 File "${SYSTEMDIR}\MFC71ESP.DLL"
2482 File "${SYSTEMDIR}\MFC71FRA.DLL"
2483 File "${SYSTEMDIR}\MFC71ITA.DLL"
2484 File "${SYSTEMDIR}\MFC71JPN.DLL"
2485 File "${SYSTEMDIR}\MFC71KOR.DLL"
2488 File "${SYSTEMDIR}\msvcr70d.dll"
2489 File "${SYSTEMDIR}\msvcr70d.pdb"
2490 File "${SYSTEMDIR}\msvcp70d.dll"
2491 File "${SYSTEMDIR}\msvcp70d.pdb"
2492 File "${SYSTEMDIR}\mfc70d.dll"
2493 File "${SYSTEMDIR}\mfc70d.pdb"
2494 File "${SYSTEMDIR}\MFC70CHS.DLL"
2495 File "${SYSTEMDIR}\MFC70CHT.DLL"
2496 File "${SYSTEMDIR}\MFC70DEU.DLL"
2497 File "${SYSTEMDIR}\MFC70ENU.DLL"
2498 File "${SYSTEMDIR}\MFC70ESP.DLL"
2499 File "${SYSTEMDIR}\MFC70FRA.DLL"
2500 File "${SYSTEMDIR}\MFC70ITA.DLL"
2501 File "${SYSTEMDIR}\MFC70JPN.DLL"
2502 File "${SYSTEMDIR}\MFC70KOR.DLL"
2504 File "${SYSTEMDIR}\mfc42d.dll"
2505 File "${SYSTEMDIR}\mfc42d.pdb"
2506 File "${SYSTEMDIR}\msvcp60d.dll"
2507 File "${SYSTEMDIR}\msvcp60d.pdb"
2508 File "${SYSTEMDIR}\msvcrtd.dll"
2509 File "${SYSTEMDIR}\msvcrtd.pdb"
2514 File "${SYSTEMDIR}\mfc71.dll"
2515 File "${SYSTEMDIR}\msvcr71.dll"
2516 File "${SYSTEMDIR}\msvcp71.dll"
2517 File "${SYSTEMDIR}\MFC71CHS.DLL"
2518 File "${SYSTEMDIR}\MFC71CHT.DLL"
2519 File "${SYSTEMDIR}\MFC71DEU.DLL"
2520 File "${SYSTEMDIR}\MFC71ENU.DLL"
2521 File "${SYSTEMDIR}\MFC71ESP.DLL"
2522 File "${SYSTEMDIR}\MFC71FRA.DLL"
2523 File "${SYSTEMDIR}\MFC71ITA.DLL"
2524 File "${SYSTEMDIR}\MFC71JPN.DLL"
2525 File "${SYSTEMDIR}\MFC71KOR.DLL"
2528 File "${SYSTEMDIR}\mfc70.dll"
2529 File "${SYSTEMDIR}\msvcr70.dll"
2530 File "${SYSTEMDIR}\msvcp70.dll"
2531 File "${SYSTEMDIR}\MFC70CHS.DLL"
2532 File "${SYSTEMDIR}\MFC70CHT.DLL"
2533 File "${SYSTEMDIR}\MFC70DEU.DLL"
2534 File "${SYSTEMDIR}\MFC70ENU.DLL"
2535 File "${SYSTEMDIR}\MFC70ESP.DLL"
2536 File "${SYSTEMDIR}\MFC70FRA.DLL"
2537 File "${SYSTEMDIR}\MFC70ITA.DLL"
2538 File "${SYSTEMDIR}\MFC70JPN.DLL"
2539 File "${SYSTEMDIR}\MFC70KOR.DLL"
2541 File "${SYSTEMDIR}\mfc42.dll"
2542 File "${SYSTEMDIR}\msvcp60.dll"
2543 File "${SYSTEMDIR}\msvcrt.dll"
2549 File "${AFS_CLIENT_BUILDDIR}\afs_config.pdb"
2550 File "${AFS_SERVER_BUILDDIR}\afsadminutil.pdb"
2551 File "${AFS_DESTDIR}\lib\afsauthent.pdb"
2552 File "${AFS_DESTDIR}\lib\afspthread.pdb"
2553 File "${AFS_DESTDIR}\lib\afsrpc.pdb"
2554 File "${AFS_SERVER_BUILDDIR}\afsclientadmin.pdb"
2555 File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.pdb"
2556 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
2557 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.pdb"
2558 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
2559 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb"
2560 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb"
2561 File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb"
2562 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb"
2565 StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
2566 StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
2567 StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
2568 StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
2569 StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
2570 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
2571 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
2572 StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
2576 SetOutPath "$INSTDIR\Documentation"
2577 File "..\..\doc\install\Documentation\en_US\README.TXT"
2579 SetOutPath "$INSTDIR\Client\Program"
2580 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1033.dll" "$INSTDIR\Client\Program\afscreds_1033.dll" "$INSTDIR"
2581 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.dll" "$INSTDIR\Client\Program\afs_shl_ext_1033.dll" "$INSTDIR"
2583 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.pdb"
2584 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.pdb"
2587 SetOutPath "$INSTDIR\Common"
2588 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1033.dll" "$INSTDIR\Common\afs_config_1033.dll" "$INSTDIR"
2589 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.dll" "$INSTDIR\Common\afs_cpa_1033.dll" "$INSTDIR"
2590 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.dll" "$INSTDIR\Common\afseventmsg_1033.dll" "$INSTDIR"
2591 ;!insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1033.dll" "$INSTDIR\Common\afs_setup_utils_1033.dll" "$INSTDIR"
2592 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afsserver_1033.dll" "$INSTDIR\Common\afsserver_1033.dll" "$INSTDIR"
2593 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.dll" "$INSTDIR\Common\afssvrcfg_1033.dll" "$INSTDIR"
2594 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.dll" "$INSTDIR\Common\TaAfsAccountManager_1033.dll" "$INSTDIR"
2595 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.dll" "$INSTDIR\Common\TaAfsApplLib_1033.dll" "$INSTDIR"
2596 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.dll" "$INSTDIR\Common\TaAfsServerManager_1033.dll" "$INSTDIR"
2597 File "..\..\doc\help\en_US\afs-cc.CNT"
2598 File "..\..\doc\help\en_US\afs-cc.hlp"
2599 File "..\..\doc\help\en_US\afs-light.CNT"
2600 File "..\..\doc\help\en_US\afs-light.hlp"
2601 File "..\..\doc\help\en_US\afs-nt.CNT"
2602 File "..\..\doc\help\en_US\afs-nt.HLP"
2603 File "..\..\doc\help\en_US\taafscfg.CNT"
2604 File "..\..\doc\help\en_US\taafscfg.hlp"
2605 File "..\..\doc\help\en_US\taafssvrmgr.CNT"
2606 File "..\..\doc\help\en_US\taafssvrmgr.hlp"
2607 File "..\..\doc\help\en_US\taafsusrmgr.CNT"
2608 File "..\..\doc\help\en_US\taafsusrmgr.hlp"
2611 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.pdb"
2612 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.pdb"
2613 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.pdb"
2614 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1033.pdb"
2615 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.pdb"
2616 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.pdb"
2617 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.pdb"
2618 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.pdb"
2624 SetOutPath "$INSTDIR\Documentation"
2625 File "..\..\doc\install\Documentation\de_DE\README.TXT"
2627 SetOutPath "$INSTDIR\Client\Program"
2628 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1032.dll" "$INSTDIR\Client\Program\afscreds_1032.dll" "$INSTDIR"
2629 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1032.dll" "$INSTDIR\Client\Program\afs_shl_ext_1032.dll" "$INSTDIR"
2631 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1032.pdb"
2632 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1032.pdb"
2635 SetOutPath "$INSTDIR\Common"
2636 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1032.dll" "$INSTDIR\Common\afs_config_1032.dll" "$INSTDIR"
2637 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.dll" "$INSTDIR\Common\afs_cpa_1032.dll" "$INSTDIR"
2638 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1032.dll" "$INSTDIR\Common\afseventmsg_1032.dll" "$INSTDIR"
2639 ;!insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1032.dll" "$INSTDIR\Common\afs_setup_utils_1032.dll" "$INSTDIR"
2640 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afsserver_1032.dll" "$INSTDIR\Common\afsserver_1032.dll" "$INSTDIR"
2641 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1032.dll" "$INSTDIR\Common\afssvrcfg_1032.dll" "$INSTDIR"
2642 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1032.dll" "$INSTDIR\Common\TaAfsAccountManager_1032.dll" "$INSTDIR"
2643 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1032.dll" "$INSTDIR\Common\TaAfsAppLib_1032.dll" "$INSTDIR"
2644 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1032.dll" "$INSTDIR\Common\TaAfsServerManager_1032.dll" "$INSTDIR"
2645 File "..\..\doc\help\de_DE\afs-cc.CNT"
2646 File "..\..\doc\help\de_DE\afs-cc.hlp"
2647 File "..\..\doc\help\de_DE\afs-light.CNT"
2648 File "..\..\doc\help\de_DE\afs-light.hlp"
2649 File "..\..\doc\help\de_DE\afs-nt.CNT"
2650 File "..\..\doc\help\de_DE\afs-nt.HLP"
2651 File "..\..\doc\help\de_DE\taafscfg.CNT"
2652 File "..\..\doc\help\de_DE\taafscfg.hlp"
2653 File "..\..\doc\help\de_DE\taafssvrmgr.CNT"
2654 File "..\..\doc\help\de_DE\taafssvrmgr.hlp"
2655 File "..\..\doc\help\de_DE\taafsusrmgr.CNT"
2656 File "..\..\doc\help\de_DE\taafsusrmgr.hlp"
2659 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1032.pdb"
2660 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.pdb"
2661 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1032.pdb"
2662 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1032.pdb"
2663 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1032.pdb"
2664 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1032.pdb"
2665 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1032.pdb"
2666 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1032.pdb"
2672 SetOutPath "$INSTDIR\Documentation"
2673 File "..\..\doc\install\Documentation\es_ES\README.TXT"
2675 SetOutPath "$INSTDIR\Client\Program"
2676 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1034.dll" "$INSTDIR\Client\Program\afscreds_1034.dll" "$INSTDIR"
2677 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.dll" "$INSTDIR\Client\Program\afs_shl_ext_1034.dll" "$INSTDIR"
2679 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1034.pdb"
2680 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.pdb"
2683 SetOutPath "$INSTDIR\Common"
2684 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1034.dll" "$INSTDIR\Common\afs_config_1034.dll" "$INSTDIR"
2685 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.dll" "$INSTDIR\Common\afs_cpa_1034.dll" "$INSTDIR"
2686 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1034.dll" "$INSTDIR\Common\afseventmsg_1034.dll" "$INSTDIR"
2687 ;!insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1034.dll" "$INSTDIR\Common\afs_setup_utils_1034.dll" "$INSTDIR"
2688 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afsserver_1034.dll" "$INSTDIR\Common\afsserver_1034.dll" "$INSTDIR"
2689 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1034.dll" "$INSTDIR\Common\afssvrcfg_1034.dll" "$INSTDIR"
2690 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1034.dll" "$INSTDIR\Common\TaAfsAccountManager_1034.dll" "$INSTDIR"
2691 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1034.dll" "$INSTDIR\Common\TaAfsAppLib_1034.dll" "$INSTDIR"
2692 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1034.dll" "$INSTDIR\Common\TaAfsServerManager_1034.dll" "$INSTDIR"
2693 File "..\..\doc\help\es_ES\afs-cc.CNT"
2694 File "..\..\doc\help\es_ES\afs-cc.hlp"
2695 File "..\..\doc\help\es_ES\afs-light.CNT"
2696 File "..\..\doc\help\es_ES\afs-light.hlp"
2697 File "..\..\doc\help\es_ES\afs-nt.CNT"
2698 File "..\..\doc\help\es_ES\afs-nt.HLP"
2699 File "..\..\doc\help\es_ES\taafscfg.CNT"
2700 File "..\..\doc\help\es_ES\taafscfg.hlp"
2701 File "..\..\doc\help\es_ES\taafssvrmgr.CNT"
2702 File "..\..\doc\help\es_ES\taafssvrmgr.hlp"
2703 File "..\..\doc\help\es_ES\taafsusrmgr.CNT"
2704 File "..\..\doc\help\es_ES\taafsusrmgr.hlp"
2707 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1034.pdb"
2708 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.pdb"
2709 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1034.pdb"
2710 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1034.pdb"
2711 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1034.pdb"
2712 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1034.pdb"
2713 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1034.pdb"
2714 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1034.pdb"
2720 SetOutPath "$INSTDIR\Documentation"
2721 File "..\..\doc\install\Documentation\ja_JP\README.TXT"
2723 SetOutPath "$INSTDIR\Client\Program"
2724 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1041.dll" "$INSTDIR\Client\Program\afscreds_1041.dll" "$INSTDIR"
2725 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.dll" "$INSTDIR\Client\Program\afs_shl_ext_1041.dll" "$INSTDIR"
2727 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1041.pdb"
2728 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.pdb"
2731 SetOutPath "$INSTDIR\Common"
2732 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1041.dll" "$INSTDIR\Common\afs_config_1041.dll" "$INSTDIR"
2733 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.dll" "$INSTDIR\Common\afs_cpa_1041.dll" "$INSTDIR"
2734 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1041.dll" "$INSTDIR\Common\afseventmsg_1041.dll" "$INSTDIR"
2735 ;!insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1041.dll" "$INSTDIR\Common\afs_setup_utils_1041.dll" "$INSTDIR"
2736 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afsserver_1041.dll" "$INSTDIR\Common\afsserver_1041.dll" "$INSTDIR"
2737 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1041.dll" "$INSTDIR\Common\afssvrcfg_1041.dll" "$INSTDIR"
2738 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1041.dll" "$INSTDIR\Common\TaAfsAccountManager_1041.dll" "$INSTDIR"
2739 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1041.dll" "$INSTDIR\Common\TaAfsAppLib_1041.dll" "$INSTDIR"
2740 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1041.dll" "$INSTDIR\Common\TaAfsServerManager_1041.dll" "$INSTDIR"
2741 File "..\..\doc\help\ja_JP\afs-cc.CNT"
2742 File "..\..\doc\help\ja_JP\afs-cc.hlp"
2743 File "..\..\doc\help\ja_JP\afs-light.CNT"
2744 File "..\..\doc\help\ja_JP\afs-light.hlp"
2745 File "..\..\doc\help\ja_JP\afs-nt.CNT"
2746 File "..\..\doc\help\ja_JP\afs-nt.HLP"
2747 File "..\..\doc\help\ja_JP\taafscfg.CNT"
2748 File "..\..\doc\help\ja_JP\taafscfg.hlp"
2749 File "..\..\doc\help\ja_JP\taafssvrmgr.CNT"
2750 File "..\..\doc\help\ja_JP\taafssvrmgr.hlp"
2751 File "..\..\doc\help\ja_JP\taafsusrmgr.CNT"
2752 File "..\..\doc\help\ja_JP\taafsusrmgr.hlp"
2755 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1041.pdb"
2756 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.pdb"
2757 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1041.pdb"
2758 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1041.pdb"
2759 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1041.pdb"
2760 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1041.pdb"
2761 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1041.pdb"
2762 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1041.pdb"
2768 SetOutPath "$INSTDIR\Documentation"
2769 File "..\..\doc\install\Documentation\ko_KR\README.TXT"
2771 SetOutPath "$INSTDIR\Client\Program"
2772 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1042.dll" "$INSTDIR\Client\Program\afscreds_1042.dll" "$INSTDIR"
2773 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.dll" "$INSTDIR\Client\Program\afs_shl_ext_1042.dll" "$INSTDIR"
2775 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1042.pdb"
2776 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.pdb"
2779 SetOutPath "$INSTDIR\Common"
2780 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1042.dll" "$INSTDIR\Common\afs_config_1042.dll" "$INSTDIR"
2781 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.dll" "$INSTDIR\Common\afs_cpa_1042.dll" "$INSTDIR"
2782 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1042.dll" "$INSTDIR\Common\afseventmsg_1042.dll" "$INSTDIR"
2783 ;!insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1042.dll" "$INSTDIR\Common\afs_setup_utils_1042.dll" "$INSTDIR"
2784 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afsserver_1042.dll" "$INSTDIR\Common\afsserver_1042.dll" "$INSTDIR"
2785 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1042.dll" "$INSTDIR\Common\afssvrcfg_1042.dll" "$INSTDIR"
2786 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1042.dll" "$INSTDIR\Common\TaAfsAccountManager_1042.dll" "$INSTDIR"
2787 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1042.dll" "$INSTDIR\Common\TaAfsAppLib_1042.dll" "$INSTDIR"
2788 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1042.dll" "$INSTDIR\Common\TaAfsServerManager_1042.dll" "$INSTDIR"
2789 File "..\..\doc\help\ko_KR\afs-cc.CNT"
2790 File "..\..\doc\help\ko_KR\afs-cc.hlp"
2791 File "..\..\doc\help\ko_KR\afs-light.CNT"
2792 File "..\..\doc\help\ko_KR\afs-light.hlp"
2793 File "..\..\doc\help\ko_KR\afs-nt.CNT"
2794 File "..\..\doc\help\ko_KR\afs-nt.HLP"
2795 File "..\..\doc\help\ko_KR\taafscfg.CNT"
2796 File "..\..\doc\help\ko_KR\taafscfg.hlp"
2797 File "..\..\doc\help\ko_KR\taafssvrmgr.CNT"
2798 File "..\..\doc\help\ko_KR\taafssvrmgr.hlp"
2799 File "..\..\doc\help\ko_KR\taafsusrmgr.CNT"
2800 File "..\..\doc\help\ko_KR\taafsusrmgr.hlp"
2803 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1042.pdb"
2804 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.pdb"
2805 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1042.pdb"
2806 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1042.pdb"
2807 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1042.pdb"
2808 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1042.pdb"
2809 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1042.pdb"
2810 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1042.pdb"
2817 SetOutPath "$INSTDIR\Documentation"
2818 File "..\..\doc\install\Documentation\pt_BR\README.TXT"
2820 SetOutPath "$INSTDIR\Client\Program"
2821 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1046.dll" "$INSTDIR\Client\Program\afscreds_1046.dll" "$INSTDIR"
2822 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.dll" "$INSTDIR\Client\Program\afs_shl_ext_1046.dll" "$INSTDIR"
2824 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1046.pdb"
2825 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.pdb"
2828 SetOutPath "$INSTDIR\Common"
2829 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1046.dll" "$INSTDIR\Common\afs_config_1046.dll" "$INSTDIR"
2830 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.dll" "$INSTDIR\Common\afs_cpa_1046.dll" "$INSTDIR"
2831 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1046.dll" "$INSTDIR\Common\afseventmsg_1046.dll" "$INSTDIR"
2832 ;!insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1046.dll" "$INSTDIR\Common\afs_setup_utils_1046.dll" "$INSTDIR"
2833 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afsserver_1046.dll" "$INSTDIR\Common\afsserver_1046.dll" "$INSTDIR"
2834 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1046.dll" "$INSTDIR\Common\afssvrcfg_1046.dll" "$INSTDIR"
2835 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1046.dll" "$INSTDIR\Common\TaAfsAccountManager_1046.dll" "$INSTDIR"
2836 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1046.dll" "$INSTDIR\Common\TaAfsAppLib_1046.dll" "$INSTDIR"
2837 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1046.dll" "$INSTDIR\Common\TaAfsServerManager_1046.dll" "$INSTDIR"
2838 File "..\..\doc\help\pt_BR\afs-cc.CNT"
2839 File "..\..\doc\help\pt_BR\afs-cc.hlp"
2840 File "..\..\doc\help\pt_BR\afs-light.CNT"
2841 File "..\..\doc\help\pt_BR\afs-light.hlp"
2842 File "..\..\doc\help\pt_BR\afs-nt.CNT"
2843 File "..\..\doc\help\pt_BR\afs-nt.HLP"
2844 File "..\..\doc\help\pt_BR\taafscfg.CNT"
2845 File "..\..\doc\help\pt_BR\taafscfg.hlp"
2846 File "..\..\doc\help\pt_BR\taafssvrmgr.CNT"
2847 File "..\..\doc\help\pt_BR\taafssvrmgr.hlp"
2848 File "..\..\doc\help\pt_BR\taafsusrmgr.CNT"
2849 File "..\..\doc\help\pt_BR\taafsusrmgr.hlp"
2852 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1046.pdb"
2853 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.pdb"
2854 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1046.pdb"
2855 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1046.pdb"
2856 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1046.pdb"
2857 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1046.pdb"
2858 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1046.pdb"
2859 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1046.pdb"
2865 SetOutPath "$INSTDIR\Documentation"
2866 File "..\..\doc\install\Documentation\zh_CN\README.TXT"
2868 SetOutPath "$INSTDIR\Client\Program"
2869 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afscreds_2052.dll" "$INSTDIR\Client\Program\afscreds_2052.dll" "$INSTDIR"
2870 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.dll" "$INSTDIR\Client\Program\afs_shl_ext_2052.dll" "$INSTDIR"
2872 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_2052.pdb"
2873 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.pdb"
2876 SetOutPath "$INSTDIR\Common"
2877 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_config_2052.dll" "$INSTDIR\Common\afs_config_2052.dll" "$INSTDIR"
2878 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.dll" "$INSTDIR\Common\afs_cpa_2052.dll" "$INSTDIR"
2879 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_2052.dll" "$INSTDIR\Common\afseventmsg_2052.dll" "$INSTDIR"
2880 ;!insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_2052.dll" "$INSTDIR\Common\afs_setup_utils_2052.dll" "$INSTDIR"
2881 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afsserver_2052.dll" "$INSTDIR\Common\afsserver_2052.dll" "$INSTDIR"
2882 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_2052.dll" "$INSTDIR\Common\afssvrcfg_2052.dll" "$INSTDIR"
2883 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_2052.dll" "$INSTDIR\Common\TaAfsAccountManager_2052.dll" "$INSTDIR"
2884 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_2052.dll" "$INSTDIR\Common\TaAfsAppLib_2052.dll" "$INSTDIR"
2885 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_2052.dll" "$INSTDIR\Common\TaAfsServerManager_2052.dll" "$INSTDIR"
2886 File "..\..\doc\help\zh_CN\afs-cc.CNT"
2887 File "..\..\doc\help\zh_CN\afs-cc.hlp"
2888 File "..\..\doc\help\zh_CN\afs-light.CNT"
2889 File "..\..\doc\help\zh_CN\afs-light.hlp"
2890 File "..\..\doc\help\zh_CN\afs-nt.CNT"
2891 File "..\..\doc\help\zh_CN\afs-nt.HLP"
2892 File "..\..\doc\help\zh_CN\taafscfg.CNT"
2893 File "..\..\doc\help\zh_CN\taafscfg.hlp"
2894 File "..\..\doc\help\zh_CN\taafssvrmgr.CNT"
2895 File "..\..\doc\help\zh_CN\taafssvrmgr.hlp"
2896 File "..\..\doc\help\zh_CN\taafsusrmgr.CNT"
2897 File "..\..\doc\help\zh_CN\taafsusrmgr.hlp"
2900 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_2052.pdb"
2901 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.pdb"
2902 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_2052.pdb"
2903 ;File "${AFS_SERVER_BUILDDIR}\afsserver_2052.pdb"
2904 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_2052.pdb"
2905 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_2052.pdb"
2906 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_2052.pdb"
2907 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_2052.pdb"
2913 SetOutPath "$INSTDIR\Documentation"
2914 File "..\..\doc\install\Documentation\zh_TW\README.TXT"
2916 SetOutPath "$INSTDIR\Client\Program"
2917 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1028.dll" "$INSTDIR\Client\Program\_1028.dll" "$INSTDIR"
2918 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.dll" "$INSTDIR\Client\Program\afs_shl_ext_1028.dll" "$INSTDIR"
2920 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1028.pdb"
2921 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.pdb"
2924 SetOutPath "$INSTDIR\Common"
2925 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1028.dll" "$INSTDIR\Common\afs_config_1028.dll" "$INSTDIR"
2926 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.dll" "$INSTDIR\Common\afs_cpa_1028.dll" "$INSTDIR"
2927 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afseventmsg_1028.dll" "$INSTDIR\Common\afseventmsg_1028.dll" "$INSTDIR"
2928 ;!insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1028.dll" "$INSTDIR\Common\afs_setup_utils_1028.dll" "$INSTDIR"
2929 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afsserver_1028.dll" "$INSTDIR\Common\afsserver_1028.dll" "$INSTDIR"
2930 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\afssvrcfg_1028.dll" "$INSTDIR\Common\afssvrcfg_1028.dll" "$INSTDIR"
2931 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1028.dll" "$INSTDIR\Common\TaAfsAccountManager_1028.dll" "$INSTDIR"
2932 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1028.dll" "$INSTDIR\Common\TaAfsAppLib_1028.dll" "$INSTDIR"
2933 !insertmacro UpgradeDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1028.dll" "$INSTDIR\Common\TaAfsServerManager_1028.dll" "$INSTDIR"
2934 File "..\..\doc\help\zh_TW\afs-cc.CNT"
2935 File "..\..\doc\help\zh_TW\afs-cc.hlp"
2936 File "..\..\doc\help\zh_TW\afs-light.CNT"
2937 File "..\..\doc\help\zh_TW\afs-light.hlp"
2938 File "..\..\doc\help\zh_TW\afs-nt.CNT"
2939 File "..\..\doc\help\zh_TW\afs-nt.HLP"
2940 File "..\..\doc\help\zh_TW\taafscfg.CNT"
2941 File "..\..\doc\help\zh_TW\taafscfg.hlp"
2942 File "..\..\doc\help\zh_TW\taafssvrmgr.CNT"
2943 File "..\..\doc\help\zh_TW\taafssvrmgr.hlp"
2944 File "..\..\doc\help\zh_TW\taafsusrmgr.CNT"
2945 File "..\..\doc\help\zh_TW\taafsusrmgr.hlp"
2948 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1028.pdb"
2949 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.pdb"
2950 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1028.pdb"
2951 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1028.pdb"
2952 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1028.pdb"
2953 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1028.pdb"
2954 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1028.pdb"
2955 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1028.pdb"
2964 ;====================================================
2965 ; AddToPath - Adds the given dir to the search path.
2966 ; Input - head of the stack
2967 ; Note - Win9x systems requires reboot
2968 ;====================================================
2975 # don't add if the path doesn't exist
2976 IfFileExists $0 "" AddToPath_done
2983 StrCmp $2 "" "" AddToPath_done
2988 StrCmp $2 "" "" AddToPath_done
2989 GetFullPathName /SHORT $3 $0
2994 StrCmp $2 "" "" AddToPath_done
2999 StrCmp $2 "" "" AddToPath_done
3003 StrCmp $1 1 AddToPath_NT
3006 FileOpen $1 "$1\autoexec.bat" a
3009 IntCmp $2 26 0 +2 +2 # DOS EOF
3010 FileSeek $1 -1 END # write over EOF
3011 FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
3017 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
3018 StrCpy $2 $1 1 -1 # copy last char
3019 StrCmp $2 ";" 0 +2 # if last char == ;
3020 StrCpy $1 $1 -1 # remove last char
3021 StrCmp $1 "" AddToPath_NTdoIt
3024 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $0
3025 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
3034 ;====================================================
3035 ; RemoveFromPath - Remove a given dir from the path
3036 ; Input: head of the stack
3037 ;====================================================
3038 Function un.RemoveFromPath
3047 IntFmt $6 "%c" 26 # DOS EOF
3051 StrCmp $1 1 unRemoveFromPath_NT
3054 FileOpen $1 "$1\autoexec.bat" r
3057 GetFullPathName /SHORT $0 $0
3058 StrCpy $0 "SET PATH=%PATH%;$0"
3059 Goto unRemoveFromPath_dosLoop
3061 unRemoveFromPath_dosLoop:
3063 StrCpy $5 $3 1 -1 # read last char
3064 StrCmp $5 $6 0 +2 # if DOS EOF
3065 StrCpy $3 $3 -1 # remove DOS EOF so we can compare
3066 StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine
3067 StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine
3068 StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine
3069 StrCmp $3 "" unRemoveFromPath_dosLoopEnd
3071 Goto unRemoveFromPath_dosLoop
3072 unRemoveFromPath_dosLoopRemoveLine:
3074 Goto unRemoveFromPath_dosLoop
3076 unRemoveFromPath_dosLoopEnd:
3080 Delete "$1\autoexec.bat"
3081 CopyFiles /SILENT $4 "$1\autoexec.bat"
3083 Goto unRemoveFromPath_done
3085 unRemoveFromPath_NT:
3086 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
3087 StrCpy $5 $1 1 -1 # copy last char
3088 StrCmp $5 ";" +2 # if last char != ;
3089 StrCpy $1 "$1;" # append ;
3092 Call un.StrStr ; Find `$0;` in $1
3093 Pop $2 ; pos of our dir
3094 StrCmp $2 "" unRemoveFromPath_done
3095 ; else, it is in path
3100 StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
3101 StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
3104 StrCpy $5 $3 1 -1 # copy last char
3105 StrCmp $5 ";" 0 +2 # if last char == ;
3106 StrCpy $3 $3 -1 # remove last char
3108 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $3
3109 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
3111 unRemoveFromPath_done:
3121 ;====================================================
3122 ; IsNT - Returns 1 if the current system is NT, 0
3124 ; Output: head of the stack
3125 ;====================================================
3129 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
3130 StrCmp $0 "" 0 IsNT_yes
3142 !insertmacro IsNT ""
3143 !insertmacro IsNT "un."
3145 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3147 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3148 ;====================================================
3149 ; StrStr - Finds a given string in another given string.
3150 ; Returns -1 if not found and the pos if found.
3151 ; Input: head of the stack - string to find
3152 ; second in the stack - string to find in
3153 ; Output: head of the stack
3154 ;====================================================
3156 Function ${un}StrStr
3157 Exch $R1 ; st=haystack,old$R1, $R1=needle
3158 Exch ; st=old$R1,haystack
3159 Exch $R2 ; st=old$R1,old$R2, $R2=haystack
3171 StrCpy $R5 $R2 $R3 $R4
3177 StrCpy $R1 $R2 "" $R4
3185 !insertmacro StrStr ""
3186 !insertmacro StrStr "un."
3189 !ifdef ADDSHAREDDLLUSED
3192 ; Increments a shared DLLs reference count.
3193 ; Use by passing one item on the stack (the full path of the DLL).
3196 ; Push $SYSDIR\myDll.dll
3200 Function AddSharedDLL
3203 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
3205 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
3211 ; un.RemoveSharedDLL
3213 ; Decrements a shared DLLs reference count, and removes if necessary.
3214 ; Use by passing one item on the stack (the full path of the DLL).
3215 ; Note: for use in the main installer (not the uninstaller), rename the
3216 ; function to RemoveSharedDLL.
3219 ; Push $SYSDIR\myDll.dll
3220 ; Call un.RemoveSharedDLL
3223 Function un.RemoveSharedDLL
3226 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
3227 StrCmp $R0 "" remove
3229 IntCmp $R0 0 rk rk uk
3231 DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
3234 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
3237 Delete /REBOOTOK $R1
3246 !ifdef INSTALL_LOOPBACK
3247 Function afs.InstallMSLoopback
3249 File /oname=$R0 "loopback_install.dll"
3250 nsExec::Exec "rundll32.exe $R0 doLoopBackEntry quiet"
3251 Call GetWindowsVersion
3253 StrCmp $R1 "2000" +1 +2
3254 nsExec::Exec "rundll32.exe $R0 disableLoopBackEntry"
3262 ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
3263 ; Updated by Joost Verburg
3265 ; Returns on top of stack
3267 ; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003)
3269 ; '' (Unknown Windows Version)
3272 ; Call GetWindowsVersion
3274 ; ; at this point $R0 is "NT 4.0" or whatnot
3276 Function GetWindowsVersion
3283 ReadRegStr $R0 HKLM \
3284 "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
3286 IfErrors 0 lbl_winnt
3289 ReadRegStr $R0 HKLM \
3290 "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
3293 StrCmp $R1 '4' 0 lbl_error
3297 StrCmp $R1 '4.0' lbl_win32_95
3298 StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
3316 StrCmp $R1 '3' lbl_winnt_x
3317 StrCmp $R1 '4' lbl_winnt_x
3321 StrCmp $R1 '5.0' lbl_winnt_2000
3322 StrCmp $R1 '5.1' lbl_winnt_XP
3323 StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
3326 StrCpy $R0 "NT $R0" 6
3351 ; Author: Lilla (lilla@earthlink.net) 2003-06-13
3352 ; function IsUserAdmin uses plugin \NSIS\PlusgIns\UserInfo.dll
3353 ; This function is based upon code in \NSIS\Contrib\UserInfo\UserInfo.nsi
3354 ; This function was tested under NSIS 2 beta 4 (latest CVS as of this writing).
3358 ; Pop $R0 ; at this point $R0 is "true" or "false"
3360 Function IsUserAdmin
3369 UserInfo::GetAccountType
3372 StrCmp $R2 "Admin" 0 Continue
3373 ; Observation: I get here when running Win98SE. (Lilla)
3374 ; The functions UserInfo.dll looks for are there on Win98 too,
3375 ; but just don't work. So UserInfo.dll, knowing that admin isn't required
3376 ; on Win98, returns admin anyway. (per kichik)
3377 ; MessageBox MB_OK 'User "$R1" is in the Administrators group'
3382 ; You should still check for an empty string because the functions
3383 ; UserInfo.dll looks for may not be present on Windows 95. (per kichik)
3386 ;MessageBox MB_OK 'User "$R1" is in the "$R2" group'
3390 ; comment/message below is by UserInfo.nsi author:
3391 ; This one means you don't need to care about admin or
3392 ; not admin because Windows 9x doesn't either
3393 ;MessageBox MB_OK "Error! This DLL can't run under Windows 9x!"
3397 ;MessageBox MB_OK 'User= "$R1" AccountType= "$R2" IsUserAdmin= "$R0"'
3405 ; input, top of stack (e.g. C:\Program Files\Poop)
3406 ; output, top of stack (replaces, with e.g. C:\Program Files)
3407 ; modifies no other variables.
3410 ; Push "C:\Program Files\Directory\Whatever"
3413 ; ; at this point $R0 will equal "C:\Program Files\Directory"
3427 IntCmp $R1 $R2 get 0 get
3428 StrCpy $R3 $R0 1 -$R1
3443 ;--------------------------------
3444 ;Handle what must and what must not be installed
3445 Function .onSelChange
3446 ; If they install the server, they MUST install the client
3447 SectionGetFlags ${secServer} $R0
3448 IntOp $R0 $R0 & ${SF_SELECTED}
3449 StrCmp $R0 "1" MakeClientSelected
3451 ; If they install the control center, we'll give them the client.
3452 ; It may not be required, but it's a bit more useful
3453 SectionGetFlags ${secControl} $R0
3454 IntOp $R0 $R0 & ${SF_SELECTED}
3455 StrCmp $R0 "1" MakeClientSelected
3459 SectionGetFlags ${secClient} $R0
3460 IntOp $R0 $R0 | ${SF_SELECTED}
3461 SectionSetFlags ${secClient} $R0
3466 Function RegWriteMultiStr
3467 !define HKEY_CLASSES_ROOT 0x80000000
3468 !define HKEY_CURRENT_USER 0x80000001
3469 !define HKEY_LOCAL_MACHINE 0x80000002
3470 !define HKEY_USERS 0x80000003
3471 !define HKEY_PERFORMANCE_DATA 0x80000004
3472 !define HKEY_PERFORMANCE_TEXT 0x80000050
3473 !define HKEY_PERFORMANCE_NLSTEXT 0x80000060
3474 !define HKEY_CURRENT_CONFIG 0x80000005
3475 !define HKEY_DYN_DATA 0x80000006
3477 !define KEY_QUERY_VALUE 0x0001
3478 !define KEY_SET_VALUE 0x0002
3479 !define KEY_CREATE_SUB_KEY 0x0004
3480 !define KEY_ENUMERATE_SUB_KEYS 0x0008
3481 !define KEY_NOTIFY 0x0010
3482 !define KEY_CREATE_LINK 0x0020
3486 !define REG_EXPAND_SZ 2
3487 !define REG_BINARY 3
3489 !define REG_DWORD_LITTLE_ENDIAN 4
3490 !define REG_DWORD_BIG_ENDIAN 5
3492 !define REG_MULTI_SZ 7
3494 !define RegCreateKey "Advapi32::RegCreateKeyA(i, t, *i) i"
3495 !define RegSetValueEx "Advapi32::RegSetValueExA(i, t, i, i, i, i) i"
3496 !define RegCloseKey "Advapi32::RegCloseKeyA(i) i"
3503 SetPluginUnload alwaysoff
3504 ; Create a buffer for the multi_sz value
3505 System::Call "*(&t${NSIS_MAX_STRLEN}) i.r1"
3506 ; Open/create the registry key
3507 System::Call "${RegCreateKey}(${HKEY_LOCAL_MACHINE}, '$REG_SUB_KEY', .r0) .r9"
3510 MessageBox MB_OK|MB_ICONSTOP "Can't create registry key! ($9)"
3514 ; Fill in the buffer with our strings
3515 StrCpy $2 $1 ; Initial position
3517 StrLen $9 '$REG_DATA_1' ; Length of first string
3518 IntOp $9 $9 + 1 ; Plus null
3519 System::Call "*$2(&t$9 '$REG_DATA_1')" ; Place the string
3520 IntOp $2 $2 + $9 ; Advance to the next position
3522 StrCmp '$REG_DATA_2' "" terminate
3523 StrLen $9 '$REG_DATA_2' ; Length of second string
3524 IntOp $9 $9 + 1 ; Plus null
3525 System::Call "*$2(&t$9 '$REG_DATA_2')" ; Place the string
3526 IntOp $2 $2 + $9 ; Advance to the next position
3528 StrCmp '$REG_DATA_3' "" terminate
3529 StrLen $9 '$REG_DATA_3' ; Length of third string
3530 IntOp $9 $9 + 1 ; Plus null
3531 System::Call "*$2(&t$9 '$REG_DATA_3')" ; Place the string
3532 IntOp $2 $2 + $9 ; Advance to the next position
3535 System::Call "*$2(&t1 '')" ; Place the terminating null
3536 IntOp $2 $2 + 1 ; Advance to the next position
3538 ; Create/write the value
3539 IntOp $2 $2 - $1 ; Total length
3540 System::Call "${RegSetValueEx}(r0, '$REG_VALUE', 0, ${REG_MULTI_SZ}, r1, r2) .r9"
3543 MessageBox MB_OK|MB_ICONSTOP "Can't set key value! ($9)"
3547 ; Close the registry key
3548 System::Call "${RegCloseKey}(r0)"
3552 SetPluginUnload manual