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 afscreds.exe'
471 Exec "afscreds.exe -z"
472 ; in case we are upgrading an old version that does not support -z
473 nsExec::Exec '$R0 afscreds.exe'
475 ;nsExec::Exec '$R0 krbcc32s.exe'
478 nsExec::Exec "net stop TransarcAFSDaemon"
479 nsExec::Exec "net stop TransarcAFSServer"
481 ; Do client components
482 SetOutPath "$INSTDIR\Client\Program"
483 File "${AFS_CLIENT_BUILDDIR}\afsshare.exe"
484 !define UPGRADEDLL_NOREGISTER
485 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\libosi.dll" "$INSTDIR\Client\Program\libosi.dll" "$INSTDIR"
486 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\libafsconf.dll" "$INSTDIR\Client\Program\libafsconf.dll" "$INSTDIR"
487 File "${AFS_CLIENT_BUILDDIR}\klog.exe"
488 File "${AFS_CLIENT_BUILDDIR}\tokens.exe"
489 File "${AFS_CLIENT_BUILDDIR}\unlog.exe"
490 File "${AFS_CLIENT_BUILDDIR}\fs.exe"
491 File "${AFS_CLIENT_BUILDDIR}\afscreds.exe"
492 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll" "$INSTDIR\Client\Program\afs_shl_ext.dll" "$INSTDIR"
493 File "${AFS_BUILD_INCDIR}\afs\auth.h"
494 File "${AFS_CLIENT_BUILDDIR}\afsd_service.exe"
495 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afslogon.dll" "$INSTDIR\Client\Program\afslogon.dll" "$INSTDIR"
496 File "${AFS_CLIENT_BUILDDIR}\symlink.exe"
497 File "${AFS_DESTDIR}\bin\kpasswd.exe"
498 File "${AFS_SERVER_BUILDDIR}\pts.exe"
499 File "${AFS_SERVER_BUILDDIR}\bos.exe"
500 File "${AFS_SERVER_BUILDDIR}\kas.exe"
501 File "${AFS_SERVER_BUILDDIR}\vos.exe"
502 File "${AFS_SERVER_BUILDDIR}\udebug.exe"
503 File "${AFS_DESTDIR}\bin\translate_et.exe"
504 File "${AFS_DESTDIR}\etc\rxdebug.exe"
505 File "${AFS_DESTDIR}\etc\backup.exe"
508 File "${AFS_CLIENT_BUILDDIR}\afsshare.pdb"
509 File "${AFS_CLIENT_BUILDDIR}\libosi.pdb"
510 File "${AFS_CLIENT_BUILDDIR}\libafsconf.pdb"
511 File "${AFS_CLIENT_BUILDDIR}\klog.pdb"
512 File "${AFS_CLIENT_BUILDDIR}\tokens.pdb"
513 File "${AFS_CLIENT_BUILDDIR}\unlog.pdb"
514 File "${AFS_CLIENT_BUILDDIR}\fs.pdb"
515 File "${AFS_CLIENT_BUILDDIR}\afscreds.pdb"
516 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.pdb"
517 File "${AFS_CLIENT_BUILDDIR}\afsd_service.pdb"
518 File "${AFS_CLIENT_BUILDDIR}\afslogon.pdb"
519 File "${AFS_CLIENT_BUILDDIR}\symlink.pdb"
520 File "${AFS_DESTDIR}\bin\kpasswd.pdb"
521 ;File "${AFS_SERVER_BUILDDIR}\pts.pdb"
522 File "${AFS_SERVER_BUILDDIR}\bos.pdb"
523 File "${AFS_SERVER_BUILDDIR}\kas.pdb"
524 File "${AFS_SERVER_BUILDDIR}\vos.pdb"
525 File "${AFS_SERVER_BUILDDIR}\udebug.pdb"
526 File "${AFS_DESTDIR}\bin\translate_et.pdb"
527 File "${AFS_DESTDIR}\etc\rxdebug.pdb"
528 File "${AFS_DESTDIR}\etc\backup.pdb"
536 ; Do WINDOWSDIR components
538 ; Do Windows SYSDIR (Control panel)
540 File "${AFS_CLIENT_BUILDDIR}\afs_cpa.cpl"
542 File "${AFS_CLIENT_BUILDDIR}\afs_cpa.pdb"
545 ; Get AFS CellServDB file
546 Call afs.GetCellServDB
547 !ifdef INSTALL_LOOPBACK
548 Call afs.InstallMSLoopback
552 ; Include Kerberos for Windows files in the installer...
553 SetOutPath "$INSTDIR\kfw\bin\"
554 File "${KFW_SOURCE}\bin\*"
555 SetOutPath "$INSTDIR\kfw\doc"
556 File "${KFW_SOURCE}\doc\*"
559 ;Store install folder
560 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\Client" "" $INSTDIR
561 Call AFSCommon.Install
563 ; Write registry entries
564 WriteRegStr HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
565 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "" "AFS Client Shell Extension"
566 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "" "$INSTDIR\Client\Program\afs_shl_ext.dll"
567 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "ThreadingModel" "Apartment"
568 WriteRegStr HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
569 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "AFS Client Shell Extension"
572 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
573 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "VersionString" ${AFS_VERSION}
574 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Title" "AFS Client"
575 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Description" "AFS Client"
576 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PathName" "$INSTDIR\Client"
577 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Software Type" "File System"
578 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
579 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
580 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
581 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
582 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Title" "AFS Client"
583 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Description" "AFS Client"
584 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Software Type" "File System"
585 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "PathName" "$INSTDIR\Client\Program"
586 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
587 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
588 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
590 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Debug" 1
591 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Debug" 1
593 ; Delete the DEBUG string
594 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Debug"
595 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Debug"
598 ; On Windows 2000 work around KB301673. This is fixed in Windows XP and 2003
599 Call GetWindowsVersion
601 StrCmp $R1 "2000" +1 +2
602 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled" 0
604 ;Write start menu entries
605 CreateDirectory "$SMPROGRAMS\OpenAFS\Client"
606 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
607 CreateShortCut "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk" "$INSTDIR\Client\Program\afscreds.exe" "-A -M -N -Q"
608 CreateShortCut "$SMSTARTUP\AFS Credentials.lnk" "$INSTDIR\Client\Program\afscreds.exe" "-A -M -N -Q"
610 Push "$INSTDIR\Client\Program"
612 Push "$INSTDIR\Common"
616 ; Add kfw to path too
617 Push "$INSTDIR\kfw\bin"
621 ; Create the AFS service
622 SetOutPath "$INSTDIR\Common"
623 File "${AFS_WININSTALL_DIR}\Service.exe"
624 nsExec::Exec "net stop TransarcAFSDaemon"
625 ;IMPORTANT! If we are not refreshing the config files, do NOT remove the service
626 ;Don't re-install because it must be present or we wouldn't have passed the Reg check
628 ReadRegStr $R2 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell"
629 StrCmp $R2 "" +1 skipremove
630 nsExec::Exec '$INSTDIR\Common\Service.exe u TransarcAFSDaemon'
631 nsExec::Exec '$INSTDIR\Common\Service.exe TransarcAFSDaemon "$INSTDIR\Client\Program\afsd_service.exe" "OpenAFS Client Service"'
633 Delete "$INSTDIR\Common\service.exe"
636 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "" ""
637 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "ProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
638 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
639 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
640 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Class" 2
641 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "VerboseLogging" 10
643 ; Must also add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\HwOrder
644 ; and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider\Order
645 ; to also include the service name.
647 ReadINIStr $R0 $1 "Field 7" "State"
648 ReadINIStr $R1 $1 "Field 9" "State"
649 ; Complicated way to do $R1 = ($R1 *2) + $R0
652 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonOptions" $R1
653 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonScript" "$INSTDIR\Client\Program\afscreds.exe -:%s -x"
654 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Name" "OpenAFSDaemon"
657 ReadINIStr $R0 $1 "Field 2" "State"
658 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell" $R0
659 ReadINIStr $R0 $1 "Field 3" "State"
660 WriteRegDWORD HKLM "SOFTWARE\OpenAFS\Client" "ShowTrayIcon" 1
661 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "SecurityLevel" $R0
662 ReadINIStr $R0 $1 "Field 5" "State"
663 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "FreelanceClient" $R0
664 ReadINIStr $R0 $1 "Field 11" "State"
665 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "UseDNS" $R0
666 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "NetbiosName" "AFS"
667 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "MountRoot" "/afs"
668 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "RxMaxMTU" 1260
669 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "IsGateway" 0
670 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "HideDotFiles" 1
671 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "TruncateNetbios" "on"
673 ; Find Lana By Name appears to be causing grief for many people
674 ; I do not have time to track this down so I am simply going to disable it
675 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "NoFindLanaByName" 1
677 strcpy $REG_SUB_KEY "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider"
678 strcpy $REG_VALUE "DependOnGroup"
679 strcpy $REG_DATA_1 "PNP_TDI"
680 strcpy $REG_DATA_2 ""
681 strcpy $REG_DATA_3 ""
682 Call RegWriteMultiStr
683 strcpy $REG_SUB_KEY "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider"
684 strcpy $REG_VALUE "DependOnService"
685 strcpy $REG_DATA_1 "Tcpip"
686 strcpy $REG_DATA_2 "NETBIOS"
687 strcpy $REG_DATA_3 "RpcSs"
688 Call RegWriteMultiStr
692 WriteUninstaller "$INSTDIR\Uninstall.exe"
696 ;------------------------
698 Section "AFS Server" secServer
700 SetShellVarContext all
702 ; Check for bad previous installation (if we are doing a new install)
703 Call IsAnyAFSInstalled
705 StrCmp $R0 "0" +1 skipCheck
709 ; Stop any running services or we can't replace the files
710 ; Stop the running processes
712 File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe" ; Might not have the MSVCR71.DLL file to run
713 nsExec::Exec '$R0 afscreds.exe'
714 Exec "afscreds.exe -z"
715 ; in case we are upgrading an old version that does not support -z
717 nsExec::Exec '$R0 afscreds.exe'
719 ;nsExec::Exec '$R0 krbcc32s.exe'
722 nsExec::Exec "net stop TransarcAFSDaemon"
723 nsExec::Exec "net stop TransarcAFSServer"
725 CreateDirectory "$INSTDIR\Server\usr\afs\etc"
726 CreateDirectory "$INSTDIR\Server\usr\afs\local"
727 CreateDirectory "$INSTDIR\Server\usr\afs\etc\logs"
729 SetOutPath "$INSTDIR\Server\usr\afs\bin"
730 File "${AFS_SERVER_BUILDDIR}\afskill.exe"
731 File "${AFS_SERVER_BUILDDIR}\afssvrcfg.exe"
732 File "${AFS_SERVER_BUILDDIR}\bosctlsvc.exe"
733 File "${AFS_SERVER_BUILDDIR}\bosserver.exe"
734 File "${AFS_SERVER_BUILDDIR}\buserver.exe"
735 File "${AFS_ETC_BUILDDIR}\butc.exe"
736 File "${AFS_SERVER_BUILDDIR}\fileserver.exe"
737 File "${AFS_ETC_BUILDDIR}\fms.exe"
738 File "${AFS_SERVER_BUILDDIR}\kaserver.exe"
739 File "${AFS_SERVER_BUILDDIR}\ptserver.exe"
740 File "${AFS_SERVER_BUILDDIR}\salvager.exe"
741 File "${AFS_SERVER_BUILDDIR}\upclient.exe"
742 File "${AFS_SERVER_BUILDDIR}\upserver.exe"
743 File "${AFS_SERVER_BUILDDIR}\vlserver.exe"
744 File "${AFS_SERVER_BUILDDIR}\volinfo.exe"
745 File "${AFS_SERVER_BUILDDIR}\volserver.exe"
748 File "${AFS_SERVER_BUILDDIR}\afskill.pdb"
749 File "${AFS_SERVER_BUILDDIR}\afssvrcfg.pdb"
750 File "${AFS_SERVER_BUILDDIR}\bosctlsvc.pdb"
751 File "${AFS_SERVER_BUILDDIR}\bosserver.pdb"
752 File "${AFS_SERVER_BUILDDIR}\buserver.pdb"
753 File "${AFS_ETC_BUILDDIR}\butc.pdb"
754 File "${AFS_SERVER_BUILDDIR}\fileserver.pdb"
755 File "${AFS_ETC_BUILDDIR}\fms.pdb"
756 File "${AFS_SERVER_BUILDDIR}\kaserver.pdb"
757 File "${AFS_SERVER_BUILDDIR}\ptserver.pdb"
758 File "${AFS_SERVER_BUILDDIR}\salvager.pdb"
759 File "${AFS_SERVER_BUILDDIR}\upclient.pdb"
760 File "${AFS_SERVER_BUILDDIR}\upserver.pdb"
761 File "${AFS_SERVER_BUILDDIR}\vlserver.pdb"
762 File "${AFS_SERVER_BUILDDIR}\volinfo.pdb"
763 File "${AFS_SERVER_BUILDDIR}\volserver.pdb"
766 ;AFS Server common files
767 SetOutPath "$INSTDIR\Common"
768 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
769 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll"
770 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
771 File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
772 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
775 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
776 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb"
777 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb"
778 File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb"
779 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb"
781 SetOutPath "$INSTDIR\Common"
785 File "${AFS_SERVER_BUILDDIR}\afsserver.cpl"
788 File "${AFS_SERVER_BUILDDIR}\afsserver.pdb"
791 ;Store install folder
792 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\AFS Server" "" $INSTDIR
794 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
795 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "VersionString" ${AFS_VERSION}
796 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Title" "AFS Server"
797 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Description" "AFS Server for Windows"
798 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PathName" "$INSTDIR\Server"
799 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Software Type" "File System"
800 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
801 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
802 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
803 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
804 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Title" "AFS Server"
805 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Description" "AFS Server for Windows"
806 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Software Type" "File System"
807 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "PathName" "$INSTDIR\Server"
808 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
809 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
810 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
812 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Debug" 1
813 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Debug" 1
815 ; Delete the DEBUG string
816 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Debug"
817 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Debug"
819 ; Install the service
820 SetOutPath "$INSTDIR\Common"
821 File "${AFS_WININSTALL_DIR}\Service.exe"
823 File "${AFS_WININSTALL_DIR}\Service.pdb"
825 ;Don't want to whack existing settings... Make users un-install and then re-install if they want that
826 ;nsExec::Exec '$INSTDIR\Common\service.exe u TransarcAFSServer'
827 nsExec::Exec '$INSTDIR\Common\service.exe TransarcAFSServer "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe" "OpenAFS AFS Server"'
828 Delete "$INSTDIR\Common\service.exe"
830 CreateDirectory "$SMPROGRAMS\OpenAFS\Server"
831 CreateShortCut "$SMPROGRAMS\OpenAFS\Server\Server Configuration.lnk" "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe"
833 ; Make the server config wizard auto-start on bootup
834 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" "AFS Server Wizard" '"$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe" /wizard"'
836 WriteUninstaller "$INSTDIR\Uninstall.exe"
841 ;----------------------------
842 ; OpenAFS Control Center
843 Section "AFS Control Center" secControl
845 SetShellVarContext all
847 SetOutPath "$INSTDIR\Control Center"
848 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager.exe"
849 File "${AFS_SERVER_BUILDDIR}\TaAfsAdmSvr.exe"
850 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager.exe"
853 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager.pdb"
854 File "${AFS_SERVER_BUILDDIR}\TaAfsAdmSvr.pdb"
855 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager.pdb"
858 ;AFS Server common files
859 Call AFSCommon.Install
861 SetOutPath "$INSTDIR\Common"
863 SetOutPath "$INSTDIR\Common"
866 File "${SYSTEMDIR}\msvcr71d.dll"
867 File "${SYSTEMDIR}\msvcr71d.pdb"
868 File "${SYSTEMDIR}\msvcp71d.dll"
869 File "${SYSTEMDIR}\msvcp71d.pdb"
870 File "${SYSTEMDIR}\mfc71d.dll"
871 File "${SYSTEMDIR}\mfc71d.pdb"
872 File "${SYSTEMDIR}\MFC71CHS.DLL"
873 File "${SYSTEMDIR}\MFC71CHT.DLL"
874 File "${SYSTEMDIR}\MFC71DEU.DLL"
875 File "${SYSTEMDIR}\MFC71ENU.DLL"
876 File "${SYSTEMDIR}\MFC71ESP.DLL"
877 File "${SYSTEMDIR}\MFC71FRA.DLL"
878 File "${SYSTEMDIR}\MFC71ITA.DLL"
879 File "${SYSTEMDIR}\MFC71JPN.DLL"
880 File "${SYSTEMDIR}\MFC71KOR.DLL"
883 File "${SYSTEMDIR}\msvcr70d.dll"
884 File "${SYSTEMDIR}\msvcr70d.pdb"
885 File "${SYSTEMDIR}\msvcp70d.dll"
886 File "${SYSTEMDIR}\msvcp70d.pdb"
887 File "${SYSTEMDIR}\mfc70d.dll"
888 File "${SYSTEMDIR}\mfc70d.pdb"
889 File "${SYSTEMDIR}\MFC70CHS.DLL"
890 File "${SYSTEMDIR}\MFC70CHT.DLL"
891 File "${SYSTEMDIR}\MFC70DEU.DLL"
892 File "${SYSTEMDIR}\MFC70ENU.DLL"
893 File "${SYSTEMDIR}\MFC70ESP.DLL"
894 File "${SYSTEMDIR}\MFC70FRA.DLL"
895 File "${SYSTEMDIR}\MFC70ITA.DLL"
896 File "${SYSTEMDIR}\MFC70JPN.DLL"
897 File "${SYSTEMDIR}\MFC70KOR.DLL"
899 File "${SYSTEMDIR}\mfc42d.dll"
900 File "${SYSTEMDIR}\mfc42d.pdb"
901 File "${SYSTEMDIR}\msvcp60d.dll"
902 File "${SYSTEMDIR}\msvcp60d.pdb"
903 File "${SYSTEMDIR}\msvcrtd.dll"
904 File "${SYSTEMDIR}\msvcrtd.pdb"
909 File "${SYSTEMDIR}\mfc71.dll"
910 File "${SYSTEMDIR}\msvcr71.dll"
911 File "${SYSTEMDIR}\msvcp71.dll"
912 File "${SYSTEMDIR}\MFC71CHS.DLL"
913 File "${SYSTEMDIR}\MFC71CHT.DLL"
914 File "${SYSTEMDIR}\MFC71DEU.DLL"
915 File "${SYSTEMDIR}\MFC71ENU.DLL"
916 File "${SYSTEMDIR}\MFC71ESP.DLL"
917 File "${SYSTEMDIR}\MFC71FRA.DLL"
918 File "${SYSTEMDIR}\MFC71ITA.DLL"
919 File "${SYSTEMDIR}\MFC71JPN.DLL"
920 File "${SYSTEMDIR}\MFC71KOR.DLL"
923 File "${SYSTEMDIR}\mfc70.dll"
924 File "${SYSTEMDIR}\msvcr70.dll"
925 File "${SYSTEMDIR}\msvcp70.dll"
926 File "${SYSTEMDIR}\MFC70CHS.DLL"
927 File "${SYSTEMDIR}\MFC70CHT.DLL"
928 File "${SYSTEMDIR}\MFC70DEU.DLL"
929 File "${SYSTEMDIR}\MFC70ENU.DLL"
930 File "${SYSTEMDIR}\MFC70ESP.DLL"
931 File "${SYSTEMDIR}\MFC70FRA.DLL"
932 File "${SYSTEMDIR}\MFC70ITA.DLL"
933 File "${SYSTEMDIR}\MFC70JPN.DLL"
934 File "${SYSTEMDIR}\MFC70KOR.DLL"
936 File "${SYSTEMDIR}\mfc42.dll"
937 File "${SYSTEMDIR}\msvcp60.dll"
938 File "${SYSTEMDIR}\msvcrt.dll"
942 ;Store install folder
943 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PathName" $INSTDIR
944 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "VersionString" ${AFS_VERSION}
945 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
946 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
947 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
948 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
949 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
950 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
951 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
953 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "Debug" 1
954 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "Debug" 1
956 ; Delete the DEBUG string
957 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "Debug"
958 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "Debug"
961 ;Write start menu entries
962 CreateDirectory "$SMPROGRAMS\OpenAFS\Control Center"
963 CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk" "$INSTDIR\Control Center\TaAfsAccountManager.exe"
964 CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk" "$INSTDIR\Control Center\TaAfsServerManager.exe"
966 WriteUninstaller "$INSTDIR\Uninstall.exe"
971 ;----------------------------
972 ; OpenAFS Supplemental Documentation
973 Section "Supplemental Documentation" secDocs
974 SetShellVarContext all
976 StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
977 StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
978 StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
979 StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
980 StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
981 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
982 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
983 StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
987 SetOutPath "$INSTDIR\Documentation\html"
988 File "..\..\doc\install\Documentation\en_US\html\*"
989 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
990 File "..\..\doc\install\Documentation\en_US\html\CmdRef\*"
991 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
992 File "..\..\doc\install\Documentation\en_US\html\InstallGd\*"
993 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
994 File "..\..\doc\install\Documentation\en_US\html\ReleaseNotes\*"
995 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
996 File "..\..\doc\install\Documentation\en_US\html\SysAdminGd\*"
1000 SetOutPath "$INSTDIR\Documentation"
1001 File "..\..\doc\install\Documentation\de_DE\README.TXT"
1002 SetOutPath "$INSTDIR\Documentation\html"
1003 File "..\..\doc\install\Documentation\de_DE\html\*"
1004 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1005 ;File "..\..\doc\install\Documentation\de_DE\html\CmdRef\*"
1006 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1007 File "..\..\doc\install\Documentation\de_DE\html\InstallGd\*"
1008 ;SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1009 ;File "..\..\doc\install\Documentation\de_DE\html\ReleaseNotes\*"
1010 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1011 ;File "..\..\doc\install\Documentation\de_DE\html\SysAdminGd\*"
1015 SetOutPath "$INSTDIR\Documentation"
1016 File "..\..\doc\install\Documentation\es_ES\README.TXT"
1017 SetOutPath "$INSTDIR\Documentation\html"
1018 File "..\..\doc\install\Documentation\es_ES\html\*"
1019 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1020 ;File "..\..\doc\install\Documentation\es_ES\html\CmdRef\*"
1021 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1022 ;File "..\..\doc\install\Documentation\es_ES\html\InstallGd\*"
1023 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1024 ;File "..\..\doc\install\Documentation\es_ES\html\ReleaseNotes\*"
1025 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1026 ;File "..\..\doc\install\Documentation\es_ES\html\SysAdminGd\*"
1030 SetOutPath "$INSTDIR\Documentation"
1031 File "..\..\doc\install\Documentation\ja_JP\README.TXT"
1032 SetOutPath "$INSTDIR\Documentation\html"
1033 File "..\..\doc\install\Documentation\ja_JP\html\*"
1034 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1035 File "..\..\doc\install\Documentation\ja_JP\html\CmdRef\*"
1036 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1037 File "..\..\doc\install\Documentation\ja_JP\html\InstallGd\*"
1038 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1039 ;File "..\..\doc\install\Documentation\ja_JP\html\ReleaseNotes\*"
1040 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1041 ;File "..\..\doc\install\Documentation\ja_JP\html\SysAdminGd\*"
1045 SetOutPath "$INSTDIR\Documentation"
1046 File "..\..\doc\install\Documentation\ko_KR\README.TXT"
1047 SetOutPath "$INSTDIR\Documentation\html"
1048 File "..\..\doc\install\Documentation\ko_KR\html\*"
1049 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1050 ;File "..\..\doc\install\Documentation\ko_KR\html\CmdRef\*"
1051 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1052 File "..\..\doc\install\Documentation\ko_KR\html\InstallGd\*"
1053 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1054 File "..\..\doc\install\Documentation\ko_KR\html\ReleaseNotes\*"
1055 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1056 File "..\..\doc\install\Documentation\ko_KR\html\SysAdminGd\*"
1060 SetOutPath "$INSTDIR\Documentation"
1061 File "..\..\doc\install\Documentation\pt_BR\README.TXT"
1062 SetOutPath "$INSTDIR\Documentation\html"
1063 File "..\..\doc\install\Documentation\pt_BR\html\*"
1064 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1065 ;File "..\..\doc\install\Documentation\pt_BR\html\CmdRef\*"
1066 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1067 File "..\..\doc\install\Documentation\pt_BR\html\InstallGd\*"
1068 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1069 File "..\..\doc\install\Documentation\pt_BR\html\ReleaseNotes\*"
1070 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1071 ;File "..\..\doc\install\Documentation\pt_BR\html\SysAdminGd\*"
1075 SetOutPath "$INSTDIR\Documentation"
1076 File "..\..\doc\install\Documentation\zh_CN\README.TXT"
1077 SetOutPath "$INSTDIR\Documentation\html"
1078 File "..\..\doc\install\Documentation\zh_CN\html\*"
1079 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1080 ;File "..\..\doc\install\Documentation\zh_CN\html\CmdRef\*"
1081 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1082 File "..\..\doc\install\Documentation\zh_CN\html\InstallGd\*"
1083 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1084 File "..\..\doc\install\Documentation\zh_CN\html\ReleaseNotes\*"
1085 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1086 ;File "..\..\doc\install\Documentation\zh_CN\html\SysAdminGd\*"
1090 SetOutPath "$INSTDIR\Documentation"
1091 File "..\..\doc\install\Documentation\zh_TW\README.TXT"
1092 SetOutPath "$INSTDIR\Documentation\html"
1093 File "..\..\doc\install\Documentation\zh_TW\html\*"
1094 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1095 ;File "..\..\doc\install\Documentation\zh_TW\html\CmdRef\*"
1096 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1097 File "..\..\doc\install\Documentation\zh_TW\html\InstallGd\*"
1098 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1099 File "..\..\doc\install\Documentation\zh_TW\html\ReleaseNotes\*"
1100 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1101 ;File "..\..\doc\install\Documentation\zh_TW\html\SysAdminGd\*"
1106 ;Store install folder
1107 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation" "" $INSTDIR
1108 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "VersionString" ${AFS_VERSION}
1109 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
1110 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
1111 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
1112 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
1113 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
1114 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
1115 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
1117 ; Write start menu shortcut
1118 SetOutPath "$SMPROGRAMS\OpenAFS"
1119 CreateShortCut "$SMPROGRAMS\OpenAFS\Documentation.lnk" "$INSTDIR\Documentation\html\index.htm"
1122 WriteUninstaller "$INSTDIR\Uninstall.exe"
1123 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
1124 Call AFSCommon.Install
1128 Section "Software Development Kit (SDK)" secSDK
1130 SetOutPath "$INSTDIR\Client\Program"
1132 File "${AFS_BUILD_INCDIR}\afs\cm_config.h"
1133 File "${AFS_BUILD_INCDIR}\afs\kautils.h"
1134 File "${AFS_CLIENT_LIBDIR}\libafsconf.lib"
1135 File "${AFS_CLIENT_LIBDIR}\afsauthent.lib"
1138 SetOutPath "$INSTDIR\Client\Program\Include"
1139 File "${AFS_BUILD_INCDIR}\lock.h"
1140 File "${AFS_BUILD_INCDIR}\lwp.h"
1141 File "${AFS_BUILD_INCDIR}\preempt.h"
1142 File "${AFS_BUILD_INCDIR}\timer.h"
1143 File "${AFS_BUILD_INCDIR}\des.h"
1144 File "${AFS_BUILD_INCDIR}\des_conf.h"
1145 File "${AFS_BUILD_INCDIR}\mit-cpyright.h"
1146 ;File "${AFS_BUILD_INCDIR}\des-odd.h"
1147 File "${AFS_BUILD_INCDIR}\crypt.h"
1148 File "${AFS_BUILD_INCDIR}\pthread.h"
1149 File "${AFS_BUILD_INCDIR}\dbrpc.h"
1150 File "${AFS_BUILD_INCDIR}\basic.h"
1151 File "${AFS_BUILD_INCDIR}\osidebug.h"
1152 File "${AFS_BUILD_INCDIR}\osiltype.h"
1153 File "${AFS_BUILD_INCDIR}\osistatl.h"
1154 File "${AFS_BUILD_INCDIR}\trylock.h"
1155 File "${AFS_BUILD_INCDIR}\main.h"
1156 File "${AFS_BUILD_INCDIR}\osibasel.h"
1157 File "${AFS_BUILD_INCDIR}\osifd.h"
1158 File "${AFS_BUILD_INCDIR}\osiqueue.h"
1159 File "${AFS_BUILD_INCDIR}\osiutils.h"
1160 File "${AFS_BUILD_INCDIR}\osi.h"
1161 File "${AFS_BUILD_INCDIR}\osidb.h"
1162 File "${AFS_BUILD_INCDIR}\osilog.h"
1163 File "${AFS_BUILD_INCDIR}\osisleep.h"
1164 File "${AFS_BUILD_INCDIR}\perf.h"
1165 File "${AFS_BUILD_INCDIR}\ubik.h"
1166 File "${AFS_BUILD_INCDIR}\ubik_int.h"
1170 SetOutPath "$INSTDIR\Client\Program\Include\afs"
1171 File "${AFS_BUILD_INCDIR}\afs\afs_args.h"
1172 File "${AFS_BUILD_INCDIR}\afs\debug.h"
1173 File "${AFS_BUILD_INCDIR}\afs\param.h"
1174 File "${AFS_BUILD_INCDIR}\afs\afs_sysnames.h"
1175 ;File "${AFS_BUILD_INCDIR}\afs\permit_xprt.h"
1176 File "${AFS_BUILD_INCDIR}\afs\stds.h"
1177 File "${AFS_BUILD_INCDIR}\afs\icl.h"
1178 File "${AFS_BUILD_INCDIR}\afs\procmgmt.h"
1179 File "${AFS_BUILD_INCDIR}\afs\afsutil.h"
1180 File "${AFS_BUILD_INCDIR}\afs\assert.h"
1181 File "${AFS_BUILD_INCDIR}\afs\dirent.h"
1182 File "${AFS_BUILD_INCDIR}\afs\errors.h"
1183 File "${AFS_BUILD_INCDIR}\afs\itc.h"
1184 File "${AFS_BUILD_INCDIR}\afs\vice.h"
1185 File "${AFS_BUILD_INCDIR}\afs\pthread_glock.h"
1186 File "${AFS_BUILD_INCDIR}\afs\errmap_nt.h"
1187 File "${AFS_BUILD_INCDIR}\afs\dirpath.h"
1188 File "${AFS_BUILD_INCDIR}\afs\ktime.h"
1189 File "${AFS_BUILD_INCDIR}\afs\fileutil.h"
1190 File "${AFS_BUILD_INCDIR}\afs\secutil_nt.h"
1191 File "${AFS_BUILD_INCDIR}\afs\com_err.h"
1192 File "${AFS_BUILD_INCDIR}\afs\error_table.h"
1193 ;File "${AFS_BUILD_INCDIR}\afs\mit_sipb-cr.h"
1194 File "${AFS_BUILD_INCDIR}\afs\cmd.h"
1195 File "${AFS_BUILD_INCDIR}\afs\rxgen_consts.h"
1196 File "${AFS_BUILD_INCDIR}\afs\afsint.h"
1197 File "${AFS_BUILD_INCDIR}\afs\afscbint.h"
1198 File "${AFS_BUILD_INCDIR}\afs\audit.h"
1199 File "${AFS_BUILD_INCDIR}\afs\acl.h"
1200 File "${AFS_BUILD_INCDIR}\afs\prs_fs.h"
1201 File "${AFS_BUILD_INCDIR}\afs\afsd.h"
1202 File "${AFS_BUILD_INCDIR}\afs\cm.h"
1203 File "${AFS_BUILD_INCDIR}\afs\cm_buf.h"
1204 File "${AFS_BUILD_INCDIR}\afs\cm_cell.h"
1205 File "${AFS_BUILD_INCDIR}\afs\cm_config.h"
1206 File "${AFS_BUILD_INCDIR}\afs\cm_conn.h"
1207 File "${AFS_BUILD_INCDIR}\afs\cm_ioctl.h"
1208 File "${AFS_BUILD_INCDIR}\afs\cm_scache.h"
1209 File "${AFS_BUILD_INCDIR}\afs\cm_server.h"
1210 File "${AFS_BUILD_INCDIR}\afs\cm_user.h"
1211 File "${AFS_BUILD_INCDIR}\afs\cm_utils.h"
1212 File "${AFS_BUILD_INCDIR}\afs\fs_utils.h"
1213 File "${AFS_BUILD_INCDIR}\afs\krb.h"
1214 File "${AFS_BUILD_INCDIR}\afs\krb_prot.h"
1215 File "${AFS_BUILD_INCDIR}\afs\smb.h"
1216 File "${AFS_BUILD_INCDIR}\afs\smb3.h"
1217 File "${AFS_BUILD_INCDIR}\afs\smb_iocons.h"
1218 File "${AFS_BUILD_INCDIR}\afs\smb_ioctl.h"
1219 File "${AFS_BUILD_INCDIR}\afs\afsrpc.h"
1220 File "${AFS_BUILD_INCDIR}\afs\afssyscalls.h"
1221 File "${AFS_BUILD_INCDIR}\afs\pioctl_nt.h"
1222 File "${AFS_BUILD_INCDIR}\afs\auth.h"
1223 File "${AFS_BUILD_INCDIR}\afs\cellconfig.h"
1224 File "${AFS_BUILD_INCDIR}\afs\keys.h"
1225 File "${AFS_BUILD_INCDIR}\afs\ptserver.h"
1226 File "${AFS_BUILD_INCDIR}\afs\ptint.h"
1227 File "${AFS_BUILD_INCDIR}\afs\pterror.h"
1228 File "${AFS_BUILD_INCDIR}\afs\ptint.h"
1229 File "${AFS_BUILD_INCDIR}\afs\pterror.h"
1230 File "${AFS_BUILD_INCDIR}\afs\ptclient.h"
1231 File "${AFS_BUILD_INCDIR}\afs\prserver.h"
1232 File "${AFS_BUILD_INCDIR}\afs\print.h"
1233 File "${AFS_BUILD_INCDIR}\afs\prerror.h"
1234 File "${AFS_BUILD_INCDIR}\afs\prclient.h"
1235 File "${AFS_BUILD_INCDIR}\afs\kautils.h"
1236 File "${AFS_BUILD_INCDIR}\afs\kauth.h"
1237 File "${AFS_BUILD_INCDIR}\afs\kaport.h"
1238 File "${AFS_BUILD_INCDIR}\afs\vl_opcodes.h"
1239 File "${AFS_BUILD_INCDIR}\afs\vlserver.h"
1240 File "${AFS_BUILD_INCDIR}\afs\vldbint.h"
1241 File "${AFS_BUILD_INCDIR}\afs\usd.h"
1242 File "${AFS_BUILD_INCDIR}\afs\bubasics.h"
1243 File "${AFS_BUILD_INCDIR}\afs\butc.h"
1244 File "${AFS_BUILD_INCDIR}\afs\bumon.h"
1245 File "${AFS_BUILD_INCDIR}\afs\butm.h"
1246 File "${AFS_BUILD_INCDIR}\afs\tcdata.h"
1247 File "${AFS_BUILD_INCDIR}\afs\budb.h"
1248 ;File "${AFS_BUILD_INCDIR}\afs\budb_errors.h"
1249 File "${AFS_BUILD_INCDIR}\afs\budb_client.h"
1250 File "${AFS_BUILD_INCDIR}\afs\dir.h"
1251 File "${AFS_BUILD_INCDIR}\afs\fssync.h"
1252 File "${AFS_BUILD_INCDIR}\afs\ihandle.h"
1253 File "${AFS_BUILD_INCDIR}\afs\nfs.h"
1254 File "${AFS_BUILD_INCDIR}\afs\ntops.h"
1255 File "${AFS_BUILD_INCDIR}\afs\partition.h"
1256 File "${AFS_BUILD_INCDIR}\afs\viceinode.h"
1257 File "${AFS_BUILD_INCDIR}\afs\vnode.h"
1258 File "${AFS_BUILD_INCDIR}\afs\volume.h"
1259 File "${AFS_BUILD_INCDIR}\afs\voldefs.h"
1260 File "${AFS_BUILD_INCDIR}\afs\volser.h"
1261 File "${AFS_BUILD_INCDIR}\afs\volint.h"
1262 File "${AFS_BUILD_INCDIR}\afs\fs_stats.h"
1263 File "${AFS_BUILD_INCDIR}\afs\bosint.h"
1264 File "${AFS_BUILD_INCDIR}\afs\bnode.h"
1267 SetOutPath "$INSTDIR\Client\Program\Include\rx"
1268 File "${AFS_BUILD_INCDIR}\rx\rx.h"
1269 File "${AFS_BUILD_INCDIR}\rx\rx_packet.h"
1270 File "${AFS_BUILD_INCDIR}\rx\rx_user.h"
1271 File "${AFS_BUILD_INCDIR}\rx\rx_event.h"
1272 File "${AFS_BUILD_INCDIR}\rx\rx_queue.h"
1273 File "${AFS_BUILD_INCDIR}\rx\rx_globals.h"
1274 File "${AFS_BUILD_INCDIR}\rx\rx_clock.h"
1275 File "${AFS_BUILD_INCDIR}\rx\rx_misc.h"
1276 File "${AFS_BUILD_INCDIR}\rx\rx_multi.h"
1277 File "${AFS_BUILD_INCDIR}\rx\rx_null.h"
1278 File "${AFS_BUILD_INCDIR}\rx\rx_lwp.h"
1279 File "${AFS_BUILD_INCDIR}\rx\rx_pthread.h"
1280 File "${AFS_BUILD_INCDIR}\rx\rx_xmit_nt.h"
1281 File "${AFS_BUILD_INCDIR}\rx\xdr.h"
1282 File "${AFS_BUILD_INCDIR}\rx\rxkad.h"
1287 SetOutPath "$INSTDIR\Client\Program\Sample"
1288 File "..\..\afsd\sample\token.c"
1290 ;Store install folder
1291 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS SDK" "" $INSTDIR
1292 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "VersionString" ${AFS_VERSION}
1293 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
1294 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
1295 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
1296 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
1297 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
1298 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
1299 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS SDK\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
1301 WriteUninstaller "$INSTDIR\Uninstall.exe"
1302 SetOutPath "$SMPROGRAMS\OpenAFS"
1303 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
1305 Call AFSCommon.Install
1308 ;Display the Finish header
1309 ;Insert this macro after the sections if you are not using a finish page
1310 ;!insertmacro MUI_SECTIONS_FINISHHEADER
1312 ;--------------------------------
1313 ;Installer Functions
1317 !insertmacro MUI_LANGDLL_DISPLAY
1319 ; Set the default install options
1324 StrCmp $R0 "true" contInstall
1326 MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "You must be an administrator of this machine to install this software."
1330 ; Our logic should be like this.
1331 ; 1) If no AFS components are installed, we do a clean install with default options. (Client/Docs)
1332 ; 2) If existing modules are installed, we keep them selected
1333 ; 3) If it is an upgrade, we set the text accordingly, else we mark it as a re-install
1335 Call IsAnyAFSInstalled
1337 StrCmp $R0 "0" DefaultOptions
1339 Call ShouldClientInstall
1342 ; Check if it was an IBM/Transarc version
1343 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "DisplayName"
1344 StrCmp $R0 "IBM AFS Client" DoIBM
1345 StrCmp $R0 "Transarc AFS Client" DoIBM
1348 StrCmp $R2 "0" NoClient
1349 StrCmp $R2 "1" ReinstallClient
1350 StrCmp $R2 "2" UpgradeClient
1351 StrCmp $R2 "3" DowngradeClient
1354 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\AFS Client\CurrentVersion" "MajorVersion"
1355 StrCmp $R0 "3" +1 NotIBM
1360 SectionGetFlags ${secClient} $0
1361 IntOp $0 $0 | ${SF_SELECTED}
1362 SectionSetFlags ${secClient} $0
1363 ;# !insertmacro SelectSection ${secClient}
1366 ;StrCpy $1 ${secClient} ; Gotta remember which section we are at now...
1367 SectionGetFlags ${secClient} $0
1368 IntOp $0 $0 & ${SECTION_OFF}
1369 SectionSetFlags ${secClient} $0
1372 SectionGetFlags ${secClient} $0
1373 IntOp $0 $0 | ${SF_SELECTED}
1374 SectionSetFlags ${secClient} $0
1375 SectionSetText ${secClient} $(UPGRADE_CLIENT)
1378 SectionGetFlags ${secClient} $0
1379 IntOp $0 $0 | ${SF_SELECTED}
1380 SectionSetFlags ${secClient} $0
1381 SectionSetText ${secClient} $(REINSTALL_CLIENT)
1384 SectionGetFlags ${secClient} $0
1385 IntOp $0 $0 | ${SF_SELECTED}
1386 SectionSetFlags ${secClient} $0
1387 SectionSetText ${secClient} $(REINSTALL_CLIENT)
1393 Call ShouldServerInstall
1395 StrCmp $R2 "0" NoServer
1396 StrCmp $R2 "1" ReinstallServer
1397 StrCmp $R2 "2" UpgradeServer
1398 StrCmp $R2 "3" DowngradeServer
1400 SectionGetFlags ${secServer} $0
1401 IntOp $0 $0 | ${SF_SELECTED}
1402 SectionSetFlags ${secServer} $0
1403 ;# !insertmacro UnselectSection ${secServer}
1407 SectionGetFlags ${secServer} $0
1408 IntOp $0 $0 | ${SF_SELECTED}
1409 SectionSetFlags ${secServer} $0
1410 SectionSetText ${secServer} $(UPGRADE_SERVER)
1414 SectionGetFlags ${secServer} $0
1415 IntOp $0 $0 | ${SF_SELECTED}
1416 SectionSetFlags ${secServer} $0
1417 SectionSetText ${secServer} $(REINSTALL_SERVER)
1421 SectionGetFlags ${secServer} $0
1422 IntOp $0 $0 | ${SF_SELECTED}
1423 SectionSetFlags ${secServer} $0
1424 SectionSetText ${secServer} $(REINSTALL_SERVER)
1428 SectionGetFlags ${secServer} $0
1429 IntOp $0 $0 & ${SECTION_OFF}
1430 SectionSetFlags ${secServer} $0
1431 ;# !insertmacro UnselectSection ${secServer}
1435 ; Check control center
1436 Call IsControlInstalled
1438 StrCmp $R2 "0" NoControl
1440 SectionGetFlags ${secControl} $0
1441 IntOp $0 $0 | ${SF_SELECTED}
1442 SectionSetFlags ${secControl} $0
1446 SectionGetFlags ${secControl} $0
1447 IntOp $0 $0 & ${SECTION_OFF}
1448 SectionSetFlags ${secControl} $0
1449 ;# !insertmacro UnselectSection ${secControl}
1452 ; Check Documentation
1453 Call IsDocumentationInstalled
1455 StrCmp $R2 "0" NoDocs
1456 SectionGetFlags ${secDocs} $0
1457 IntOp $0 $0 | ${SF_SELECTED}
1458 SectionSetFlags ${secDocs} $0
1462 SectionGetFlags ${secDocs} $0
1463 IntOp $0 $0 & ${SECTION_OFF}
1464 SectionSetFlags ${secDocs} $0
1467 ; To check the SDK, we simply look to see if the files exist. If they do,
1468 ; the SDK is installed. If not, we don't need to push it on the user.
1469 ; If they are there, we want to make sure they match the installed version.
1471 IfFileExists "$INSTDIR\Client\Program\Include\main.h" +1 NoSDK
1472 SectionGetFlags ${secSDK} $0
1473 IntOp $0 $0 | ${SF_SELECTED}
1474 SectionSetFlags ${secSDK} $0
1478 SectionGetFlags ${secSDK} $0
1479 IntOp $0 $0 & ${SECTION_OFF}
1480 SectionSetFlags ${secSDK} $0
1485 SectionGetFlags ${secClient} $0
1486 IntOp $0 $0 | ${SF_SELECTED}
1487 SectionSetFlags ${secClient} $0
1489 ; Server NOT selected
1490 SectionGetFlags ${secServer} $0
1491 IntOp $0 $0 & ${SECTION_OFF}
1492 SectionSetFlags ${secServer} $0
1494 ; Control Center NOT selected
1495 SectionGetFlags ${secControl} $0
1496 IntOp $0 $0 & ${SECTION_OFF}
1497 SectionSetFlags ${secControl} $0
1498 ;# !insertmacro UnselectSection ${secControl}
1500 ; Documentation selected
1501 SectionGetFlags ${secDocs} $0
1502 IntOp $0 $0 | ${SF_SELECTED}
1503 SectionSetFlags ${secDocs} $0
1504 ;# !insertmacro UnselectSection ${secDocs}
1507 SectionGetFlags ${secSDK} $0
1508 IntOp $0 $0 & ${SECTION_OFF}
1509 SectionSetFlags ${secSDK} $0
1510 ;# !insertmacro UnselectSection ${secSDK}
1519 ; See if we can set a default installation path...
1520 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PathName"
1521 StrCmp $R0 "" TryServer
1525 ; Work around bug in 1.3.5000, 1.3.5100, 1.3.5200, 1.3.5201, 1.3.5299 installers...
1526 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MajorVersion"
1527 StrCmp $R0 "1" +1 SkipParent
1528 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MinorVersion"
1529 StrCmp $R0 "3" +1 SkipParent
1530 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PatchLevel"
1531 StrCmp $R0 "5000" UpParent
1532 StrCmp $R0 "5100" UpParent
1533 StrCmp $R0 "5200" UpParent
1534 StrCmp $R0 "5201" UpParent
1535 StrCmp $R0 "5299" UpParent
1547 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PathName"
1548 StrCmp $R0 "" TryControl
1556 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PathName"
1564 File /oname=$0 CellServPage.ini
1566 File /oname=$1 AFSCell.ini
1567 ;File /oname=$1 ConfigURL.ini
1575 ;--------------------------------
1576 ; These are our cleanup functions
1577 Function .onInstFailed
1582 Function .onInstSuccess
1588 ;--------------------------------
1591 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
1592 !insertmacro MUI_DESCRIPTION_TEXT ${secServer} $(DESC_secServer)
1593 !insertmacro MUI_DESCRIPTION_TEXT ${secClient} $(DESC_secClient)
1594 !insertmacro MUI_DESCRIPTION_TEXT ${secControl} $(DESC_secControl)
1595 !insertmacro MUI_DESCRIPTION_TEXT ${secDocs} $(DESC_secDocs)
1596 !insertmacro MUI_DESCRIPTION_TEXT ${secSDK} $(DESC_secSDK)
1597 !insertmacro MUI_FUNCTION_DESCRIPTION_END
1599 ;--------------------------------
1600 ;Uninstaller Section
1603 ; Make sure the user REALLY wants to do this, unless they did a silent uninstall, in which case...let them!
1604 IfSilent StartRemove ; New in v2.0b4
1605 MessageBox MB_YESNO "Are you sure you want to remove OpenAFS from this machine?" IDYES StartRemove
1610 SetShellVarContext all
1611 ; Stop the running processes
1613 File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe"
1614 nsExec::Exec '$R0 afscreds.exe'
1615 Exec "afscreds.exe -z"
1616 ; in case we are upgrading an old version that does not support -z
1618 nsExec::Exec '$R0 afscreds.exe'
1620 nsExec::Exec '$R0 krbcc32s.exe'
1623 ; Delete the AFS service
1625 File /oname=$R0 "${AFS_WININSTALL_DIR}\Service.exe"
1626 nsExec::Exec "net stop TransarcAFSDaemon"
1627 nsExec::Exec "net stop TransarcAFSServer"
1628 nsExec::Exec '$R0 u TransarcAFSDaemon'
1629 ; After we stop the service, but before we delete it, we have to remove the volume data
1630 ; This is because the storage locations are in the registry under the service key.
1631 ; Call un.RemoveAFSVolumes
1632 nsExec::Exec '$R0 u TransarcAFSServer'
1635 Call un.RemoveProvider
1637 Push "$INSTDIR\Client\Program"
1638 Call un.RemoveFromPath
1639 Push "$INSTDIR\Common"
1640 Call un.RemoveFromPath
1642 Push "$INSTDIR\kfw\bin"
1643 Call un.RemoveFromPath
1646 ; Delete documentation
1647 Delete "$INSTDIR\Documentation\README.TXT"
1648 Delete "$INSTDIR\Documentation\html\*"
1649 Delete "$INSTDIR\Documentation\html\CmdRef\*"
1650 Delete "$INSTDIR\Documentation\html\InstallGd\*"
1651 Delete "$INSTDIR\Documentation\html\ReleaseNotes\*"
1652 Delete "$INSTDIR\Documentation\html\SysAdminGd\*"
1654 Delete /REBOOTOK "$INSTDIR\Common\afs_config.exe"
1655 Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.dll"
1656 Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.dll"
1657 Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.dll"
1658 Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.dll"
1659 Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.dll"
1660 Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.dll"
1661 Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.dll"
1662 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll"
1663 Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.dll"
1664 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll"
1665 Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.dll"
1666 Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.dll"
1667 Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.dll"
1668 Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.dll"
1671 Delete /REBOOTOK "$INSTDIR\Common\afs_config.pdb"
1672 Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.pdb"
1673 Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.pdb"
1674 Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.pdb"
1675 Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.pdb"
1676 Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.pdb"
1677 Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.pdb"
1678 Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.pdb"
1679 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.pdb"
1680 Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.pdb"
1681 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.pdb"
1682 Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.pdb"
1683 Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.pdb"
1684 Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.pdb"
1685 Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.pdb"
1688 File "${SYSTEMDIR}\msvcr71d.dll"
1689 File "${SYSTEMDIR}\msvcr71d.pdb"
1690 File "${SYSTEMDIR}\msvcp71d.dll"
1691 File "${SYSTEMDIR}\msvcp71d.pdb"
1692 File "${SYSTEMDIR}\mfc71d.dll"
1693 File "${SYSTEMDIR}\mfc71d.pdb"
1694 File "${SYSTEMDIR}\MFC71CHS.DLL"
1695 File "${SYSTEMDIR}\MFC71CHT.DLL"
1696 File "${SYSTEMDIR}\MFC71DEU.DLL"
1697 File "${SYSTEMDIR}\MFC71ENU.DLL"
1698 File "${SYSTEMDIR}\MFC71ESP.DLL"
1699 File "${SYSTEMDIR}\MFC71FRA.DLL"
1700 File "${SYSTEMDIR}\MFC71ITA.DLL"
1701 File "${SYSTEMDIR}\MFC71JPN.DLL"
1702 File "${SYSTEMDIR}\MFC71KOR.DLL"
1705 File "${SYSTEMDIR}\msvcr70d.dll"
1706 File "${SYSTEMDIR}\msvcr70d.pdb"
1707 File "${SYSTEMDIR}\msvcp70d.dll"
1708 File "${SYSTEMDIR}\msvcp70d.pdb"
1709 File "${SYSTEMDIR}\mfc70d.dll"
1710 File "${SYSTEMDIR}\mfc70d.pdb"
1711 File "${SYSTEMDIR}\MFC70CHS.DLL"
1712 File "${SYSTEMDIR}\MFC70CHT.DLL"
1713 File "${SYSTEMDIR}\MFC70DEU.DLL"
1714 File "${SYSTEMDIR}\MFC70ENU.DLL"
1715 File "${SYSTEMDIR}\MFC70ESP.DLL"
1716 File "${SYSTEMDIR}\MFC70FRA.DLL"
1717 File "${SYSTEMDIR}\MFC70ITA.DLL"
1718 File "${SYSTEMDIR}\MFC70JPN.DLL"
1719 File "${SYSTEMDIR}\MFC70KOR.DLL"
1721 File "${SYSTEMDIR}\mfc42d.dll"
1722 File "${SYSTEMDIR}\mfc42d.pdb"
1723 File "${SYSTEMDIR}\msvcp60d.dll"
1724 File "${SYSTEMDIR}\msvcp60d.pdb"
1725 File "${SYSTEMDIR}\msvcrtd.dll"
1726 File "${SYSTEMDIR}\msvcrtd.pdb"
1731 File "${SYSTEMDIR}\mfc71.dll"
1732 File "${SYSTEMDIR}\msvcr71.dll"
1733 File "${SYSTEMDIR}\msvcp71.dll"
1734 File "${SYSTEMDIR}\MFC71CHS.DLL"
1735 File "${SYSTEMDIR}\MFC71CHT.DLL"
1736 File "${SYSTEMDIR}\MFC71DEU.DLL"
1737 File "${SYSTEMDIR}\MFC71ENU.DLL"
1738 File "${SYSTEMDIR}\MFC71ESP.DLL"
1739 File "${SYSTEMDIR}\MFC71FRA.DLL"
1740 File "${SYSTEMDIR}\MFC71ITA.DLL"
1741 File "${SYSTEMDIR}\MFC71JPN.DLL"
1742 File "${SYSTEMDIR}\MFC71KOR.DLL"
1745 File "${SYSTEMDIR}\mfc70.dll"
1746 File "${SYSTEMDIR}\msvcr70.dll"
1747 File "${SYSTEMDIR}\msvcp70.dll"
1748 File "${SYSTEMDIR}\MFC70CHS.DLL"
1749 File "${SYSTEMDIR}\MFC70CHT.DLL"
1750 File "${SYSTEMDIR}\MFC70DEU.DLL"
1751 File "${SYSTEMDIR}\MFC70ENU.DLL"
1752 File "${SYSTEMDIR}\MFC70ESP.DLL"
1753 File "${SYSTEMDIR}\MFC70FRA.DLL"
1754 File "${SYSTEMDIR}\MFC70ITA.DLL"
1755 File "${SYSTEMDIR}\MFC70JPN.DLL"
1756 File "${SYSTEMDIR}\MFC70KOR.DLL"
1758 File "${SYSTEMDIR}\mfc42.dll"
1759 File "${SYSTEMDIR}\msvcp60.dll"
1760 File "${SYSTEMDIR}\msvcrt.dll"
1766 ; IfFileExists "$WINDIR\afsdcell.ini" CellExists SkipDelAsk
1768 MessageBox MB_YESNO "Would you like to keep your configuration files?" IDYES SkipDel
1770 Delete "$WINDIR\afsdcell.ini"
1772 Delete "$WINDIR\afsdsbmt.ini"
1773 ; Only remove krb5.ini if KfW was installed
1775 Delete "$WINDIR\krb5.ini"
1777 Delete "$WINDIR\afsdns.ini"
1778 Delete "$WINDIR\afs_freelance.ini"
1781 Delete "$WINDIR\afsd_init.log"
1782 Delete "$INSTDIR\Uninstall.exe"
1785 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.exe"
1786 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe"
1787 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe"
1788 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.exe"
1789 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.exe"
1790 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.exe"
1791 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.exe"
1792 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.exe"
1793 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.exe"
1794 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.exe"
1795 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\salvager.exe"
1796 Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.dll"
1797 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\upclient.exe"
1798 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\upserver.exe"
1799 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\vlserver.exe"
1800 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\volinfo.exe"
1801 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\volserver.exe"
1804 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.pdb"
1805 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.pdb"
1806 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.pdb"
1807 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.pdb"
1808 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.pdb"
1809 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.pdb"
1810 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.pdb"
1811 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.pdb"
1812 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.pdb"
1813 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.pdb"
1814 Delete "$INSTDIR\Server\usr\afs\bin\salvager.pdb"
1815 Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.pdb"
1816 Delete "$INSTDIR\Server\usr\afs\bin\upclient.pdb"
1817 Delete "$INSTDIR\Server\usr\afs\bin\upserver.pdb"
1818 Delete "$INSTDIR\Server\usr\afs\bin\vlserver.pdb"
1819 Delete "$INSTDIR\Server\usr\afs\bin\volinfo.pdb"
1820 Delete "$INSTDIR\Server\usr\afs\bin\volserver.pdb"
1823 RMDir /r "$INSTDIR\Server\usr\afs\bin"
1824 RmDir /r "$INSTDIR\Server\usr\afs\etc\logs"
1825 RmDir /r "$INSTDIR\Server\usr\afs\etc"
1826 RmDir /r "$INSTDIR\Server\usr\afs\local"
1827 RMDIR /r "$INSTDIR\Server\usr\afs\logs"
1829 Delete /REBOOTOK "$SYSDIR\afsserver.cpl"
1830 Delete /REBOOTOK "$SYSDIR\afs_cpa.cpl"
1833 Delete /REBOOTOK "$SYSDIR\afsserver.pdb"
1834 Delete /REBOOTOK "$SYSDIR\afs_cpa.pdb"
1837 RMDir /r "$INSTDIR\Documentation\html\CmdRef"
1838 RMDir /r "$INSTDIR\Documentation\html\InstallGd"
1839 RMDir /r "$INSTDIR\Documentation\html\ReleaseNotes"
1840 RMDir /r "$INSTDIR\Documentation\html\SysAdminGd"
1841 RMDIr /r "$INSTDIR\Documentation\html"
1843 RMDir "$INSTDIR\Documentation"
1844 ; Delete DOC short cut
1845 Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.exe"
1848 Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.pdb"
1851 Delete /REBOOTOK "$INSTDIR\Client\Program\*"
1852 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\*"
1853 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\afs\*"
1854 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\rx\*"
1855 Delete /REBOOTOK "$INSTDIR\Client\Program\Sample\*"
1856 RMDir "$INSTDIR\Client\Program\Sample"
1857 RMDir "$INSTDIR\Client\Program\Include\afs"
1858 RMDir "$INSTDIR\Client\Program\Include\rx"
1859 RMDir "$INSTDIR\Client\Program\Include"
1860 RMDir "$INSTDIR\Client\Program"
1861 RMDir "$INSTDIR\Client"
1865 File "${SYSTEMDIR}\msvcr71d.dll"
1866 File "${SYSTEMDIR}\msvcr71d.pdb"
1867 File "${SYSTEMDIR}\msvcp71d.dll"
1868 File "${SYSTEMDIR}\msvcp71d.pdb"
1869 File "${SYSTEMDIR}\mfc71d.dll"
1870 File "${SYSTEMDIR}\mfc71d.pdb"
1871 File "${SYSTEMDIR}\MFC71CHS.DLL"
1872 File "${SYSTEMDIR}\MFC71CHT.DLL"
1873 File "${SYSTEMDIR}\MFC71DEU.DLL"
1874 File "${SYSTEMDIR}\MFC71ENU.DLL"
1875 File "${SYSTEMDIR}\MFC71ESP.DLL"
1876 File "${SYSTEMDIR}\MFC71FRA.DLL"
1877 File "${SYSTEMDIR}\MFC71ITA.DLL"
1878 File "${SYSTEMDIR}\MFC71JPN.DLL"
1879 File "${SYSTEMDIR}\MFC71KOR.DLL"
1882 File "${SYSTEMDIR}\msvcr70d.dll"
1883 File "${SYSTEMDIR}\msvcr70d.pdb"
1884 File "${SYSTEMDIR}\msvcp70d.dll"
1885 File "${SYSTEMDIR}\msvcp70d.pdb"
1886 File "${SYSTEMDIR}\mfc70d.dll"
1887 File "${SYSTEMDIR}\mfc70d.pdb"
1888 File "${SYSTEMDIR}\MFC70CHS.DLL"
1889 File "${SYSTEMDIR}\MFC70CHT.DLL"
1890 File "${SYSTEMDIR}\MFC70DEU.DLL"
1891 File "${SYSTEMDIR}\MFC70ENU.DLL"
1892 File "${SYSTEMDIR}\MFC70ESP.DLL"
1893 File "${SYSTEMDIR}\MFC70FRA.DLL"
1894 File "${SYSTEMDIR}\MFC70ITA.DLL"
1895 File "${SYSTEMDIR}\MFC70JPN.DLL"
1896 File "${SYSTEMDIR}\MFC70KOR.DLL"
1898 File "${SYSTEMDIR}\mfc42d.dll"
1899 File "${SYSTEMDIR}\mfc42d.pdb"
1900 File "${SYSTEMDIR}\msvcp60d.dll"
1901 File "${SYSTEMDIR}\msvcp60d.pdb"
1902 File "${SYSTEMDIR}\msvcrtd.dll"
1903 File "${SYSTEMDIR}\msvcrtd.pdb"
1908 File "${SYSTEMDIR}\mfc71.dll"
1909 File "${SYSTEMDIR}\msvcr71.dll"
1910 File "${SYSTEMDIR}\msvcp71.dll"
1911 File "${SYSTEMDIR}\MFC71CHS.DLL"
1912 File "${SYSTEMDIR}\MFC71CHT.DLL"
1913 File "${SYSTEMDIR}\MFC71DEU.DLL"
1914 File "${SYSTEMDIR}\MFC71ENU.DLL"
1915 File "${SYSTEMDIR}\MFC71ESP.DLL"
1916 File "${SYSTEMDIR}\MFC71FRA.DLL"
1917 File "${SYSTEMDIR}\MFC71ITA.DLL"
1918 File "${SYSTEMDIR}\MFC71JPN.DLL"
1919 File "${SYSTEMDIR}\MFC71KOR.DLL"
1922 File "${SYSTEMDIR}\mfc70.dll"
1923 File "${SYSTEMDIR}\msvcr70.dll"
1924 File "${SYSTEMDIR}\msvcp70.dll"
1925 File "${SYSTEMDIR}\MFC70CHS.DLL"
1926 File "${SYSTEMDIR}\MFC70CHT.DLL"
1927 File "${SYSTEMDIR}\MFC70DEU.DLL"
1928 File "${SYSTEMDIR}\MFC70ENU.DLL"
1929 File "${SYSTEMDIR}\MFC70ESP.DLL"
1930 File "${SYSTEMDIR}\MFC70FRA.DLL"
1931 File "${SYSTEMDIR}\MFC70ITA.DLL"
1932 File "${SYSTEMDIR}\MFC70JPN.DLL"
1933 File "${SYSTEMDIR}\MFC70KOR.DLL"
1935 File "${SYSTEMDIR}\mfc42.dll"
1936 File "${SYSTEMDIR}\msvcp60.dll"
1937 File "${SYSTEMDIR}\msvcrt.dll"
1941 Delete /REBOOTOK "$INSTDIR\Common\*"
1942 RMDir "$INSTDIR\Common"
1946 Delete /REBOOTOK "$INSTDIR\kfw\bin\*"
1947 RMDIR /r "$INSTDIR\kfw\bin"
1948 Delete /REBOOTOK "$INSTDIR\kfw\doc\*"
1949 RMDIR /r "$INSTDIR\kfw\doc"
1950 RMDIR /r "$INSTDIR\kfw"
1953 Delete "$SMPROGRAMS\OpenAFS\Documentation.lnk"
1955 ; Remove control center
1956 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.exe"
1957 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.exe"
1958 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.exe"
1959 Delete /REBOOTOK "$INSTDIR\Control Center\CCUninst.dll"
1961 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.pdb"
1962 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.pdb"
1963 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.pdb"
1965 RMDir "$INSTDIR\Control Center"
1967 Delete "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk"
1968 Delete "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk"
1969 Delete "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk"
1970 Delete "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk"
1971 RMDIR "$SMPROGRAMS\OpenAFS\Control Center"
1972 RMDir /r "$SMPROGRAMS\OpenAFS\Client"
1973 RMDir /r "$SMPROGRAMS\OpenAFS"
1974 Delete "$SMSTARTUP\AFS Credentials.lnk"
1976 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "CachePath"
1978 Delete "$R0\AFSCache"
1979 Delete "C:\AFSCache"
1981 DeleteRegKey HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension"
1982 DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32"
1983 DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
1984 DeleteRegKey HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension"
1985 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
1987 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
1988 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client"
1989 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion"
1990 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation"
1991 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion"
1992 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Control Center"
1993 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
1994 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server"
1995 DeleteRegKey /ifempty HKLM "${AFS_REGKEY_ROOT}"
1996 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS"
1997 DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled"
2003 ;--------------------------------
2004 ;Uninstaller Functions
2008 ;Get language from registry
2009 ReadRegStr $LANGUAGE HKCU "Software\OpenAFS\AFS" "Installer Language"
2013 Function un.onUninstSuccess
2015 MessageBox MB_OK "Please reboot your machine to complete uninstallation of the software"
2019 ;------------------------------
2020 ; Get the CellServDB file from the Internet
2022 Function afs.GetCellServDB
2024 ;Check if we should download CellServDB
2025 ReadINIStr $R0 $0 "Field 4" "State"
2026 StrCmp $R0 "1" DoDownload
2028 ;Do nothing if we're keeping the existing file
2029 ReadINIStr $R0 $0 "Field 2" "State"
2032 ReadINIStr $R0 $0 "Field 6" "State"
2033 StrCmp $R0 "1" CheckOther
2035 ReadINIStr $R0 $0 "Field 3" "State"
2036 StrCmp $R0 "1" UsePackaged
2038 ; If none of these, grab file from other location
2042 ReadINIStr $R0 $0 "Field 5" "State"
2043 NSISdl::download $R0 "$WINDIR\afsdcell.ini"
2044 Pop $R0 ;Get the return value
2045 StrCmp $R0 "success" +2
2046 MessageBox MB_OK|MB_ICONSTOP "Download failed: $R0"
2050 SetOutPath "$WINDIR"
2055 ReadINIStr $R0 $0 "Field 7" "State"
2057 CopyFiles $R0 "$WINDIR\afsdcell.ini"
2063 Function AddProvider
2066 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder" "ProviderOrder"
2068 StrCpy $R0 "TransarcAFSDaemon"
2072 StrCmp $R0 "" +1 DoOther
2073 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder" "ProviderOrder"
2074 StrCpy $R0 "$R1,TransarcAFSDaemon"
2075 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder" "ProviderOrder" $R0
2077 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order" "ProviderOrder"
2079 StrCpy $R0 "TransarcAFSDaemon"
2083 StrCmp $R0 "" +1 End
2084 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order" "ProviderOrder"
2085 StrCpy $R0 "$R1,TransarcAFSDaemon"
2086 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order" "ProviderOrder" $R0
2092 Function un.RemoveProvider
2094 StrCpy $R0 "TransarcAFSDaemon"
2096 StrCpy $R0 "SYSTEM\CurrentControlSet\Control\NetworkProvider\HWOrder"
2097 Call un.RemoveFromProvider
2098 StrCpy $R0 "TransarcAFSDaemon"
2100 StrCpy $R0 "SYSTEM\CurrentControlSet\Control\NetworkProvider\Order"
2101 Call un.RemoveFromProvider
2105 Function un.RemoveFromProvider
2114 ReadRegStr $1 HKLM "$R0" "ProviderOrder"
2115 StrCpy $5 $1 1 -1 # copy last char
2116 StrCmp $5 "," +2 # if last char != ,
2117 StrCpy $1 "$1," # append ,
2120 Call un.StrStr ; Find `$0,` in $1
2121 Pop $2 ; pos of our dir
2122 StrCmp $2 "" unRemoveFromPath_done
2123 ; else, it is in path
2128 StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
2129 StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
2132 StrCpy $5 $3 1 -1 # copy last char
2133 StrCmp $5 "," 0 +2 # if last char == ,
2134 StrCpy $3 $3 -1 # remove last char
2136 WriteRegStr HKLM "$R0" "ProviderOrder" $3
2138 unRemoveFromPath_done:
2148 Function CheckPathForAFS
2153 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
2162 IfFileExists "$3\afsd_service.exe" Error
2163 StrCpy $1 $0 32768 1
2165 IntCmp $2 0 Done Done loop
2168 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."
2169 Abort "Unable to install OpenAFS"
2177 Function AddToUniquePath
2181 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
2185 StrCmp $R0 "" +1 Done
2191 ;-------------------------------
2192 ;Do the page to get the CellServDB
2194 Function AFSPageGetCellServDB
2195 ; Skip this page if we are not installing the client
2196 SectionGetFlags ${secClient} $R0
2197 IntOp $R0 $R0 & ${SF_SELECTED}
2200 ; Set the install options here
2203 WriteINIStr $0 "Field 2" "Flags" "DISABLED"
2204 WriteINIStr $0 "Field 3" "State" "1"
2205 WriteINISTR $0 "Field 4" "State" "0"
2206 WriteINIStr $0 "Field 6" "State" "0"
2208 ; If there is an existing afsdcell.ini file, allow the user to choose it and make it default
2209 IfFileExists "$WINDIR\afsdcell.ini" +1 notpresent
2210 WriteINIStr $0 "Field 2" "Flags" "ENABLED"
2211 WriteINIStr $0 "Field 2" "State" "1"
2212 WriteINIStr $0 "Field 3" "State" "0"
2216 !insertmacro MUI_HEADER_TEXT "CellServDB Configuration" "Please choose a method for installing the CellServDB file:"
2217 InstallOptions::dialog $0
2219 StrCmp $R1 "cancel" exit
2220 StrCmp $R1 "back" done
2221 StrCmp $R1 "success" done
2225 ; Check that if a file is set, a valid filename is entered...
2226 ReadINIStr $R0 $0 "Field 6" "State"
2227 StrCmp $R0 "1" CheckFileName
2229 ;Check if a URL is specified, one *IS* specified
2230 ReadINIStr $R0 $0 "Field 4" "State"
2231 StrCmp $R0 "1" CheckURL Skip
2234 ReadINIStr $R0 $0 "Field 5" "State"
2235 StrCmp $R0 "" +1 Skip
2236 MessageBox MB_OK|MB_ICONSTOP $(URLError)
2237 WriteINIStr $0 "Field 4" "State" "0"
2241 ReadINIStr $R0 $0 "Field 7" "State"
2242 IfFileExists $R0 Skip
2244 MessageBox MB_OK|MB_ICONSTOP $(CellError)
2245 WriteINIStr $0 "Field 6" "State" "0"
2253 Function AFSPageGetCellName
2255 ; Skip this page if we are not installing the client
2256 SectionGetFlags ${secClient} $R0
2257 IntOp $R0 $R0 & ${SF_SELECTED}
2261 ; If this is a server install, we do NOT want to recommend the Freelance client
2262 ; And we do not need to ask for the cell name.
2263 SectionGetFlags ${secServer} $R1
2264 IntOp $R1 $R1 & ${SF_SELECTED}
2265 StrCmp $R1 "1" +1 NotServer
2266 WriteINIStr $1 "Field 6" "Text" "Enable AFS Freelance client (Not Recommended for servers)"
2267 WriteINIStr $1 "Field 5" "State" "0"
2268 WriteINIStr $1 "Field 1" "Flags" "DISABLED"
2269 WriteINIStr $1 "Field 2" "Flags" "DISABLED"
2272 WriteINIStr $1 "Field 6" "Text" "Enable AFS Freelance client (Recommended)"
2273 WriteINIStr $1 "Field 5" "State" "1"
2274 WriteINIStr $1 "Field 1" "Flags" ""
2275 WriteINIStr $1 "Field 2" "Flags" ""
2277 ; Get the current cell name, if any
2278 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell"
2280 WriteINIStr $1 "Field 2" "State" $R1
2281 !insertmacro MUI_HEADER_TEXT "Client Cell Name Configuration" "Please enter the name for your default cell:"
2282 InstallOptions::dialog $1
2284 StrCmp $R1 "cancel" exit
2285 StrCmp $R1 "back" done
2286 StrCmp $R1 "success" done
2289 ReadINIStr $R0 $1 "Field 2" "State"
2290 StrCmp $R0 "" +1 good
2292 MessageBox MB_OK|MB_ICONSTOP $(CellNameError)
2298 ; Common install routines for each module
2299 Function AFSCommon.Install
2301 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayName" "OpenAFS for Windows"
2302 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "UninstallString" "$INSTDIR\uninstall.exe"
2304 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayVersion" "${AFS_VERSION}"
2306 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayVersion" "${AFS_VERSION} Checked/Debug"
2308 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "URLInfoAbout" "http://www.openafs.org/"
2313 ;-------------------
2314 ; Get the currently installed version and place it on the stack
2316 Function GetInstalledVersion
2321 ReadRegStr $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "VersionString"
2322 StrCmp $R0 "" NotTransarc done
2326 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "VersionString"
2335 ; Functions to get each component of the version number
2336 Function GetInstalledVersionMajor
2341 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "MajorVersion"
2342 StrCmp $R0 "" NotTransarc done
2346 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "MajorVersion"
2355 Function GetInstalledVersionMinor
2360 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "MinorVersion"
2361 StrCmp $R0 "" NotTransarc done
2365 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "MinorVersion"
2374 Function GetInstalledVersionPatch
2379 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "PatchLevel"
2380 StrCmp $R0 "" NotTransarc done
2384 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "PatchLevel"
2395 ;-------------------------------
2396 ; Check if the client should be checked for default install
2397 Function ShouldClientInstall
2399 StrCpy $R2 "AFS Client"
2400 Call GetInstalledVersion
2403 StrCmp $R0 "" NotInstalled
2404 ; Now we see if it's an older or newer version
2406 Call GetInstalledVersionMajor
2408 IntCmpU $R0 ${AFS_MAJORVERSION} +1 Upgrade Downgrade
2410 Call GetInstalledVersionMinor
2412 IntCmpU $R0 ${AFS_MINORVERSION} +1 Upgrade Downgrade
2414 Call GetInstalledVersionPatch
2416 IntCmpU $R0 ${AFS_PATCHLEVEL} Reinstall Upgrade Downgrade
2439 ;-------------------------------
2440 ; Check how the server options should be set
2441 Function ShouldServerInstall
2443 StrCpy $R2 "AFS Server"
2444 Call GetInstalledVersion
2447 StrCmp $R0 "" NotInstalled
2448 ; Now we see if it's an older or newer version
2450 Call GetInstalledVersionMajor
2452 IntCmpU $R0 ${AFS_MAJORVERSION} +1 Upgrade Downgrade
2454 Call GetInstalledVersionMinor
2456 IntCmpU $R0 ${AFS_MINORVERSION} +1 Upgrade Downgrade
2458 Call GetInstalledVersionPatch
2460 IntCmpU $R0 ${AFS_PATCHLEVEL} Reinstall Upgrade Downgrade
2485 ; See if AFS Server is installed
2486 ; Returns: "1" if it is, 0 if it is not (on the stack)
2487 Function IsServerInstalled
2489 StrCpy $R2 "AFS Server"
2490 Call GetInstalledVersion
2493 StrCmp $R0 "" NotInstalled
2506 ; See if AFS Client is installed
2507 ; Returns: "1" if it is, 0 if it is not (on the stack)
2508 Function IsClientInstalled
2510 StrCpy $R2 "AFS Client"
2511 Call GetInstalledVersion
2514 StrCmp $R0 "" NotInstalled
2528 ; See if AFS Documentation is installed
2529 ; Returns: "1" if it is, 0 if it is not (on the stack)
2530 Function IsDocumentationInstalled
2532 StrCpy $R2 "AFS Supplemental Documentation"
2533 Call GetInstalledVersion
2536 StrCmp $R0 "" NotInstalled
2549 ; See if Control Center is installed
2550 ; Returns: "1" if it is, 0 if it is not (on the stack)
2551 Function IsControlInstalled
2553 StrCpy $R2 "AFS Control Center"
2554 Call GetInstalledVersion
2557 StrCmp $R0 "" NotInstalled
2572 ; output, top of stack (replaces, with e.g. whatever)
2573 ; modifies no other variables.
2575 Function GetParameters
2579 StrCpy $R0 $CMDLINE 1
2583 StrCpy $R1 ' ' ; we're scanning for a space instead of a quote
2585 StrCpy $R0 $CMDLINE 1 $R2
2586 StrCmp $R0 $R1 loop2
2592 StrCpy $R0 $CMDLINE 1 $R2
2593 StrCmp $R0 " " loop2
2594 StrCpy $R0 $CMDLINE "" $R2
2601 ;Check to see if any AFS component is installed
2602 ;Returns: Value on stack: "1" if it is, "0" if it is not
2603 Function IsAnyAFSInstalled
2608 Call IsClientInstalled
2610 Call IsServerInstalled
2612 Call IsControlInstalled
2614 Call IsDocumentationInstalled
2616 ; Now we must see if ANY of the $Rn values are 1
2617 StrCmp $R0 "1" SomethingInstalled
2618 StrCmp $R1 "1" SomethingInstalled
2619 StrCmp $R2 "1" SomethingInstalled
2620 StrCmp $R3 "1" SomethingInstalled
2634 ;Install English Language Files
2635 Function AFSLangFiles
2637 SetOutPath "$INSTDIR\Common"
2638 File "${AFS_CLIENT_BUILDDIR}\afs_config.exe"
2639 File "${AFS_SERVER_BUILDDIR}\afsadminutil.dll"
2640 !insertmacro UpgradeDLL "${AFS_DESTDIR}\lib\afsauthent.dll" "$INSTDIR\Common\afsauthent.dll" "$INSTDIR"
2641 !insertmacro UpgradeDLL "${AFS_DESTDIR}\lib\afspthread.dll" "$INSTDIR\Common\afspthread.dll" "$INSTDIR"
2642 !insertmacro UpgradeDLL "${AFS_DESTDIR}\lib\afsrpc.dll" "$INSTDIR\Common\afsrpc.dll" "$INSTDIR"
2643 File "${AFS_SERVER_BUILDDIR}\afsclientadmin.dll"
2644 File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.dll"
2645 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
2646 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.dll"
2647 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
2648 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll"
2649 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
2650 File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
2651 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
2655 File "${SYSTEMDIR}\msvcr71d.dll"
2656 File "${SYSTEMDIR}\msvcr71d.pdb"
2657 File "${SYSTEMDIR}\msvcp71d.dll"
2658 File "${SYSTEMDIR}\msvcp71d.pdb"
2659 File "${SYSTEMDIR}\mfc71d.dll"
2660 File "${SYSTEMDIR}\mfc71d.pdb"
2661 File "${SYSTEMDIR}\MFC71CHS.DLL"
2662 File "${SYSTEMDIR}\MFC71CHT.DLL"
2663 File "${SYSTEMDIR}\MFC71DEU.DLL"
2664 File "${SYSTEMDIR}\MFC71ENU.DLL"
2665 File "${SYSTEMDIR}\MFC71ESP.DLL"
2666 File "${SYSTEMDIR}\MFC71FRA.DLL"
2667 File "${SYSTEMDIR}\MFC71ITA.DLL"
2668 File "${SYSTEMDIR}\MFC71JPN.DLL"
2669 File "${SYSTEMDIR}\MFC71KOR.DLL"
2672 File "${SYSTEMDIR}\msvcr70d.dll"
2673 File "${SYSTEMDIR}\msvcr70d.pdb"
2674 File "${SYSTEMDIR}\msvcp70d.dll"
2675 File "${SYSTEMDIR}\msvcp70d.pdb"
2676 File "${SYSTEMDIR}\mfc70d.dll"
2677 File "${SYSTEMDIR}\mfc70d.pdb"
2678 File "${SYSTEMDIR}\MFC70CHS.DLL"
2679 File "${SYSTEMDIR}\MFC70CHT.DLL"
2680 File "${SYSTEMDIR}\MFC70DEU.DLL"
2681 File "${SYSTEMDIR}\MFC70ENU.DLL"
2682 File "${SYSTEMDIR}\MFC70ESP.DLL"
2683 File "${SYSTEMDIR}\MFC70FRA.DLL"
2684 File "${SYSTEMDIR}\MFC70ITA.DLL"
2685 File "${SYSTEMDIR}\MFC70JPN.DLL"
2686 File "${SYSTEMDIR}\MFC70KOR.DLL"
2688 File "${SYSTEMDIR}\mfc42d.dll"
2689 File "${SYSTEMDIR}\mfc42d.pdb"
2690 File "${SYSTEMDIR}\msvcp60d.dll"
2691 File "${SYSTEMDIR}\msvcp60d.pdb"
2692 File "${SYSTEMDIR}\msvcrtd.dll"
2693 File "${SYSTEMDIR}\msvcrtd.pdb"
2698 File "${SYSTEMDIR}\mfc71.dll"
2699 File "${SYSTEMDIR}\msvcr71.dll"
2700 File "${SYSTEMDIR}\msvcp71.dll"
2701 File "${SYSTEMDIR}\MFC71CHS.DLL"
2702 File "${SYSTEMDIR}\MFC71CHT.DLL"
2703 File "${SYSTEMDIR}\MFC71DEU.DLL"
2704 File "${SYSTEMDIR}\MFC71ENU.DLL"
2705 File "${SYSTEMDIR}\MFC71ESP.DLL"
2706 File "${SYSTEMDIR}\MFC71FRA.DLL"
2707 File "${SYSTEMDIR}\MFC71ITA.DLL"
2708 File "${SYSTEMDIR}\MFC71JPN.DLL"
2709 File "${SYSTEMDIR}\MFC71KOR.DLL"
2712 File "${SYSTEMDIR}\mfc70.dll"
2713 File "${SYSTEMDIR}\msvcr70.dll"
2714 File "${SYSTEMDIR}\msvcp70.dll"
2715 File "${SYSTEMDIR}\MFC70CHS.DLL"
2716 File "${SYSTEMDIR}\MFC70CHT.DLL"
2717 File "${SYSTEMDIR}\MFC70DEU.DLL"
2718 File "${SYSTEMDIR}\MFC70ENU.DLL"
2719 File "${SYSTEMDIR}\MFC70ESP.DLL"
2720 File "${SYSTEMDIR}\MFC70FRA.DLL"
2721 File "${SYSTEMDIR}\MFC70ITA.DLL"
2722 File "${SYSTEMDIR}\MFC70JPN.DLL"
2723 File "${SYSTEMDIR}\MFC70KOR.DLL"
2725 File "${SYSTEMDIR}\mfc42.dll"
2726 File "${SYSTEMDIR}\msvcp60.dll"
2727 File "${SYSTEMDIR}\msvcrt.dll"
2733 File "${AFS_CLIENT_BUILDDIR}\afs_config.pdb"
2734 File "${AFS_SERVER_BUILDDIR}\afsadminutil.pdb"
2735 File "${AFS_DESTDIR}\lib\afsauthent.pdb"
2736 File "${AFS_DESTDIR}\lib\afspthread.pdb"
2737 File "${AFS_DESTDIR}\lib\afsrpc.pdb"
2738 File "${AFS_SERVER_BUILDDIR}\afsclientadmin.pdb"
2739 File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.pdb"
2740 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
2741 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.pdb"
2742 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
2743 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb"
2744 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb"
2745 File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb"
2746 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb"
2749 StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
2750 StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
2751 StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
2752 StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
2753 StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
2754 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
2755 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
2756 StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
2760 SetOutPath "$INSTDIR\Documentation"
2761 File "..\..\doc\install\Documentation\en_US\README.TXT"
2763 SetOutPath "$INSTDIR\Client\Program"
2764 File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.dll"
2765 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.dll" "$INSTDIR\Client\Program\afs_shl_ext_1033.dll" "$INSTDIR"
2767 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.pdb"
2768 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.pdb"
2771 SetOutPath "$INSTDIR\Common"
2772 File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.dll"
2773 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.dll"
2774 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.dll"
2775 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1033.dll"
2776 File "${AFS_SERVER_BUILDDIR}\afsserver_1033.dll"
2777 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.dll"
2778 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.dll"
2779 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.dll"
2780 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.dll"
2781 File "..\..\doc\help\en_US\afs-cc.CNT"
2782 File "..\..\doc\help\en_US\afs-cc.hlp"
2783 File "..\..\doc\help\en_US\afs-light.CNT"
2784 File "..\..\doc\help\en_US\afs-light.hlp"
2785 File "..\..\doc\help\en_US\afs-nt.CNT"
2786 File "..\..\doc\help\en_US\afs-nt.HLP"
2787 File "..\..\doc\help\en_US\taafscfg.CNT"
2788 File "..\..\doc\help\en_US\taafscfg.hlp"
2789 File "..\..\doc\help\en_US\taafssvrmgr.CNT"
2790 File "..\..\doc\help\en_US\taafssvrmgr.hlp"
2791 File "..\..\doc\help\en_US\taafsusrmgr.CNT"
2792 File "..\..\doc\help\en_US\taafsusrmgr.hlp"
2795 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.pdb"
2796 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.pdb"
2797 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.pdb"
2798 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1033.pdb"
2799 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.pdb"
2800 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.pdb"
2801 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.pdb"
2802 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.pdb"
2808 SetOutPath "$INSTDIR\Documentation"
2809 File "..\..\doc\install\Documentation\de_DE\README.TXT"
2811 SetOutPath "$INSTDIR\Client\Program"
2812 File "${AFS_CLIENT_BUILDDIR}\afscreds_1032.dll"
2813 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1032.dll" "$INSTDIR\Client\Program\afs_shl_ext_1032.dll" "$INSTDIR"
2815 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1032.pdb"
2816 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1032.pdb"
2819 SetOutPath "$INSTDIR\Common"
2820 File "${AFS_CLIENT_BUILDDIR}\afs_config_1032.dll"
2821 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.dll"
2822 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1032.dll"
2823 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1032.dll"
2824 File "${AFS_SERVER_BUILDDIR}\afsserver_1032.dll"
2825 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1032.dll"
2826 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1032.dll"
2827 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1032.dll"
2828 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1032.dll"
2829 File "..\..\doc\help\de_DE\afs-cc.CNT"
2830 File "..\..\doc\help\de_DE\afs-cc.hlp"
2831 File "..\..\doc\help\de_DE\afs-light.CNT"
2832 File "..\..\doc\help\de_DE\afs-light.hlp"
2833 File "..\..\doc\help\de_DE\afs-nt.CNT"
2834 File "..\..\doc\help\de_DE\afs-nt.HLP"
2835 File "..\..\doc\help\de_DE\taafscfg.CNT"
2836 File "..\..\doc\help\de_DE\taafscfg.hlp"
2837 File "..\..\doc\help\de_DE\taafssvrmgr.CNT"
2838 File "..\..\doc\help\de_DE\taafssvrmgr.hlp"
2839 File "..\..\doc\help\de_DE\taafsusrmgr.CNT"
2840 File "..\..\doc\help\de_DE\taafsusrmgr.hlp"
2843 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1032.pdb"
2844 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.pdb"
2845 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1032.pdb"
2846 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1032.pdb"
2847 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1032.pdb"
2848 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1032.pdb"
2849 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1032.pdb"
2850 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1032.pdb"
2856 SetOutPath "$INSTDIR\Documentation"
2857 File "..\..\doc\install\Documentation\es_ES\README.TXT"
2859 SetOutPath "$INSTDIR\Client\Program"
2860 File "${AFS_CLIENT_BUILDDIR}\afscreds_1034.dll"
2861 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.dll" "$INSTDIR\Client\Program\afs_shl_ext_1034.dll" "$INSTDIR"
2863 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1034.pdb"
2864 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.pdb"
2867 SetOutPath "$INSTDIR\Common"
2868 File "${AFS_CLIENT_BUILDDIR}\afs_config_1034.dll"
2869 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.dll"
2870 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1034.dll"
2871 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1034.dll"
2872 File "${AFS_SERVER_BUILDDIR}\afsserver_1034.dll"
2873 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1034.dll"
2874 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1034.dll"
2875 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1034.dll"
2876 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1034.dll"
2877 File "..\..\doc\help\es_ES\afs-cc.CNT"
2878 File "..\..\doc\help\es_ES\afs-cc.hlp"
2879 File "..\..\doc\help\es_ES\afs-light.CNT"
2880 File "..\..\doc\help\es_ES\afs-light.hlp"
2881 File "..\..\doc\help\es_ES\afs-nt.CNT"
2882 File "..\..\doc\help\es_ES\afs-nt.HLP"
2883 File "..\..\doc\help\es_ES\taafscfg.CNT"
2884 File "..\..\doc\help\es_ES\taafscfg.hlp"
2885 File "..\..\doc\help\es_ES\taafssvrmgr.CNT"
2886 File "..\..\doc\help\es_ES\taafssvrmgr.hlp"
2887 File "..\..\doc\help\es_ES\taafsusrmgr.CNT"
2888 File "..\..\doc\help\es_ES\taafsusrmgr.hlp"
2891 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1034.pdb"
2892 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.pdb"
2893 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1034.pdb"
2894 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1034.pdb"
2895 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1034.pdb"
2896 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1034.pdb"
2897 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1034.pdb"
2898 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1034.pdb"
2904 SetOutPath "$INSTDIR\Documentation"
2905 File "..\..\doc\install\Documentation\ja_JP\README.TXT"
2907 SetOutPath "$INSTDIR\Client\Program"
2908 File "${AFS_CLIENT_BUILDDIR}\afscreds_1041.dll"
2909 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.dll" "$INSTDIR\Client\Program\afs_shl_ext_1041.dll" "$INSTDIR"
2911 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1041.pdb"
2912 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.pdb"
2915 SetOutPath "$INSTDIR\Common"
2916 File "${AFS_CLIENT_BUILDDIR}\afs_config_1041.dll"
2917 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.dll"
2918 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1041.dll"
2919 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1041.dll"
2920 File "${AFS_SERVER_BUILDDIR}\afsserver_1041.dll"
2921 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1041.dll"
2922 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1041.dll"
2923 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1041.dll"
2924 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1041.dll"
2925 File "..\..\doc\help\ja_JP\afs-cc.CNT"
2926 File "..\..\doc\help\ja_JP\afs-cc.hlp"
2927 File "..\..\doc\help\ja_JP\afs-light.CNT"
2928 File "..\..\doc\help\ja_JP\afs-light.hlp"
2929 File "..\..\doc\help\ja_JP\afs-nt.CNT"
2930 File "..\..\doc\help\ja_JP\afs-nt.HLP"
2931 File "..\..\doc\help\ja_JP\taafscfg.CNT"
2932 File "..\..\doc\help\ja_JP\taafscfg.hlp"
2933 File "..\..\doc\help\ja_JP\taafssvrmgr.CNT"
2934 File "..\..\doc\help\ja_JP\taafssvrmgr.hlp"
2935 File "..\..\doc\help\ja_JP\taafsusrmgr.CNT"
2936 File "..\..\doc\help\ja_JP\taafsusrmgr.hlp"
2939 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1041.pdb"
2940 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.pdb"
2941 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1041.pdb"
2942 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1041.pdb"
2943 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1041.pdb"
2944 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1041.pdb"
2945 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1041.pdb"
2946 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1041.pdb"
2952 SetOutPath "$INSTDIR\Documentation"
2953 File "..\..\doc\install\Documentation\ko_KR\README.TXT"
2955 SetOutPath "$INSTDIR\Client\Program"
2956 File "${AFS_CLIENT_BUILDDIR}\afscreds_1042.dll"
2957 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.dll" "$INSTDIR\Client\Program\afs_shl_ext_1042.dll" "$INSTDIR"
2959 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1042.pdb"
2960 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.pdb"
2963 SetOutPath "$INSTDIR\Common"
2964 File "${AFS_CLIENT_BUILDDIR}\afs_config_1042.dll"
2965 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.dll"
2966 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1042.dll"
2967 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1042.dll"
2968 File "${AFS_SERVER_BUILDDIR}\afsserver_1042.dll"
2969 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1042.dll"
2970 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1042.dll"
2971 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1042.dll"
2972 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1042.dll"
2973 File "..\..\doc\help\ko_KR\afs-cc.CNT"
2974 File "..\..\doc\help\ko_KR\afs-cc.hlp"
2975 File "..\..\doc\help\ko_KR\afs-light.CNT"
2976 File "..\..\doc\help\ko_KR\afs-light.hlp"
2977 File "..\..\doc\help\ko_KR\afs-nt.CNT"
2978 File "..\..\doc\help\ko_KR\afs-nt.HLP"
2979 File "..\..\doc\help\ko_KR\taafscfg.CNT"
2980 File "..\..\doc\help\ko_KR\taafscfg.hlp"
2981 File "..\..\doc\help\ko_KR\taafssvrmgr.CNT"
2982 File "..\..\doc\help\ko_KR\taafssvrmgr.hlp"
2983 File "..\..\doc\help\ko_KR\taafsusrmgr.CNT"
2984 File "..\..\doc\help\ko_KR\taafsusrmgr.hlp"
2987 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1042.pdb"
2988 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.pdb"
2989 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1042.pdb"
2990 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1042.pdb"
2991 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1042.pdb"
2992 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1042.pdb"
2993 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1042.pdb"
2994 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1042.pdb"
3001 SetOutPath "$INSTDIR\Documentation"
3002 File "..\..\doc\install\Documentation\pt_BR\README.TXT"
3004 SetOutPath "$INSTDIR\Client\Program"
3005 File "${AFS_CLIENT_BUILDDIR}\afscreds_1046.dll"
3006 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.dll" "$INSTDIR\Client\Program\afs_shl_ext_1046.dll" "$INSTDIR"
3008 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1046.pdb"
3009 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.pdb"
3012 SetOutPath "$INSTDIR\Common"
3013 File "${AFS_CLIENT_BUILDDIR}\afs_config_1046.dll"
3014 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.dll"
3015 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1046.dll"
3016 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1046.dll"
3017 File "${AFS_SERVER_BUILDDIR}\afsserver_1046.dll"
3018 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1046.dll"
3019 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1046.dll"
3020 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1046.dll"
3021 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1046.dll"
3022 File "..\..\doc\help\pt_BR\afs-cc.CNT"
3023 File "..\..\doc\help\pt_BR\afs-cc.hlp"
3024 File "..\..\doc\help\pt_BR\afs-light.CNT"
3025 File "..\..\doc\help\pt_BR\afs-light.hlp"
3026 File "..\..\doc\help\pt_BR\afs-nt.CNT"
3027 File "..\..\doc\help\pt_BR\afs-nt.HLP"
3028 File "..\..\doc\help\pt_BR\taafscfg.CNT"
3029 File "..\..\doc\help\pt_BR\taafscfg.hlp"
3030 File "..\..\doc\help\pt_BR\taafssvrmgr.CNT"
3031 File "..\..\doc\help\pt_BR\taafssvrmgr.hlp"
3032 File "..\..\doc\help\pt_BR\taafsusrmgr.CNT"
3033 File "..\..\doc\help\pt_BR\taafsusrmgr.hlp"
3036 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1046.pdb"
3037 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.pdb"
3038 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1046.pdb"
3039 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1046.pdb"
3040 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1046.pdb"
3041 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1046.pdb"
3042 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1046.pdb"
3043 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1046.pdb"
3049 SetOutPath "$INSTDIR\Documentation"
3050 File "..\..\doc\install\Documentation\zh_CN\README.TXT"
3052 SetOutPath "$INSTDIR\Client\Program"
3053 File "${AFS_CLIENT_BUILDDIR}\afscreds_2052.dll"
3054 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.dll" "$INSTDIR\Client\Program\afs_shl_ext_2052.dll" "$INSTDIR"
3056 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_2052.pdb"
3057 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.pdb"
3060 SetOutPath "$INSTDIR\Common"
3061 File "${AFS_CLIENT_BUILDDIR}\afs_config_2052.dll"
3062 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.dll"
3063 File "${AFS_SERVER_BUILDDIR}\afseventmsg_2052.dll"
3064 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_2052.dll"
3065 File "${AFS_SERVER_BUILDDIR}\afsserver_2052.dll"
3066 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_2052.dll"
3067 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_2052.dll"
3068 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_2052.dll"
3069 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_2052.dll"
3070 File "..\..\doc\help\zh_CN\afs-cc.CNT"
3071 File "..\..\doc\help\zh_CN\afs-cc.hlp"
3072 File "..\..\doc\help\zh_CN\afs-light.CNT"
3073 File "..\..\doc\help\zh_CN\afs-light.hlp"
3074 File "..\..\doc\help\zh_CN\afs-nt.CNT"
3075 File "..\..\doc\help\zh_CN\afs-nt.HLP"
3076 File "..\..\doc\help\zh_CN\taafscfg.CNT"
3077 File "..\..\doc\help\zh_CN\taafscfg.hlp"
3078 File "..\..\doc\help\zh_CN\taafssvrmgr.CNT"
3079 File "..\..\doc\help\zh_CN\taafssvrmgr.hlp"
3080 File "..\..\doc\help\zh_CN\taafsusrmgr.CNT"
3081 File "..\..\doc\help\zh_CN\taafsusrmgr.hlp"
3084 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_2052.pdb"
3085 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.pdb"
3086 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_2052.pdb"
3087 ;File "${AFS_SERVER_BUILDDIR}\afsserver_2052.pdb"
3088 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_2052.pdb"
3089 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_2052.pdb"
3090 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_2052.pdb"
3091 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_2052.pdb"
3097 SetOutPath "$INSTDIR\Documentation"
3098 File "..\..\doc\install\Documentation\zh_TW\README.TXT"
3100 SetOutPath "$INSTDIR\Client\Program"
3101 File "${AFS_CLIENT_BUILDDIR}\afscreds_1028.dll"
3102 !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.dll" "$INSTDIR\Client\Program\afs_shl_ext_1028.dll" "$INSTDIR"
3104 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1028.pdb"
3105 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.pdb"
3108 SetOutPath "$INSTDIR\Common"
3109 File "${AFS_CLIENT_BUILDDIR}\afs_config_1028.dll"
3110 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.dll"
3111 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1028.dll"
3112 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1028.dll"
3113 File "${AFS_SERVER_BUILDDIR}\afsserver_1028.dll"
3114 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1028.dll"
3115 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1028.dll"
3116 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1028.dll"
3117 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1028.dll"
3118 File "..\..\doc\help\zh_TW\afs-cc.CNT"
3119 File "..\..\doc\help\zh_TW\afs-cc.hlp"
3120 File "..\..\doc\help\zh_TW\afs-light.CNT"
3121 File "..\..\doc\help\zh_TW\afs-light.hlp"
3122 File "..\..\doc\help\zh_TW\afs-nt.CNT"
3123 File "..\..\doc\help\zh_TW\afs-nt.HLP"
3124 File "..\..\doc\help\zh_TW\taafscfg.CNT"
3125 File "..\..\doc\help\zh_TW\taafscfg.hlp"
3126 File "..\..\doc\help\zh_TW\taafssvrmgr.CNT"
3127 File "..\..\doc\help\zh_TW\taafssvrmgr.hlp"
3128 File "..\..\doc\help\zh_TW\taafsusrmgr.CNT"
3129 File "..\..\doc\help\zh_TW\taafsusrmgr.hlp"
3132 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1028.pdb"
3133 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.pdb"
3134 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1028.pdb"
3135 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1028.pdb"
3136 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1028.pdb"
3137 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1028.pdb"
3138 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1028.pdb"
3139 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1028.pdb"
3148 ;====================================================
3149 ; AddToPath - Adds the given dir to the search path.
3150 ; Input - head of the stack
3151 ; Note - Win9x systems requires reboot
3152 ;====================================================
3159 # don't add if the path doesn't exist
3160 IfFileExists $0 "" AddToPath_done
3167 StrCmp $2 "" "" AddToPath_done
3172 StrCmp $2 "" "" AddToPath_done
3173 GetFullPathName /SHORT $3 $0
3178 StrCmp $2 "" "" AddToPath_done
3183 StrCmp $2 "" "" AddToPath_done
3187 StrCmp $1 1 AddToPath_NT
3190 FileOpen $1 "$1\autoexec.bat" a
3193 IntCmp $2 26 0 +2 +2 # DOS EOF
3194 FileSeek $1 -1 END # write over EOF
3195 FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
3201 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
3202 StrCpy $2 $1 1 -1 # copy last char
3203 StrCmp $2 ";" 0 +2 # if last char == ;
3204 StrCpy $1 $1 -1 # remove last char
3205 StrCmp $1 "" AddToPath_NTdoIt
3208 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $0
3209 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
3218 ;====================================================
3219 ; RemoveFromPath - Remove a given dir from the path
3220 ; Input: head of the stack
3221 ;====================================================
3222 Function un.RemoveFromPath
3231 IntFmt $6 "%c" 26 # DOS EOF
3235 StrCmp $1 1 unRemoveFromPath_NT
3238 FileOpen $1 "$1\autoexec.bat" r
3241 GetFullPathName /SHORT $0 $0
3242 StrCpy $0 "SET PATH=%PATH%;$0"
3243 Goto unRemoveFromPath_dosLoop
3245 unRemoveFromPath_dosLoop:
3247 StrCpy $5 $3 1 -1 # read last char
3248 StrCmp $5 $6 0 +2 # if DOS EOF
3249 StrCpy $3 $3 -1 # remove DOS EOF so we can compare
3250 StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine
3251 StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine
3252 StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine
3253 StrCmp $3 "" unRemoveFromPath_dosLoopEnd
3255 Goto unRemoveFromPath_dosLoop
3256 unRemoveFromPath_dosLoopRemoveLine:
3258 Goto unRemoveFromPath_dosLoop
3260 unRemoveFromPath_dosLoopEnd:
3264 Delete "$1\autoexec.bat"
3265 CopyFiles /SILENT $4 "$1\autoexec.bat"
3267 Goto unRemoveFromPath_done
3269 unRemoveFromPath_NT:
3270 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
3271 StrCpy $5 $1 1 -1 # copy last char
3272 StrCmp $5 ";" +2 # if last char != ;
3273 StrCpy $1 "$1;" # append ;
3276 Call un.StrStr ; Find `$0;` in $1
3277 Pop $2 ; pos of our dir
3278 StrCmp $2 "" unRemoveFromPath_done
3279 ; else, it is in path
3284 StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
3285 StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
3288 StrCpy $5 $3 1 -1 # copy last char
3289 StrCmp $5 ";" 0 +2 # if last char == ;
3290 StrCpy $3 $3 -1 # remove last char
3292 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $3
3293 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
3295 unRemoveFromPath_done:
3305 ;====================================================
3306 ; IsNT - Returns 1 if the current system is NT, 0
3308 ; Output: head of the stack
3309 ;====================================================
3313 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
3314 StrCmp $0 "" 0 IsNT_yes
3326 !insertmacro IsNT ""
3327 !insertmacro IsNT "un."
3329 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3331 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3332 ;====================================================
3333 ; StrStr - Finds a given string in another given string.
3334 ; Returns -1 if not found and the pos if found.
3335 ; Input: head of the stack - string to find
3336 ; second in the stack - string to find in
3337 ; Output: head of the stack
3338 ;====================================================
3340 Function ${un}StrStr
3341 Exch $R1 ; st=haystack,old$R1, $R1=needle
3342 Exch ; st=old$R1,haystack
3343 Exch $R2 ; st=old$R1,old$R2, $R2=haystack
3355 StrCpy $R5 $R2 $R3 $R4
3361 StrCpy $R1 $R2 "" $R4
3369 !insertmacro StrStr ""
3370 !insertmacro StrStr "un."
3373 !ifdef ADDSHAREDDLLUSED
3376 ; Increments a shared DLLs reference count.
3377 ; Use by passing one item on the stack (the full path of the DLL).
3380 ; Push $SYSDIR\myDll.dll
3384 Function AddSharedDLL
3387 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
3389 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
3395 ; un.RemoveSharedDLL
3397 ; Decrements a shared DLLs reference count, and removes if necessary.
3398 ; Use by passing one item on the stack (the full path of the DLL).
3399 ; Note: for use in the main installer (not the uninstaller), rename the
3400 ; function to RemoveSharedDLL.
3403 ; Push $SYSDIR\myDll.dll
3404 ; Call un.RemoveSharedDLL
3407 Function un.RemoveSharedDLL
3410 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
3411 StrCmp $R0 "" remove
3413 IntCmp $R0 0 rk rk uk
3415 DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
3418 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
3421 Delete /REBOOTOK $R1
3430 !ifdef INSTALL_LOOPBACK
3431 Function afs.InstallMSLoopback
3433 File /oname=$R0 "loopback_install.dll"
3434 nsExec::Exec "rundll32.exe $R0 doLoopBackEntry quiet"
3435 Call GetWindowsVersion
3437 StrCmp $R1 "2000" +1 +2
3438 nsExec::Exec "rundll32.exe $R0 disableLoopBackEntry"
3446 ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
3447 ; Updated by Joost Verburg
3449 ; Returns on top of stack
3451 ; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003)
3453 ; '' (Unknown Windows Version)
3456 ; Call GetWindowsVersion
3458 ; ; at this point $R0 is "NT 4.0" or whatnot
3460 Function GetWindowsVersion
3467 ReadRegStr $R0 HKLM \
3468 "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
3470 IfErrors 0 lbl_winnt
3473 ReadRegStr $R0 HKLM \
3474 "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
3477 StrCmp $R1 '4' 0 lbl_error
3481 StrCmp $R1 '4.0' lbl_win32_95
3482 StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
3500 StrCmp $R1 '3' lbl_winnt_x
3501 StrCmp $R1 '4' lbl_winnt_x
3505 StrCmp $R1 '5.0' lbl_winnt_2000
3506 StrCmp $R1 '5.1' lbl_winnt_XP
3507 StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
3510 StrCpy $R0 "NT $R0" 6
3535 ; Author: Lilla (lilla@earthlink.net) 2003-06-13
3536 ; function IsUserAdmin uses plugin \NSIS\PlusgIns\UserInfo.dll
3537 ; This function is based upon code in \NSIS\Contrib\UserInfo\UserInfo.nsi
3538 ; This function was tested under NSIS 2 beta 4 (latest CVS as of this writing).
3542 ; Pop $R0 ; at this point $R0 is "true" or "false"
3544 Function IsUserAdmin
3553 UserInfo::GetAccountType
3556 StrCmp $R2 "Admin" 0 Continue
3557 ; Observation: I get here when running Win98SE. (Lilla)
3558 ; The functions UserInfo.dll looks for are there on Win98 too,
3559 ; but just don't work. So UserInfo.dll, knowing that admin isn't required
3560 ; on Win98, returns admin anyway. (per kichik)
3561 ; MessageBox MB_OK 'User "$R1" is in the Administrators group'
3566 ; You should still check for an empty string because the functions
3567 ; UserInfo.dll looks for may not be present on Windows 95. (per kichik)
3570 ;MessageBox MB_OK 'User "$R1" is in the "$R2" group'
3574 ; comment/message below is by UserInfo.nsi author:
3575 ; This one means you don't need to care about admin or
3576 ; not admin because Windows 9x doesn't either
3577 ;MessageBox MB_OK "Error! This DLL can't run under Windows 9x!"
3581 ;MessageBox MB_OK 'User= "$R1" AccountType= "$R2" IsUserAdmin= "$R0"'
3589 ; input, top of stack (e.g. C:\Program Files\Poop)
3590 ; output, top of stack (replaces, with e.g. C:\Program Files)
3591 ; modifies no other variables.
3594 ; Push "C:\Program Files\Directory\Whatever"
3597 ; ; at this point $R0 will equal "C:\Program Files\Directory"
3611 IntCmp $R1 $R2 get 0 get
3612 StrCpy $R3 $R0 1 -$R1
3627 ;--------------------------------
3628 ;Handle what must and what must not be installed
3629 Function .onSelChange
3630 ; If they install the server, they MUST install the client
3631 SectionGetFlags ${secServer} $R0
3632 IntOp $R0 $R0 & ${SF_SELECTED}
3633 StrCmp $R0 "1" MakeClientSelected
3635 ; If they install the control center, we'll give them the client.
3636 ; It may not be required, but it's a bit more useful
3637 SectionGetFlags ${secControl} $R0
3638 IntOp $R0 $R0 & ${SF_SELECTED}
3639 StrCmp $R0 "1" MakeClientSelected
3643 SectionGetFlags ${secClient} $R0
3644 IntOp $R0 $R0 | ${SF_SELECTED}
3645 SectionSetFlags ${secClient} $R0
3650 Function RegWriteMultiStr
3651 !define HKEY_CLASSES_ROOT 0x80000000
3652 !define HKEY_CURRENT_USER 0x80000001
3653 !define HKEY_LOCAL_MACHINE 0x80000002
3654 !define HKEY_USERS 0x80000003
3655 !define HKEY_PERFORMANCE_DATA 0x80000004
3656 !define HKEY_PERFORMANCE_TEXT 0x80000050
3657 !define HKEY_PERFORMANCE_NLSTEXT 0x80000060
3658 !define HKEY_CURRENT_CONFIG 0x80000005
3659 !define HKEY_DYN_DATA 0x80000006
3661 !define KEY_QUERY_VALUE 0x0001
3662 !define KEY_SET_VALUE 0x0002
3663 !define KEY_CREATE_SUB_KEY 0x0004
3664 !define KEY_ENUMERATE_SUB_KEYS 0x0008
3665 !define KEY_NOTIFY 0x0010
3666 !define KEY_CREATE_LINK 0x0020
3670 !define REG_EXPAND_SZ 2
3671 !define REG_BINARY 3
3673 !define REG_DWORD_LITTLE_ENDIAN 4
3674 !define REG_DWORD_BIG_ENDIAN 5
3676 !define REG_MULTI_SZ 7
3678 !define RegCreateKey "Advapi32::RegCreateKeyA(i, t, *i) i"
3679 !define RegSetValueEx "Advapi32::RegSetValueExA(i, t, i, i, i, i) i"
3680 !define RegCloseKey "Advapi32::RegCloseKeyA(i) i"
3687 SetPluginUnload alwaysoff
3688 ; Create a buffer for the multi_sz value
3689 System::Call "*(&t${NSIS_MAX_STRLEN}) i.r1"
3690 ; Open/create the registry key
3691 System::Call "${RegCreateKey}(${HKEY_LOCAL_MACHINE}, '$REG_SUB_KEY', .r0) .r9"
3694 MessageBox MB_OK|MB_ICONSTOP "Can't create registry key! ($9)"
3698 ; Fill in the buffer with our strings
3699 StrCpy $2 $1 ; Initial position
3701 StrLen $9 '$REG_DATA_1' ; Length of first string
3702 IntOp $9 $9 + 1 ; Plus null
3703 System::Call "*$2(&t$9 '$REG_DATA_1')" ; Place the string
3704 IntOp $2 $2 + $9 ; Advance to the next position
3706 StrCmp '$REG_DATA_2' "" terminate
3707 StrLen $9 '$REG_DATA_2' ; Length of second string
3708 IntOp $9 $9 + 1 ; Plus null
3709 System::Call "*$2(&t$9 '$REG_DATA_2')" ; Place the string
3710 IntOp $2 $2 + $9 ; Advance to the next position
3712 StrCmp '$REG_DATA_3' "" terminate
3713 StrLen $9 '$REG_DATA_3' ; Length of third string
3714 IntOp $9 $9 + 1 ; Plus null
3715 System::Call "*$2(&t$9 '$REG_DATA_3')" ; Place the string
3716 IntOp $2 $2 + $9 ; Advance to the next position
3719 System::Call "*$2(&t1 '')" ; Place the terminating null
3720 IntOp $2 $2 + 1 ; Advance to the next position
3722 ; Create/write the value
3723 IntOp $2 $2 - $1 ; Total length
3724 System::Call "${RegSetValueEx}(r0, '$REG_VALUE', 0, ${REG_MULTI_SZ}, r1, r2) .r9"
3727 MessageBox MB_OK|MB_ICONSTOP "Can't set key value! ($9)"
3731 ; Close the registry key
3732 System::Call "${RegCloseKey}(r0)"
3736 SetPluginUnload manual