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 !include nsi-includes.nsi
12 !define MUI_PRODUCT "OpenAFS" ;Define your own software name here
13 !define MUI_VERSION ${AFS_VERSION}
15 Name "OpenAFS ${AFS_VERSION}"
16 VIProductVersion "${AFS_VERSION}.00"
17 VIAddVersionKey "ProductName" "OpenAFS"
18 VIAddVersionKey "CompanyName" "OpenAFS.org"
19 VIAddVersionKey "ProductVersion" ${AFS_VERSION}
20 VIAddVersionKey "FileVersion" ${AFS_VERSION}
21 VIAddVersionKey "FileDescription" "OpenAFS for Windows Installer"
22 VIAddVersionKey "LegalCopyright" "(C)2003"
24 VIAddVersionKey "PrivateBuild" "Debug"
28 ; Define DEBUG if building a DEBUG installer
34 ;--------------------------------
39 OutFile "OpenAFSforWindows.exe"
41 OutFile "OpenAFSforWindows-DEBUG.exe"
45 !define MUI_ICON "..\..\client_config\afs_config.ico"
47 !define MUI_UNICON "${NSISDIR}\Contrib\Icons\normal-uninstall.ico"
49 !define MUI_UNICON "..\..\client_config\afs_config.ico"
51 !define AFS_COMPANY_NAME "OpenAFS"
52 !define AFS_PRODUCT_NAME "OpenAFS"
53 !define AFS_REGKEY_ROOT "Software\TransarcCorporation"
56 ;Folder selection page
57 InstallDir "$PROGRAMFILES\OpenAFS\AFS"
59 ;Remember install folder
60 InstallDirRegKey HKCU "Software\TransarcCorporation" ""
62 ;Remember the installer language
63 !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
64 !define MUI_LANGDLL_REGISTRY_KEY "Software\TransarcCorporation"
65 !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
68 !define AFS_CLIENT_BUILDDIR "${AFS_DESTDIR}\root.client\usr\vice\etc"
69 !define AFS_WININSTALL_DIR "${AFS_DESTDIR}\WinInstall\Config"
70 !define AFS_BUILD_INCDIR "${AFS_DESTDIR}\include"
71 !define AFS_CLIENT_LIBDIR "${AFS_DESTDIR}\lib"
72 !define AFS_SERVER_BUILDDIR "${AFS_DESTDIR}\root.server\usr\afs\bin"
73 !define AFS_ETC_BUILDDIR "${AFS_DESTDIR}\etc"
75 ;--------------------------------
76 ;Modern UI Configuration
78 ;!define MUI_LICENSEPAGE
79 !define MUI_CUSTOMPAGECOMMANDS
80 !define MUI_WELCOMEPAGE
81 !define MUI_COMPONENTSPAGE
82 !define MUI_COMPONENTSPAGE_SMALLDESC
83 !define MUI_DIRECTORYPAGE
85 !define MUI_ABORTWARNING
86 !define MUI_FINISHPAGE
88 !define MUI_UNINSTALLER
89 !define MUI_UNCONFIRMPAGE
93 !insertmacro MUI_PAGECOMMAND_WELCOME
94 ;!insertmacro MUI_PAGECOMMAND_LICENSE
95 !insertmacro MUI_PAGECOMMAND_COMPONENTS
96 !insertmacro MUI_PAGECOMMAND_DIRECTORY
97 Page custom AFSPageGetCellServDB
98 Page custom AFSPageGetCellName
99 !insertmacro MUI_PAGECOMMAND_INSTFILES
100 !insertmacro MUI_PAGECOMMAND_FINISH
102 !insertmacro MUI_PAGE_WELCOME
103 !insertmacro MUI_PAGE_COMPONENTS
104 !insertmacro MUI_PAGE_DIRECTORY
105 Page custom AFSPageGetCellServDB
106 Page custom AFSPageGetCellName
107 !insertmacro MUI_PAGE_INSTFILES
108 !insertmacro MUI_PAGE_FINISH
111 ;LicenseData "Licenses.rtf"
112 ;--------------------------------
115 !insertmacro MUI_LANGUAGE "English"
116 ;!insertmacro MUI_LANGUAGE "French"
117 !insertmacro MUI_LANGUAGE "German"
118 !insertmacro MUI_LANGUAGE "Spanish"
119 !insertmacro MUI_LANGUAGE "SimpChinese"
120 !insertmacro MUI_LANGUAGE "TradChinese"
121 !insertmacro MUI_LANGUAGE "Japanese"
123 !insertmacro MUI_LANGUAGE "Korean"
125 ;!insertmacro MUI_LANGUAGE "Italian"
126 ;!insertmacro MUI_LANGUAGE "Dutch"
127 ;!insertmacro MUI_LANGUAGE "Danish"
128 ;!insertmacro MUI_LANGUAGE "Greek"
129 ;!insertmacro MUI_LANGUAGE "Russian"
130 !insertmacro MUI_LANGUAGE "PortugueseBR"
131 ;!insertmacro MUI_LANGUAGE "Polish"
132 ;!insertmacro MUI_LANGUAGE "Ukrainian"
133 ;!insertmacro MUI_LANGUAGE "Czech"
134 ;!insertmacro MUI_LANGUAGE "Slovak"
135 ;!insertmacro MUI_LANGUAGE "Croatian"
136 ;!insertmacro MUI_LANGUAGE "Bulgarian"
137 ;!insertmacro MUI_LANGUAGE "Hungarian"
138 ;!insertmacro MUI_LANGUAGE "Thai"
139 ;!insertmacro MUI_LANGUAGE "Romanian"
140 ;!insertmacro MUI_LANGUAGE "Macedonian"
141 ;!insertmacro MUI_LANGUAGE "Turkish"
143 ;--------------------------------
147 LangString DESC_SecCopyUI ${LANG_ENGLISH} "OpenAFS for Windows: English"
148 ;LangString DESC_SecCopyUI ${LANG_FRENCH} "OpenAFS for Windows: French"
149 LangString DESC_SecCopyUI ${LANG_GERMAN} "OpenAFS for Windows: German"
150 LangString DESC_SecCopyUI ${LANG_SPANISH} "OpenAFS for Windows: Spanish"
151 LangString DESC_SecCopyUI ${LANG_SIMPCHINESE} "OpenAFS for Windows: Simplified Chinese"
152 LangString DESC_SecCopyUI ${LANG_TRADCHINESE} "OpenAFS for Windows: Traditional Chinese description"
153 LangString DESC_SecCopyUI ${LANG_JAPANESE} "OpenAFS for Windows: Japanese description"
155 LangString DESC_SecCopyUI ${LANG_KOREAN} "OpenAFS for Windows: Korean description"
157 ;LangString DESC_SecCopyUI ${LANG_ITALIAN} "OpenAFS for Windows: Italian description"
158 ;LangString DESC_SecCopyUI ${LANG_DUTCH} "OpenAFS for Windows: Dutch description"
159 ;LangString DESC_SecCopyUI ${LANG_DANISH} "OpenAFS for Windows: Danish description"
160 ;LangString DESC_SecCopyUI ${LANG_GREEK} "OpenAFS for Windows: Greek description"
161 ;LangString DESC_SecCopyUI ${LANG_RUSSIAN} "OpenAFS for Windows: Russian description"
162 LangString DESC_SecCopyUI ${LANG_PORTUGUESEBR} "OpenAFS for Windows: Portuguese (Brasil) description"
163 ;LangString DESC_SecCopyUI ${LANG_POLISH} "OpenAFS for Windows: Polish description"
164 ;LangString DESC_SecCopyUI ${LANG_UKRAINIAN} "OpenAFS for Windows: Ukrainian description"
165 ;LangString DESC_SecCopyUI ${LANG_CZECH} "OpenAFS for Windows: Czechian description"
166 ;LangString DESC_SecCopyUI ${LANG_SLOVAK} "OpenAFS for Windows: Slovakian description"
167 ;LangString DESC_SecCopyUI ${LANG_CROATIAN} "OpenAFS for Windows: Slovakian description"
168 ;LangString DESC_SecCopyUI ${LANG_BULGARIAN} "OpenAFS for Windows: Bulgarian description"
169 ;LangString DESC_SecCopyUI ${LANG_HUNGARIAN} "OpenAFS for Windows: Hungarian description"
170 ;LangString DESC_SecCopyUI ${LANG_THAI} "OpenAFS for Windows: Thai description"
171 ;LangString DESC_SecCopyUI ${LANG_ROMANIAN} "OpenAFS for Windows: Romanian description"
172 ;LangString DESC_SecCopyUI ${LANG_MACEDONIAN} "OpenAFS for Windows: Macedonian description"
173 ;LangString DESC_SecCopyUI ${LANG_TURKISH} "OpenAFS for Windows: Turkish description"
175 LangString DESC_SecClient ${LANG_ENGLISH} "OpenAFS Client: Allows you to access AFS from your Windows PC."
176 LangString DESC_SecClient ${LANG_GERMAN} "OpenAFS Client: Allows you to access AFS from your Windows PC."
177 LangString DESC_SecClient ${LANG_SPANISH} "OpenAFS Client: Allows you to access AFS from your Windows PC."
178 LangString DESC_SecClient ${LANG_SIMPCHINESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
179 LangString DESC_SecClient ${LANG_TRADCHINESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
180 LangString DESC_SecClient ${LANG_JAPANESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
182 LangString DESC_SecClient ${LANG_KOREAN} "OpenAFS Client: Allows you to access AFS from your Windows PC."
184 LangString DESC_SecClient ${LANG_PORTUGUESEBR} "OpenAFS Client: Allows you to access AFS from your Windows PC."
186 LangString DESC_SecServer ${LANG_ENGLISH} "OpenAFS Server: Allows you to run an AFS file server."
187 LangString DESC_SecServer ${LANG_GERMAN} "OpenAFS Server: Allows you to run an AFS file server."
188 LangString DESC_SecServer ${LANG_SPANISH} "OpenAFS Server: Allows you to run an AFS file server."
189 LangString DESC_SecServer ${LANG_SIMPCHINESE} "OpenAFS Server: Allows you to run an AFS file server."
190 LangString DESC_SecServer ${LANG_TRADCHINESE} "OpenAFS Server: Allows you to run an AFS file server."
191 LangString DESC_SecServer ${LANG_JAPANESE} "OpenAFS Server: Allows you to run an AFS file server."
193 LangString DESC_SecServer ${LANG_KOREAN} "OpenAFS Server: Allows you to run an AFS file server."
195 LangString DESC_SecServer ${LANG_PORTUGUESEBR} "OpenAFS Server: Allows you to run an AFS file server."
197 LangString DESC_SecControl ${LANG_ENGLISH} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
198 LangString DESC_SecControl ${LANG_GERMAN} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
199 LangString DESC_SecControl ${LANG_SPANISH} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
200 LangString DESC_SecControl ${LANG_SIMPCHINESE} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
201 LangString DESC_SecControl ${LANG_TRADCHINESE} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
202 LangString DESC_SecControl ${LANG_JAPANESE} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
204 LangString DESC_SecControl ${LANG_KOREAN} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
206 LangString DESC_SecControl ${LANG_PORTUGUESEBR} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
208 LangString DESC_SecDocs ${LANG_ENGLISH} "Supplemental Documentation: Additional documentation for using OpenAFS."
209 LangString DESC_SecDocs ${LANG_GERMAN} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS."
210 LangString DESC_SecDocs ${LANG_SPANISH} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS."
211 LangString DESC_SecDocs ${LANG_SIMPCHINESE} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS."
212 LangString DESC_SecDocs ${LANG_TRADCHINESE} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS."
213 LangString DESC_SecDocs ${LANG_JAPANESE} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS."
215 LangString DESC_SecDocs ${LANG_KOREAN} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS."
217 LangString DESC_SecDocs ${LANG_PORTUGUESEBR} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS."
219 ; Popup error messages
220 LangString CellError ${LANG_ENGLISH} "You must specify a valid CellServDB file to copy during install"
221 LangString CellError ${LANG_GERMAN} "You must specify a valid CellServDB file to copy during the install"
222 LangString CellError ${LANG_SPANISH} "You must specify a valid CellServDB file to copy during the install"
223 LangString CellError ${LANG_SIMPCHINESE} "You must specify a valid CellServDB file to copy during the install"
224 LangString CellError ${LANG_TRADCHINESE} "You must specify a valid CellServDB file to copy during the install"
225 LangString CellError ${LANG_JAPANESE} "You must specify a valid CellServDB file to copy during the install"
227 LangString CellError ${LANG_KOREAN} "You must specify a valid CellServDB file to copy during the install"
229 LangString CellError ${LANG_PORTUGUESEBR} "You must specify a valid CellServDB file to copy during the install"
232 ; Upgrade/re-install strings
233 LangString UPGRADE_CLIENT ${LANG_ENGLISH} "Upgrade AFS Client"
234 LangString UPGRADE_CLIENT ${LANG_GERMAN} "Upgrade AFS Client"
235 LangString UPGRADE_CLIENT ${LANG_SPANISH} "Upgrade AFS Client"
236 LangString UPGRADE_CLIENT ${LANG_SIMPCHINESE} "Upgrade AFS Client"
237 LangString UPGRADE_CLIENT ${LANG_TRADCHINESE} "Upgrade AFS Client"
238 LangString UPGRADE_CLIENT ${LANG_JAPANESE} "Upgrade AFS Client"
240 LangString UPGRADE_CLIENT ${LANG_KOREAN} "Upgrade AFS Client"
242 LangString UPGRADE_CLIENT ${LANG_PORTUGUESEBR} "Upgrade AFS Client"
244 LangString REINSTALL_CLIENT ${LANG_ENGLISH} "Re-install AFS Client"
245 LangString REINSTALL_CLIENT ${LANG_GERMAN} "Re-install AFS Client"
246 LangString REINSTALL_CLIENT ${LANG_SPANISH} "Re-install AFS Client"
247 LangString REINSTALL_CLIENT ${LANG_SIMPCHINESE} "Re-install AFS Client"
248 LangString REINSTALL_CLIENT ${LANG_TRADCHINESE} "Re-install AFS Client"
249 LangString REINSTALL_CLIENT ${LANG_JAPANESE} "Re-install AFS Client"
251 LangString REINSTALL_CLIENT ${LANG_KOREAN} "Re-install AFS Client"
253 LangString REINSTALL_CLIENT ${LANG_PORTUGUESEBR} "Re-install AFS Client"
255 LangString UPGRADE_SERVER ${LANG_ENGLISH} "Upgrade AFS Server"
256 LangString UPGRADE_SERVER ${LANG_GERMAN} "Upgrade AFS Server"
257 LangString UPGRADE_SERVER ${LANG_SPANISH} "Upgrade AFS Server"
258 LangString UPGRADE_SERVER ${LANG_SIMPCHINESE} "Upgrade AFS Server"
259 LangString UPGRADE_SERVER ${LANG_TRADCHINESE} "Upgrade AFS Server"
260 LangString UPGRADE_SERVER ${LANG_JAPANESE} "Upgrade AFS Server"
262 LangString UPGRADE_SERVER ${LANG_KOREAN} "Upgrade AFS Server"
264 LangString UPGRADE_SERVER ${LANG_PORTUGUESEBR} "Upgrade AFS Server"
266 LangString REINSTALL_SERVER ${LANG_ENGLISH} "Re-install AFS Server"
267 LangString REINSTALL_SERVER ${LANG_GERMAN} "Re-install AFS Server"
268 LangString REINSTALL_SERVER ${LANG_SPANISH} "Re-install AFS Server"
269 LangString REINSTALL_SERVER ${LANG_SIMPCHINESE} "Re-install AFS Server"
270 LangString REINSTALL_SERVER ${LANG_TRADCHINESE} "Re-install AFS Server"
271 LangString REINSTALL_SERVER ${LANG_JAPANESE} "Re-install AFS Server"
273 LangString REINSTALL_SERVER ${LANG_KOREAN} "Re-install AFS Server"
275 LangString REINSTALL_SERVER ${LANG_PORTUGUESEBR} "Re-install AFS Server"
277 ;--------------------------------
279 ; Macro - Upgrade DLL File
280 ; Written by Joost Verburg
281 ; ------------------------
284 ; !insertmacro UpgradeDLL "dllname.dll" "$SYSDIR\dllname.dll"
286 ; !define UPGRADEDLL_NOREGISTER if you want to upgrade a DLL which cannot be registered
288 ; Note that this macro sets overwrite to ON (the default) when it has been inserted.
289 ; If you are using another setting, set it again after inserting the macro.
292 !macro UpgradeDLL LOCALFILE DESTFILE
299 ;------------------------
300 ;Check file and version
302 IfFileExists "${DESTFILE}" "" "copy_${LOCALFILE}"
305 GetDLLVersionLocal "${LOCALFILE}" $R0 $R1
306 GetDLLVersion "${DESTFILE}" $R2 $R3
307 IfErrors "upgrade_${LOCALFILE}"
309 IntCmpU $R0 $R2 "" "done_${LOCALFILE}" "upgrade_${LOCALFILE}"
310 IntCmpU $R1 $R3 "done_${LOCALFILE}" "done_${LOCALFILE}" "upgrade_${LOCALFILE}"
312 ;------------------------
313 ;Let's upgrade the DLL!
317 "upgrade_${LOCALFILE}:"
318 !ifndef UPGRADEDLL_NOREGISTER
320 UnRegDLL "${DESTFILE}"
323 ;------------------------
324 ;Try to copy the DLL directly
327 StrCpy $R0 "${DESTFILE}"
328 Call ":file_${LOCALFILE}"
329 IfErrors "" "noreboot_${LOCALFILE}"
331 ;------------------------
332 ;DLL is in use. Copy it to a temp file and Rename it on reboot.
335 Call ":file_${LOCALFILE}"
336 Rename /REBOOTOK $R0 "${DESTFILE}"
338 ;------------------------
339 ;Register the DLL on reboot
341 !ifndef UPGRADEDLL_NOREGISTER
342 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" \
343 "Register ${DESTFILE}" '"$SYSDIR\rundll32.exe" "${DESTFILE},DllRegisterServer"'
346 Goto "done_${LOCALFILE}"
348 ;------------------------
349 ;DLL does not exist - just extract
352 StrCpy $R0 "${DESTFILE}"
353 Call ":file_${LOCALFILE}"
355 ;------------------------
358 "noreboot_${LOCALFILE}:"
359 !ifndef UPGRADEDLL_NOREGISTER
363 ;------------------------
373 ;------------------------
376 Goto "end_${LOCALFILE}"
378 ;------------------------
379 ;Called to extract the DLL
382 File /oname=$R0 "${LOCALFILE}"
387 ;------------------------
388 ;Set overwrite to default
389 ;(was set to TRY above)
396 ;--------------------------------
399 ;Things that need to be extracted on first (keep these lines before any File command!)
400 ;Only useful for BZIP2 compression
401 !insertmacro MUI_RESERVEFILE_LANGDLL
403 ;--------------------------------
406 ;----------------------
408 Section "AFS Client" SecClient
410 SetShellVarContext all
411 ; Stop any running services or we can't replace the files
412 ; Stop the running processes
414 ;File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe" ; Might not have the MSVCR71.DLL file to run
415 ;nsExec::Exec '$R0 afscreds.exe'
416 ;nsExec::Exec '$R0 krbcc32s.exe'
418 nsExec::Exec "net stop TransarcAFSDaemon"
419 nsExec::Exec "net stop TransarcAFSServer"
421 ; Do client components
422 SetOutPath "$INSTDIR\Client\Program"
423 File "${AFS_CLIENT_BUILDDIR}\afsshare.exe"
424 File "${AFS_BUILD_INCDIR}\afs\cm_config.h"
425 File "${AFS_CLIENT_BUILDDIR}\libosi.dll"
426 File "${AFS_BUILD_INCDIR}\afs\kautils.h"
427 File "${AFS_CLIENT_BUILDDIR}\libafsconf.dll"
428 File "${AFS_CLIENT_BUILDDIR}\klog.exe"
429 File "${AFS_CLIENT_BUILDDIR}\tokens.exe"
430 File "${AFS_CLIENT_BUILDDIR}\unlog.exe"
431 File "${AFS_CLIENT_BUILDDIR}\fs.exe"
432 File "${AFS_CLIENT_LIBDIR}\libafsconf.lib"
433 File "${AFS_CLIENT_LIBDIR}\afsauthent.lib"
434 File "${AFS_CLIENT_BUILDDIR}\afscreds.exe"
435 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll"
436 File "${AFS_BUILD_INCDIR}\afs\auth.h"
437 File "${AFS_CLIENT_BUILDDIR}\afsd_service.exe"
438 File "${AFS_CLIENT_BUILDDIR}\afslogon.dll"
439 File "${AFS_CLIENT_BUILDDIR}\symlink.exe"
440 File "${AFS_DESTDIR}\bin\kpasswd.exe"
441 File "${AFS_SERVER_BUILDDIR}\pts.exe"
442 File "${AFS_SERVER_BUILDDIR}\bos.exe"
443 File "${AFS_SERVER_BUILDDIR}\kas.exe"
444 File "${AFS_SERVER_BUILDDIR}\vos.exe"
445 File "${AFS_SERVER_BUILDDIR}\udebug.exe"
446 File "${AFS_DESTDIR}\bin\translate_et.exe"
447 File "${AFS_DESTDIR}\etc\rxdebug.exe"
448 File "${AFS_DESTDIR}\etc\backup.exe"
451 File "${AFS_CLIENT_BUILDDIR}\afsshare.pdb"
452 File "${AFS_CLIENT_BUILDDIR}\libosi.pdb"
453 File "${AFS_CLIENT_BUILDDIR}\libafsconf.pdb"
454 File "${AFS_CLIENT_BUILDDIR}\klog.pdb"
455 File "${AFS_CLIENT_BUILDDIR}\tokens.pdb"
456 File "${AFS_CLIENT_BUILDDIR}\unlog.pdb"
457 File "${AFS_CLIENT_BUILDDIR}\fs.pdb"
458 File "${AFS_CLIENT_BUILDDIR}\afscreds.pdb"
459 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.pdb"
460 File "${AFS_CLIENT_BUILDDIR}\afsd_service.pdb"
461 File "${AFS_CLIENT_BUILDDIR}\afslogon.pdb"
462 File "${AFS_CLIENT_BUILDDIR}\symlink.pdb"
463 File "${AFS_DESTDIR}\bin\kpasswd.pdb"
464 ;File "${AFS_SERVER_BUILDDIR}\pts.pdb"
465 File "${AFS_SERVER_BUILDDIR}\bos.pdb"
466 File "${AFS_SERVER_BUILDDIR}\kas.pdb"
467 File "${AFS_SERVER_BUILDDIR}\vos.pdb"
468 File "${AFS_SERVER_BUILDDIR}\udebug.pdb"
469 File "${AFS_DESTDIR}\bin\translate_et.pdb"
470 File "${AFS_DESTDIR}\etc\rxdebug.pdb"
471 File "${AFS_DESTDIR}\etc\backup.pdb"
475 SetOutPath "$INSTDIR\Client\Program\Include"
476 File "${AFS_BUILD_INCDIR}\lock.h"
477 File "${AFS_BUILD_INCDIR}\lwp.h"
478 File "${AFS_BUILD_INCDIR}\preempt.h"
479 File "${AFS_BUILD_INCDIR}\timer.h"
480 File "${AFS_BUILD_INCDIR}\des.h"
481 File "${AFS_BUILD_INCDIR}\des_conf.h"
482 File "${AFS_BUILD_INCDIR}\mit-cpyright.h"
483 ;File "${AFS_BUILD_INCDIR}\des-odd.h"
484 File "${AFS_BUILD_INCDIR}\crypt.h"
485 File "${AFS_BUILD_INCDIR}\pthread.h"
486 File "${AFS_BUILD_INCDIR}\dbrpc.h"
487 File "${AFS_BUILD_INCDIR}\basic.h"
488 File "${AFS_BUILD_INCDIR}\osidebug.h"
489 File "${AFS_BUILD_INCDIR}\osiltype.h"
490 File "${AFS_BUILD_INCDIR}\osistatl.h"
491 File "${AFS_BUILD_INCDIR}\trylock.h"
492 File "${AFS_BUILD_INCDIR}\main.h"
493 File "${AFS_BUILD_INCDIR}\osibasel.h"
494 File "${AFS_BUILD_INCDIR}\osifd.h"
495 File "${AFS_BUILD_INCDIR}\osiqueue.h"
496 File "${AFS_BUILD_INCDIR}\osiutils.h"
497 File "${AFS_BUILD_INCDIR}\osi.h"
498 File "${AFS_BUILD_INCDIR}\osidb.h"
499 File "${AFS_BUILD_INCDIR}\osilog.h"
500 File "${AFS_BUILD_INCDIR}\osisleep.h"
501 File "${AFS_BUILD_INCDIR}\perf.h"
502 File "${AFS_BUILD_INCDIR}\ubik.h"
503 File "${AFS_BUILD_INCDIR}\ubik_int.h"
507 SetOutPath "$INSTDIR\Client\Program\Include\afs"
508 File "${AFS_BUILD_INCDIR}\afs\afs_args.h"
509 File "${AFS_BUILD_INCDIR}\afs\debug.h"
510 File "${AFS_BUILD_INCDIR}\afs\param.h"
511 File "${AFS_BUILD_INCDIR}\afs\afs_sysnames.h"
512 ;File "${AFS_BUILD_INCDIR}\afs\permit_xprt.h"
513 File "${AFS_BUILD_INCDIR}\afs\stds.h"
514 File "${AFS_BUILD_INCDIR}\afs\icl.h"
515 File "${AFS_BUILD_INCDIR}\afs\procmgmt.h"
516 File "${AFS_BUILD_INCDIR}\afs\afsutil.h"
517 File "${AFS_BUILD_INCDIR}\afs\assert.h"
518 File "${AFS_BUILD_INCDIR}\afs\dirent.h"
519 File "${AFS_BUILD_INCDIR}\afs\errors.h"
520 File "${AFS_BUILD_INCDIR}\afs\itc.h"
521 File "${AFS_BUILD_INCDIR}\afs\vice.h"
522 File "${AFS_BUILD_INCDIR}\afs\pthread_glock.h"
523 File "${AFS_BUILD_INCDIR}\afs\errmap_nt.h"
524 File "${AFS_BUILD_INCDIR}\afs\dirpath.h"
525 File "${AFS_BUILD_INCDIR}\afs\ktime.h"
526 File "${AFS_BUILD_INCDIR}\afs\fileutil.h"
527 File "${AFS_BUILD_INCDIR}\afs\secutil_nt.h"
528 File "${AFS_BUILD_INCDIR}\afs\com_err.h"
529 File "${AFS_BUILD_INCDIR}\afs\error_table.h"
530 ;File "${AFS_BUILD_INCDIR}\afs\mit_sipb-cr.h"
531 File "${AFS_BUILD_INCDIR}\afs\cmd.h"
532 File "${AFS_BUILD_INCDIR}\afs\rxgen_consts.h"
533 File "${AFS_BUILD_INCDIR}\afs\afsint.h"
534 File "${AFS_BUILD_INCDIR}\afs\afscbint.h"
535 File "${AFS_BUILD_INCDIR}\afs\audit.h"
536 File "${AFS_BUILD_INCDIR}\afs\acl.h"
537 File "${AFS_BUILD_INCDIR}\afs\prs_fs.h"
538 File "${AFS_BUILD_INCDIR}\afs\afsd.h"
539 File "${AFS_BUILD_INCDIR}\afs\cm.h"
540 File "${AFS_BUILD_INCDIR}\afs\cm_buf.h"
541 File "${AFS_BUILD_INCDIR}\afs\cm_cell.h"
542 File "${AFS_BUILD_INCDIR}\afs\cm_config.h"
543 File "${AFS_BUILD_INCDIR}\afs\cm_conn.h"
544 File "${AFS_BUILD_INCDIR}\afs\cm_ioctl.h"
545 File "${AFS_BUILD_INCDIR}\afs\cm_scache.h"
546 File "${AFS_BUILD_INCDIR}\afs\cm_server.h"
547 File "${AFS_BUILD_INCDIR}\afs\cm_user.h"
548 File "${AFS_BUILD_INCDIR}\afs\cm_utils.h"
549 File "${AFS_BUILD_INCDIR}\afs\fs_utils.h"
550 File "${AFS_BUILD_INCDIR}\afs\krb.h"
551 File "${AFS_BUILD_INCDIR}\afs\krb_prot.h"
552 File "${AFS_BUILD_INCDIR}\afs\smb.h"
553 File "${AFS_BUILD_INCDIR}\afs\smb3.h"
554 File "${AFS_BUILD_INCDIR}\afs\smb_iocons.h"
555 File "${AFS_BUILD_INCDIR}\afs\smb_ioctl.h"
556 File "${AFS_BUILD_INCDIR}\afs\afsrpc.h"
557 File "${AFS_BUILD_INCDIR}\afs\afssyscalls.h"
558 File "${AFS_BUILD_INCDIR}\afs\pioctl_nt.h"
559 File "${AFS_BUILD_INCDIR}\afs\auth.h"
560 File "${AFS_BUILD_INCDIR}\afs\cellconfig.h"
561 File "${AFS_BUILD_INCDIR}\afs\keys.h"
562 File "${AFS_BUILD_INCDIR}\afs\ptserver.h"
563 File "${AFS_BUILD_INCDIR}\afs\ptint.h"
564 File "${AFS_BUILD_INCDIR}\afs\pterror.h"
565 File "${AFS_BUILD_INCDIR}\afs\ptint.h"
566 File "${AFS_BUILD_INCDIR}\afs\pterror.h"
567 File "${AFS_BUILD_INCDIR}\afs\ptclient.h"
568 File "${AFS_BUILD_INCDIR}\afs\prserver.h"
569 File "${AFS_BUILD_INCDIR}\afs\print.h"
570 File "${AFS_BUILD_INCDIR}\afs\prerror.h"
571 File "${AFS_BUILD_INCDIR}\afs\prclient.h"
572 File "${AFS_BUILD_INCDIR}\afs\kautils.h"
573 File "${AFS_BUILD_INCDIR}\afs\kauth.h"
574 File "${AFS_BUILD_INCDIR}\afs\kaport.h"
575 File "${AFS_BUILD_INCDIR}\afs\vl_opcodes.h"
576 File "${AFS_BUILD_INCDIR}\afs\vlserver.h"
577 File "${AFS_BUILD_INCDIR}\afs\vldbint.h"
578 File "${AFS_BUILD_INCDIR}\afs\usd.h"
579 File "${AFS_BUILD_INCDIR}\afs\bubasics.h"
580 File "${AFS_BUILD_INCDIR}\afs\butc.h"
581 File "${AFS_BUILD_INCDIR}\afs\bumon.h"
582 File "${AFS_BUILD_INCDIR}\afs\butm.h"
583 File "${AFS_BUILD_INCDIR}\afs\tcdata.h"
584 File "${AFS_BUILD_INCDIR}\afs\budb.h"
585 ;File "${AFS_BUILD_INCDIR}\afs\budb_errors.h"
586 File "${AFS_BUILD_INCDIR}\afs\budb_client.h"
587 File "${AFS_BUILD_INCDIR}\afs\dir.h"
588 File "${AFS_BUILD_INCDIR}\afs\fssync.h"
589 File "${AFS_BUILD_INCDIR}\afs\ihandle.h"
590 File "${AFS_BUILD_INCDIR}\afs\nfs.h"
591 File "${AFS_BUILD_INCDIR}\afs\ntops.h"
592 File "${AFS_BUILD_INCDIR}\afs\partition.h"
593 File "${AFS_BUILD_INCDIR}\afs\viceinode.h"
594 File "${AFS_BUILD_INCDIR}\afs\vnode.h"
595 File "${AFS_BUILD_INCDIR}\afs\volume.h"
596 File "${AFS_BUILD_INCDIR}\afs\voldefs.h"
597 File "${AFS_BUILD_INCDIR}\afs\volser.h"
598 File "${AFS_BUILD_INCDIR}\afs\volint.h"
599 File "${AFS_BUILD_INCDIR}\afs\fs_stats.h"
600 File "${AFS_BUILD_INCDIR}\afs\bosint.h"
601 File "${AFS_BUILD_INCDIR}\afs\bnode.h"
604 SetOutPath "$INSTDIR\Client\Program\Include\rx"
605 File "${AFS_BUILD_INCDIR}\rx\rx.h"
606 File "${AFS_BUILD_INCDIR}\rx\rx_packet.h"
607 File "${AFS_BUILD_INCDIR}\rx\rx_user.h"
608 File "${AFS_BUILD_INCDIR}\rx\rx_event.h"
609 File "${AFS_BUILD_INCDIR}\rx\rx_queue.h"
610 File "${AFS_BUILD_INCDIR}\rx\rx_globals.h"
611 File "${AFS_BUILD_INCDIR}\rx\rx_clock.h"
612 File "${AFS_BUILD_INCDIR}\rx\rx_misc.h"
613 File "${AFS_BUILD_INCDIR}\rx\rx_multi.h"
614 File "${AFS_BUILD_INCDIR}\rx\rx_null.h"
615 File "${AFS_BUILD_INCDIR}\rx\rx_lwp.h"
616 File "${AFS_BUILD_INCDIR}\rx\rx_pthread.h"
617 File "${AFS_BUILD_INCDIR}\rx\rx_xmit_nt.h"
618 File "${AFS_BUILD_INCDIR}\rx\xdr.h"
619 File "${AFS_BUILD_INCDIR}\rx\rxkad.h"
624 SetOutPath "$INSTDIR\Client\Program\Sample"
625 File "..\..\afsd\sample\token.c"
631 ; Do WINDOWSDIR components
632 ; Get AFS CellServDB file
633 Call afs.GetCellServDB
634 !ifdef INSTALL_LOOPBACK
635 Call afs.InstallMSLoopback
639 ; Include Kerberos for Windows files in the installer...
640 SetOutPath "$INSTDIR\kfw\bin\"
641 File "${KFW_SOURCE}\bin\*"
642 SetOutPath "$INSTDIR\kfw\doc"
643 File "${KFW_SOURCE}\doc\*"
646 ReadINIStr $R0 $0 "Field 2" "State"
647 StrCmp $R0 "1" UsePkg DontUsePkg
652 ReadINIStr $R0 $0 "Field 6" "State"
653 StrCmp $R0 "1" UseFile DontUseFile
655 ReadINIStr $R0 $0 "Field 7" "State"
656 CopyFiles $R0 "$WINDIR\afsdcell.ini"
659 ;Store install folder
660 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\Client" "" $INSTDIR
661 Call AFSCommon.Install
663 ; Write registry entries
664 WriteRegStr HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
665 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "" "AFS Client Shell Extension"
666 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "" "$INSTDIR\Client\Program\afs_shl_ext.dll"
667 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "ThreadingModel" "Apartment"
668 WriteRegStr HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
669 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "AFS Client Shell Extension"
672 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
673 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "VersionString" ${AFS_VERSION}
674 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Title" "AFS Client"
675 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Description" "AFS Client"
676 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PathName" "$INSTDIR\Client\Program"
677 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Software Type" "File System"
678 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
679 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
680 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
681 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
682 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Title" "AFS Client"
683 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Description" "AFS Client"
684 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Software Type" "File System"
685 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "PathName" "$INSTDIR\Client\Program"
686 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
687 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
688 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
690 ; Set network settings
691 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled" 0
693 ;Write start menu entries
694 CreateDirectory "$SMPROGRAMS\OpenAFS\Client"
695 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
696 CreateShortCut "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk" "$INSTDIR\Client\Program\afscreds.exe"
697 CreateShortCut "$SMSTARTUP\AFS Credentials.lnk" "$INSTDIR\Client\Program\afscreds.exe"
699 Push "$INSTDIR\Client\Program"
701 Push "$INSTDIR\Common"
705 ; Add kfw to path too
706 Push "$INSTDIR\kfw\bin"
710 ; Create the AFS service
711 SetOutPath "$INSTDIR\Common"
712 File "${AFS_WININSTALL_DIR}\Service.exe"
713 nsExec::Exec "net stop TransarcAFSDaemon"
714 ;IMPORTANT! If we are not refreshing the config files, do NOT remove the service
715 ;Don't re-install because it must be present or we wouldn't have passed the Reg check
716 ReadINIStr $R2 $1 "Field 2" "State"
718 StrCmp $R2 "" skipremove
719 nsExec::Exec '$INSTDIR\Common\Service.exe u TransarcAFSDaemon'
720 nsExec::Exec '$INSTDIR\Common\Service.exe TransarcAFSDaemon "$INSTDIR\Client\Program\afsd_service.exe" "OpenAFS Client Service"'
722 Delete "$INSTDIR\Common\service.exe"
725 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "(Default)" ""
726 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
727 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Class" 2
728 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonOptions" 2
729 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonScript" "$INSTDIR\Client\Program\afscreds.exe -:%s -x"
730 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Name" "OpenAFSDaemon"
731 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "ProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
734 ReadINIStr $R0 $1 "Field 2" "State"
735 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell" $R0
736 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "ShowTrayIcon" 1
737 ;WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "SecurityLevel" 1
740 WriteUninstaller "$INSTDIR\Uninstall.exe"
744 ;------------------------
746 Section "AFS Server" SecServer
748 SetShellVarContext all
749 ; Stop any running services or we can't replace the files
750 ; Stop the running processes
752 ;File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe" ; Might not have the MSVCR71.DLL file to run
753 ;nsExec::Exec '$R0 afscreds.exe'
754 ;nsExec::Exec '$R0 krbcc32s.exe'
756 nsExec::Exec "net stop TransarcAFSDaemon"
757 nsExec::Exec "net stop TransarcAFSServer"
759 CreateDirectory "$INSTDIR\Server\usr\afs\etc"
760 CreateDirectory "$INSTDIR\Server\usr\afs\local"
761 CreateDirectory "$INSTDIR\Server\usr\afs\logs"
763 SetOutPath "$INSTDIR\Server\usr\afs\bin"
764 File "${AFS_SERVER_BUILDDIR}\afskill.exe"
765 File "${AFS_SERVER_BUILDDIR}\afssvrcfg.exe"
766 File "${AFS_SERVER_BUILDDIR}\bosctlsvc.exe"
767 File "${AFS_SERVER_BUILDDIR}\bosserver.exe"
768 File "${AFS_SERVER_BUILDDIR}\buserver.exe"
769 File "${AFS_ETC_BUILDDIR}\butc.exe"
770 File "${AFS_SERVER_BUILDDIR}\fileserver.exe"
771 File "${AFS_ETC_BUILDDIR}\fms.exe"
772 File "${AFS_SERVER_BUILDDIR}\kaserver.exe"
773 File "${AFS_SERVER_BUILDDIR}\ptserver.exe"
774 File "${AFS_SERVER_BUILDDIR}\salvager.exe"
775 File "${AFS_SERVER_BUILDDIR}\upclient.exe"
776 File "${AFS_SERVER_BUILDDIR}\upserver.exe"
777 File "${AFS_SERVER_BUILDDIR}\vlserver.exe"
778 File "${AFS_SERVER_BUILDDIR}\volinfo.exe"
779 File "${AFS_SERVER_BUILDDIR}\volserver.exe"
782 File "${AFS_SERVER_BUILDDIR}\afskill.pdb"
783 File "${AFS_SERVER_BUILDDIR}\afssvrcfg.pdb"
784 File "${AFS_SERVER_BUILDDIR}\bosctlsvc.pdb"
785 File "${AFS_SERVER_BUILDDIR}\bosserver.pdb"
786 File "${AFS_SERVER_BUILDDIR}\buserver.pdb"
787 File "${AFS_ETC_BUILDDIR}\butc.pdb"
788 File "${AFS_SERVER_BUILDDIR}\fileserver.pdb"
789 File "${AFS_ETC_BUILDDIR}\fms.pdb"
790 File "${AFS_SERVER_BUILDDIR}\kaserver.pdb"
791 File "${AFS_SERVER_BUILDDIR}\ptserver.pdb"
792 File "${AFS_SERVER_BUILDDIR}\salvager.pdb"
793 File "${AFS_SERVER_BUILDDIR}\upclient.pdb"
794 File "${AFS_SERVER_BUILDDIR}\upserver.pdb"
795 File "${AFS_SERVER_BUILDDIR}\vlserver.pdb"
796 File "${AFS_SERVER_BUILDDIR}\volinfo.pdb"
797 File "${AFS_SERVER_BUILDDIR}\volserver.pdb"
800 ;AFS Server common files
801 SetOutPath "$INSTDIR\Common"
802 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
803 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll"
804 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
805 File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
806 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
809 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
810 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb"
811 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb"
812 File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb"
813 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb"
815 SetOutPath "$INSTDIR\Common"
819 File "${AFS_SERVER_BUILDDIR}\afsserver.cpl"
822 File "${AFS_SERVER_BUILDDIR}\afsserver.pdb"
825 ;Store install folder
826 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\AFS Server" "" $INSTDIR
828 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
829 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "VersionString" ${AFS_VERSION}
830 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Title" "AFS Server"
831 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Description" "AFS Server for Windows"
832 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PathName" "$INSTDIR\Server"
833 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Software Type" "File System"
834 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
835 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
836 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
837 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
838 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Title" "AFS Server"
839 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Description" "AFS Server for Windows"
840 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Software Type" "File System"
841 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "PathName" "$INSTDIR\Server"
842 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
843 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
844 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
846 ; Install the service
847 SetOutPath "$INSTDIR\Common"
848 File "${AFS_WININSTALL_DIR}\Service.exe"
850 File "${AFS_WININSTALL_DIR}\Service.pdb"
852 nsExec::Exec "net stop TransarcAFSServer"
853 nsExec::Exec '$INSTDIR\Common\service.exe u TransarcAFSServer'
854 nsExec::Exec '$INSTDIR\Common\service.exe TransarcAFSServer "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe" "OpenAFS AFS Server"'
855 Delete "$INSTDIR\Common\service.exe"
857 CreateDirectory "$SMPROGRAMS\OpenAFS\Server"
858 CreateShortCut "$SMPROGRAMS\OpenAFS\Server\Configuration Wizard.lnk" "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe" "/wizard"
860 WriteUninstaller "$INSTDIR\Uninstall.exe"
865 ;----------------------------
866 ; OpenAFS Control Center
867 Section "AFS Control Center" SecControl
869 SetShellVarContext all
871 SetOutPath "$INSTDIR\Control Center"
872 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager.exe"
873 File "${AFS_SERVER_BUILDDIR}\TaAfsAdmSvr.exe"
874 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager.exe"
877 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager.pdb"
878 File "${AFS_SERVER_BUILDDIR}\TaAfsAdmSvr.pdb"
879 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager.pdb"
882 ;AFS Server common files
883 Call AFSCommon.Install
885 SetOutPath "$INSTDIR\Common"
887 SetOutPath "$INSTDIR\Common"
890 File "${AFS_WININSTALL_DIR}\msvcr71d.dll"
891 File "${AFS_WININSTALL_DIR}\msvcr71d.pdb"
894 File "${AFS_WININSTALL_DIR}\msvcrtd.dll"
895 File "${AFS_WININSTALL_DIR}\msvcrtd.pdb"
897 File "${AFS_WININSTALL_DIR}\msvcrtd.dll"
898 File "${AFS_WININSTALL_DIR}\msvcrtd.pdb"
903 File "${AFS_WININSTALL_DIR}\msvcr71.dll"
906 File "${AFS_WININSTALL_DIR}\msvcrt.dll"
908 File "${AFS_WININSTALL_DIR}\msvcrt.dll"
913 ;Store install folder
914 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PathName" $INSTDIR
915 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "VersionString" ${AFS_VERSION}
916 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
917 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
918 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
919 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
920 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
921 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
922 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
925 ;Write start menu entries
926 CreateDirectory "$SMPROGRAMS\OpenAFS\Control Center"
927 CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk" "$INSTDIR\Control Center\TaAfsAccountManager.exe"
928 CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk" "$INSTDIR\Control Center\TaAfsServerManager.exe"
930 WriteUninstaller "$INSTDIR\Uninstall.exe"
935 ;----------------------------
936 ; OpenAFS Supplemental Documentation
937 Section "Supplemental Documentation" SecDocs
938 SetShellVarContext all
940 StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
941 StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
942 StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
943 StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
945 StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
947 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
948 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
949 StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
953 SetOutPath "$INSTDIR\Documentation\html"
954 File "..\..\doc\install\Documentation\en_US\html\*"
955 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
956 File "..\..\doc\install\Documentation\en_US\html\CmdRef\*"
957 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
958 File "..\..\doc\install\Documentation\en_US\html\InstallGd\*"
959 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
960 File "..\..\doc\install\Documentation\en_US\html\ReleaseNotes\*"
961 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
962 File "..\..\doc\install\Documentation\en_US\html\SysAdminGd\*"
966 SetOutPath "$INSTDIR\Documentation"
967 File "..\..\doc\install\Documentation\de_DE\README.TXT"
968 SetOutPath "$INSTDIR\Documentation\html"
969 File "..\..\doc\install\Documentation\de_DE\html\*"
970 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
971 ;File "..\..\doc\install\Documentation\de_DE\html\CmdRef\*"
972 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
973 File "..\..\doc\install\Documentation\de_DE\html\InstallGd\*"
974 ;SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
975 ;File "..\..\doc\install\Documentation\de_DE\html\ReleaseNotes\*"
976 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
977 ;File "..\..\doc\install\Documentation\de_DE\html\SysAdminGd\*"
981 SetOutPath "$INSTDIR\Documentation"
982 File "..\..\doc\install\Documentation\es_ES\README.TXT"
983 SetOutPath "$INSTDIR\Documentation\html"
984 File "..\..\doc\install\Documentation\es_ES\html\*"
985 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
986 ;File "..\..\doc\install\Documentation\es_ES\html\CmdRef\*"
987 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
988 ;File "..\..\doc\install\Documentation\es_ES\html\InstallGd\*"
989 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
990 ;File "..\..\doc\install\Documentation\es_ES\html\ReleaseNotes\*"
991 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
992 ;File "..\..\doc\install\Documentation\es_ES\html\SysAdminGd\*"
996 SetOutPath "$INSTDIR\Documentation"
997 File "..\..\doc\install\Documentation\ja_JP\README.TXT"
998 SetOutPath "$INSTDIR\Documentation\html"
999 File "..\..\doc\install\Documentation\ja_JP\html\*"
1000 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1001 File "..\..\doc\install\Documentation\ja_JP\html\CmdRef\*"
1002 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1003 File "..\..\doc\install\Documentation\ja_JP\html\InstallGd\*"
1004 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1005 ;File "..\..\doc\install\Documentation\ja_JP\html\ReleaseNotes\*"
1006 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1007 ;File "..\..\doc\install\Documentation\ja_JP\html\SysAdminGd\*"
1011 SetOutPath "$INSTDIR\Documentation"
1012 File "..\..\doc\install\Documentation\ko_KR\README.TXT"
1013 SetOutPath "$INSTDIR\Documentation\html"
1014 File "..\..\doc\install\Documentation\ko_KR\html\*"
1015 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1016 ;File "..\..\doc\install\Documentation\ko_KR\html\CmdRef\*"
1017 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1018 File "..\..\doc\install\Documentation\ko_KR\html\InstallGd\*"
1019 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1020 File "..\..\doc\install\Documentation\ko_KR\html\ReleaseNotes\*"
1021 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1022 File "..\..\doc\install\Documentation\ko_KR\html\SysAdminGd\*"
1026 SetOutPath "$INSTDIR\Documentation"
1027 File "..\..\doc\install\Documentation\pt_BR\README.TXT"
1028 SetOutPath "$INSTDIR\Documentation\html"
1029 File "..\..\doc\install\Documentation\pt_BR\html\*"
1030 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1031 ;File "..\..\doc\install\Documentation\pt_BR\html\CmdRef\*"
1032 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1033 File "..\..\doc\install\Documentation\pt_BR\html\InstallGd\*"
1034 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1035 File "..\..\doc\install\Documentation\pt_BR\html\ReleaseNotes\*"
1036 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1037 ;File "..\..\doc\install\Documentation\pt_BR\html\SysAdminGd\*"
1041 SetOutPath "$INSTDIR\Documentation"
1042 File "..\..\doc\install\Documentation\zh_CN\README.TXT"
1043 SetOutPath "$INSTDIR\Documentation\html"
1044 File "..\..\doc\install\Documentation\zh_CN\html\*"
1045 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1046 ;File "..\..\doc\install\Documentation\zh_CN\html\CmdRef\*"
1047 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1048 File "..\..\doc\install\Documentation\zh_CN\html\InstallGd\*"
1049 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1050 File "..\..\doc\install\Documentation\zh_CN\html\ReleaseNotes\*"
1051 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1052 ;File "..\..\doc\install\Documentation\zh_CN\html\SysAdminGd\*"
1056 SetOutPath "$INSTDIR\Documentation"
1057 File "..\..\doc\install\Documentation\zh_TW\README.TXT"
1058 SetOutPath "$INSTDIR\Documentation\html"
1059 File "..\..\doc\install\Documentation\zh_TW\html\*"
1060 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1061 ;File "..\..\doc\install\Documentation\zh_TW\html\CmdRef\*"
1062 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1063 File "..\..\doc\install\Documentation\zh_TW\html\InstallGd\*"
1064 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1065 File "..\..\doc\install\Documentation\zh_TW\html\ReleaseNotes\*"
1066 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1067 ;File "..\..\doc\install\Documentation\zh_TW\html\SysAdminGd\*"
1072 ;Store install folder
1073 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation" "" $INSTDIR
1074 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "VersionString" ${AFS_VERSION}
1075 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
1076 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
1077 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
1078 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
1079 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
1080 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
1081 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
1083 ; Write start menu shortcut
1084 SetOutPath "$SMPROGRAMS\OpenAFS"
1085 CreateShortCut "$SMPROGRAMS\OpenAFS\Documentation.lnk" "$INSTDIR\Documentation\html\index.htm"
1088 WriteUninstaller "$INSTDIR\Uninstall.exe"
1089 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
1092 ;Display the Finish header
1093 ;Insert this macro after the sections if you are not using a finish page
1094 ;!insertmacro MUI_SECTIONS_FINISHHEADER
1096 ;--------------------------------
1097 ;Installer Functions
1101 !insertmacro MUI_LANGDLL_DISPLAY
1103 ; Set the default install options
1108 StrCmp $R0 "true" contInstall
1110 MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "You must be an administrator of this machine to install this software."
1114 ; Our logic should be like this.
1115 ; 1) If no AFS components are installed, we do a clean install with default options. (Client/Docs)
1116 ; 2) If existing modules are installed, we keep them selected
1117 ; 3) If it is an upgrade, we set the text accordingly, else we mark it as a re-install
1119 Call IsAnyAFSInstalled
1121 StrCmp $R0 "0" DefaultOptions
1123 Call ShouldClientInstall
1126 StrCmp $R2 "0" NoClient
1127 StrCmp $R2 "2" UpgradeClient
1128 StrCmp $R3 "3" DowngradeClient
1130 SectionGetFlags ${secClient} $0
1131 IntOp $0 $0 | ${SF_SELECTED}
1132 SectionSetFlags ${secClient} $0
1133 ;# !insertmacro SelectSection ${secClient}
1136 ;StrCpy $1 ${secClient} ; Gotta remember which section we are at now...
1137 SectionGetFlags ${secClient} $0
1138 IntOp $0 $0 & ${SECTION_OFF}
1139 SectionSetFlags ${secClient} $0
1142 SectionGetFlags ${secClient} $0
1143 IntOp $0 $0 | ${SF_SELECTED}
1144 SectionSetFlags ${secClient} $0
1145 SectionSetText ${secClient} $(UPGRADE_CLIENT)
1148 SectionGetFlags ${secClient} $0
1149 IntOp $0 $0 | ${SF_SELECTED}
1150 SectionSetFlags ${secClient} $0
1151 SectionSetText ${secClient} $(REINSTALL_CLIENT)
1157 Call ShouldServerInstall
1159 StrCmp $R2 "0" NoServer
1160 StrCmp $R2 "2" UpgradeServer
1161 StrCmp $R2 "3" DowngradeServer
1163 SectionGetFlags ${secServer} $0
1164 IntOp $0 $0 | ${SF_SELECTED}
1165 SectionSetFlags ${secServer} $0
1166 ;# !insertmacro UnselectSection ${secServer}
1170 SectionGetFlags ${secServer} $0
1171 IntOp $0 $0 | ${SF_SELECTED}
1172 SectionSetFlags ${secServer} $0
1173 SectionSetText ${secServer} $(UPGRADE_SERVER)
1177 SectionGetFlags ${secServer} $0
1178 IntOp $0 $0 | ${SF_SELECTED}
1179 SectionSetFlags ${secServer} $0
1180 SectionSetText ${secServer} $(REINSTALL_SERVER)
1184 SectionGetFlags ${secServer} $0
1185 IntOp $0 $0 & ${SECTION_OFF}
1186 SectionSetFlags ${secServer} $0
1187 ;# !insertmacro UnselectSection ${secServer}
1191 ; Check control center
1192 Call IsControlInstalled
1194 StrCmp $R2 "0" NoControl
1196 SectionGetFlags ${secControl} $0
1197 IntOp $0 $0 | ${SF_SELECTED}
1198 SectionSetFlags ${secControl} $0
1202 SectionGetFlags ${secControl} $0
1203 IntOp $0 $0 & ${SECTION_OFF}
1204 SectionSetFlags ${secControl} $0
1205 ;# !insertmacro UnselectSection ${secControl}
1208 ; Check Documentation
1209 Call IsDocumentationInstalled
1211 StrCmp $R2 "0" NoDocs
1212 SectionGetFlags ${secDocs} $0
1213 IntOp $0 $0 | ${SF_SELECTED}
1214 SectionSetFlags ${secDocs} $0
1218 SectionGetFlags ${secDocs} $0
1219 IntOp $0 $0 & ${SECTION_OFF}
1220 SectionSetFlags ${secDocs} $0
1225 SectionGetFlags ${secClient} $0
1226 IntOp $0 $0 | ${SF_SELECTED}
1227 SectionSetFlags ${secClient} $0
1229 ; Server NOT selected
1230 SectionGetFlags ${secServer} $0
1231 IntOp $0 $0 & ${SECTION_OFF}
1232 SectionSetFlags ${secServer} $0
1234 ; Control Center NOT selected
1235 SectionGetFlags ${secControl} $0
1236 IntOp $0 $0 & ${SECTION_OFF}
1237 SectionSetFlags ${secControl} $0
1238 ;# !insertmacro UnselectSection ${secControl}
1240 ; Documentation selected
1241 SectionGetFlags ${secDocs} $0
1242 IntOp $0 $0 | ${SF_SELECTED}
1243 SectionSetFlags ${secDocs} $0
1244 ;# !insertmacro UnselectSection ${secDocs}
1253 File /oname=$0 CellServPage.ini
1255 File /oname=$1 AFSCell.ini
1256 ;File /oname=$1 ConfigURL.ini
1264 ;--------------------------------
1265 ; These are our cleanup functions
1266 Function .onInstFailed
1271 Function .onInstSuccess
1277 ;--------------------------------
1281 !insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
1283 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
1285 !insertmacro MUI_DESCRIPTION_TEXT ${SecServer} $(DESC_SecServer)
1286 !insertmacro MUI_DESCRIPTION_TEXT ${SecClient} $(DESC_SecClient)
1287 !insertmacro MUI_DESCRIPTION_TEXT ${SecControl} $(DESC_SecControl)
1288 !insertmacro MUI_DESCRIPTION_TEXT ${SecDocs} $(DESC_SecDocs)
1290 !insertmacro MUI_FUNCTIONS_DESCRIPTION_END
1292 !insertmacro MUI_FUNCTION_DESCRIPTION_END
1295 ;--------------------------------
1296 ;Uninstaller Section
1300 SetShellVarContext all
1301 ; Stop the running processes
1303 File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe"
1304 nsExec::Exec '$R0 afscreds.exe'
1305 nsExec::Exec '$R0 krbcc32s.exe'
1307 ; Delete the AFS service
1309 File /oname=$R0 "${AFS_WININSTALL_DIR}\Service.exe"
1310 nsExec::Exec "net stop TransarcAFSDaemon"
1311 nsExec::Exec "net stop TransarcAFSServer"
1312 nsExec::Exec '$R0 u TransarcAFSDaemon'
1313 ; After we stop the service, but before we delete it, we have to remove the volume data
1314 ; This is because the storage locations are in the registry under the service key.
1315 ; Call un.RemoveAFSVolumes
1316 nsExec::Exec '$R0 u TransarcAFSServer'
1319 Push "$INSTDIR\Client\Program"
1320 Call un.RemoveFromPath
1321 Push "$INSTDIR\Common"
1322 Call un.RemoveFromPath
1324 Push "$INSTDIR\kfw\bin"
1325 Call un.RemoveFromPath
1328 ; Delete documentation
1329 Delete "$INSTDIR\Documentation\README.TXT"
1330 Delete "$INSTDIR\Documentation\html\*"
1331 Delete "$INSTDIR\Documentation\html\CmdRef\*"
1332 Delete "$INSTDIR\Documentation\html\InstallGd\*"
1333 Delete "$INSTDIR\Documentation\html\ReleaseNotes\*"
1334 Delete "$INSTDIR\Documentation\html\SysAdminGd\*"
1336 Delete /REBOOTOK "$INSTDIR\Common\afs_config.exe"
1337 Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.dll"
1338 Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.dll"
1339 Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.dll"
1340 Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.dll"
1341 Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.dll"
1342 Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.dll"
1343 Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.dll"
1344 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll"
1345 Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.dll"
1346 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll"
1347 Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.dll"
1348 Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.dll"
1349 Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.dll"
1350 Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.dll"
1353 Delete /REBOOTOK "$INSTDIR\Common\afs_config.pdb"
1354 Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.pdb"
1355 Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.pdb"
1356 Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.pdb"
1357 Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.pdb"
1358 Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.pdb"
1359 Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.pdb"
1360 Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.pdb"
1361 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.pdb"
1362 Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.pdb"
1363 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.pdb"
1364 Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.pdb"
1365 Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.pdb"
1366 Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.pdb"
1367 Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.pdb"
1370 Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.dll"
1371 Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.pdb"
1373 Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.dll"
1374 Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.pdb"
1378 Delete /REBOOTOK "$INSTDIR\Common\msvcr71.dll"
1380 Delete /REBOOTOK "$INSTDIR\Common\msvcrt.dll"
1386 StrCmp $R1 "/S" SkipAsk
1387 ; IfFileExists "$WINDIR\afsdcell.ini" CellExists SkipDelAsk
1389 MessageBox MB_YESNO "Would you like to keep your configuration files?" IDYES SkipDel
1391 Delete "$WINDIR\afsdcell.ini"
1393 Delete "$WINDIR\afsdsbmt.ini"
1394 Delete "$WINDIR\krb5.ini"
1395 Delete "$WINDIR\afsdns.ini"
1396 Delete "$WINDIR\afs_freelance.ini"
1399 Delete "$WINDIR\afsd_init.log"
1400 Delete "$INSTDIR\Uninstall.exe"
1403 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.exe"
1404 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe"
1405 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe"
1406 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.exe"
1407 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.exe"
1408 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.exe"
1409 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.exe"
1410 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.exe"
1411 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.exe"
1412 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.exe"
1413 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\salvager.exe"
1414 Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.dll"
1415 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\upclient.exe"
1416 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\upserver.exe"
1417 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\vlserver.exe"
1418 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\volinfo.exe"
1419 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\volserver.exe"
1422 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.pdb"
1423 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.pdb"
1424 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.pdb"
1425 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.pdb"
1426 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.pdb"
1427 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.pdb"
1428 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.pdb"
1429 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.pdb"
1430 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.pdb"
1431 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.pdb"
1432 Delete "$INSTDIR\Server\usr\afs\bin\salvager.pdb"
1433 Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.pdb"
1434 Delete "$INSTDIR\Server\usr\afs\bin\upclient.pdb"
1435 Delete "$INSTDIR\Server\usr\afs\bin\upserver.pdb"
1436 Delete "$INSTDIR\Server\usr\afs\bin\vlserver.pdb"
1437 Delete "$INSTDIR\Server\usr\afs\bin\volinfo.pdb"
1438 Delete "$INSTDIR\Server\usr\afs\bin\volserver.pdb"
1441 RMDir /r "$INSTDIR\Server\usr\afs\bin"
1442 RmDir /r "$INSTDIR\Server\usr\afs\etc\logs"
1443 RmDir /r "$INSTDIR\Server\usr\afs\etc"
1444 RmDir /r "$INSTDIR\Server\usr\afs\local"
1445 RMDIR /r "$INSTDIR\Server\usr\afs\logs"
1447 Delete /REBOOTOK "$WINDIR\afsserver.cpl"
1448 Delete /REBOOTOK "$WINDIR\afs_cpa.cpl"
1451 Delete /REBOOTOK "$WINDIR\afsserver.pdb"
1452 Delete /REBOOTOK "$WINDIR\afs_cpa.pdb"
1455 RMDir /r "$INSTDIR\Documentation\html\CmdRef"
1456 RMDir /r "$INSTDIR\Documentation\html\InstallGd"
1457 RMDir /r "$INSTDIR\Documentation\html\ReleaseNotes"
1458 RMDir /r "$INSTDIR\Documentation\html\SysAdminGd"
1459 RMDIr /r "$INSTDIR\Documentation\html"
1461 RMDir "$INSTDIR\Documentation"
1462 ; Delete DOC short cut
1463 Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.exe"
1466 Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.pdb"
1469 Delete /REBOOTOK "$INSTDIR\Client\Program\*"
1470 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\*"
1471 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\afs\*"
1472 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\rx\*"
1473 Delete /REBOOTOK "$INSTDIR\Client\Program\Sample\*"
1474 RMDir "$INSTDIR\Client\Program\Sample"
1475 RMDir "$INSTDIR\Client\Program\Include\afs"
1476 RMDir "$INSTDIR\Client\Program\Include\rx"
1477 RMDir "$INSTDIR\Client\Program\Include"
1478 RMDir "$INSTDIR\Client\Program"
1479 RMDir "$INSTDIR\Client"
1483 Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.dll"
1484 Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.pdb"
1486 Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.dll"
1487 Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.pdb"
1491 Delete /REBOOTOK "$INSTDIR\Common\msvcr71.dll"
1493 Delete /REBOOTOK "$INSTDIR\Common\msvcrt.dll"
1496 Delete /REBOOTOK "$INSTDIR\Common\*"
1497 RMDir "$INSTDIR\Common"
1501 Delete /REBOOTOK "$INSTDIR\kfw\bin\*"
1502 RMDIR /r "$INSTDIR\kfw\bin"
1503 Delete /REBOOTOK "$INSTDIR\kfw\doc\*"
1504 RMDIR /r "$INSTDIR\kfw\doc"
1505 RMDIR /r "$INSTDIR\kfw"
1508 Delete "$SMPROGRAMS\OpenAFS\Documentation.lnk"
1510 ; Remove control center
1511 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.exe"
1512 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.exe"
1513 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.exe"
1514 Delete /REBOOTOK "$INSTDIR\Control Center\CCUninst.dll"
1516 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.pdb"
1517 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.pdb"
1518 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.pdb"
1520 RMDir "$INSTDIR\Control Center"
1522 Delete "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk"
1523 Delete "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk"
1524 Delete "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk"
1525 Delete "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk"
1526 RMDIR "$SMPROGRAMS\OpenAFS\Control Center"
1527 RMDir /r "$SMPROGRAMS\OpenAFS\Client"
1528 RMDir /r "$SMPROGRAMS\OpenAFS"
1529 Delete "$SMSTARTUP\AFS Credentials.lnk"
1531 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "CachePath"
1533 Delete "$R0\AFSCache"
1534 Delete "C:\AFSCache"
1536 DeleteRegKey HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension"
1537 DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32"
1538 DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
1539 DeleteRegKey HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension"
1540 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
1542 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
1543 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client"
1544 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion"
1545 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation"
1546 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion"
1547 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Control Center"
1548 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
1549 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server"
1550 DeleteRegKey /ifempty HKLM "${AFS_REGKEY_ROOT}"
1551 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS"
1552 DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled"
1557 ;Display the Finish header
1558 !insertmacro MUI_UNFINISHHEADER
1563 ;--------------------------------
1564 ;Uninstaller Functions
1568 ;Get language from registry
1569 ReadRegStr $LANGUAGE HKCU "Software\OpenAFS\AFS" "Installer Language"
1573 Function un.onUninstSuccess
1575 MessageBox MB_OK "Please reboot your machine to complete uninstallation of the software"
1579 ;------------------------------
1580 ; Get the CellServDB file from the Internet
1582 Function afs.GetCellServDB
1584 ;Check if we should download CellServDB
1585 ReadINIStr $R0 $0 "Field 4" "State"
1586 StrCmp $R0 "0" CheckIncl
1588 ReadINIStr $R0 $0 "Field 5" "State"
1589 NSISdl::download $R0 "$WINDIR\afsdcell.ini"
1590 Pop $R0 ;Get the return value
1591 StrCmp $R0 "success" +2
1592 MessageBox MB_OK|MB_ICONSTOP "Download failed: $R0"
1595 ReadINIStr $R0 $0 "Field 3" "State"
1596 StrCmp $R0 "0" CheckOther
1597 SetOutPath "$WINDIR"
1602 ReadINIStr $R0 $0 "Field 7" "State"
1603 CopyFiles $R0 "$WINDIR\afsdcell.ini"
1611 ;-------------------------------
1612 ;Do the page to get the CellServDB
1614 Function AFSPageGetCellServDB
1615 ; Set the install options here
1618 WriteINIStr $0 "Field 2" "Flags" "DISABLED"
1619 WriteINIStr $0 "Field 3" "State" "1"
1621 ; If there is an existing afsdcell.ini file, allow the user to choose it and make it default
1622 IfFileExists "$WINDIR\afsdcell.ini" +1 notpresent
1623 WriteINIStr $0 "Field 2" "Flags" "ENABLED"
1624 WriteINIStr $0 "Field 2" "State" "1"
1625 WriteINIStr $0 "Field 3" "State" "3"
1629 !insertmacro MUI_HEADER_TEXT "CellServDB Configuration" "Please choose a method for installing the CellServDB file:"
1630 InstallOptions::dialog $0
1632 StrCmp $R1 "cancel" exit
1633 StrCmp $R1 "back" done
1634 StrCmp $R1 "success" done
1638 ; Check that if a file is set, a filename is entered...
1639 ReadINIStr $R0 $0 "Field 6" "State"
1640 StrCmp $R0 "1" CheckFileName Skip
1642 ReadINIStr $R0 $0 "Field 7" "State"
1643 IfFileExists $R0 Skip
1645 MessageBox MB_OK|MB_ICONSTOP $(CellError)
1646 WriteINIStr $0 "Field 6" "State" "0"
1654 Function AFSPageGetCellName
1657 StrCmp $R1 "/S" exit
1658 !insertmacro MUI_HEADER_TEXT "Cell Name Configuration" "Please enter the name for your default cell:"
1659 InstallOptions::dialog $1
1661 StrCmp $R1 "cancel" exit
1662 StrCmp $R1 "back" done
1663 StrCmp $R1 "success" done
1669 ; Common install routines for each module
1670 Function AFSCommon.Install
1672 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayName" "OpenAFS for Windows"
1673 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "UninstallString" "$INSTDIR\uninstall.exe"
1674 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayVersion" "${AFS_VERSION}"
1675 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "URLInfoAbout" "http://www.openafs.org/"
1680 ; Check if install should be silent
1688 StrCmp $0 "/S" silent
1689 StrCmp $0 "/S " silent
1698 ; Check if uninstall should be silent
1699 Function un.IsSilent
1706 StrCmp $0 "/S" silent
1707 StrCmp $0 "/S " silent
1718 Exch $R1 ; st=haystack,old$R1, $R1=needle
1719 Exch ; st=old$R1,haystack
1720 Exch $R2 ; st=old$R1,old$R2, $R2=haystack
1732 StrCpy $R5 $R2 $R3 $R4
1738 StrCpy $R1 $R2 "" $R4
1746 ;-------------------
1747 ; Get the currently installed version and place it on the stack
1749 Function GetInstalledVersion
1754 ReadRegStr $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "VersionString"
1755 StrCmp $R0 "" NotTransarc done
1759 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "VersionString"
1768 ; Functions to get each component of the version number
1769 Function GetInstalledVersionMajor
1774 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "MajorVersion"
1775 StrCmp $R0 "" NotTransarc done
1779 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "MajorVersion"
1788 Function GetInstalledVersionMinor
1793 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "MinorVersion"
1794 StrCmp $R0 "" NotTransarc done
1798 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "MinorVersion"
1807 Function GetInstalledVersionPatch
1812 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "PatchLevel"
1813 StrCmp $R0 "" NotTransarc done
1817 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "PatchLevel"
1828 ;-------------------------------
1829 ; Check if the client should be checked for default install
1830 Function ShouldClientInstall
1832 StrCpy $R2 "AFS Client"
1833 Call GetInstalledVersion
1836 StrCmp $R0 "" NotInstalled
1837 ; Now we see if it's an older or newer version
1839 Call GetInstalledVersionMajor
1841 IntCmpU $R0 ${AFS_MAJORVERSION} +1 Upgrade Downgrade
1843 Call GetInstalledVersionMinor
1845 IntCmpU $R0 ${AFS_MINORVERSION} +1 Upgrade Downgrade
1847 Call GetInstalledVersionPatch
1849 IntCmpU $R0 ${AFS_PATCHLEVEL} Reinstall Upgrade Downgrade
1873 ;-------------------------------
1874 ; Check how the server options should be set
1875 Function ShouldServerInstall
1877 StrCpy $R2 "AFS Server"
1878 Call GetInstalledVersion
1881 StrCmp $R0 "" NotInstalled
1882 ; Now we see if it's an older or newer version
1884 Call GetInstalledVersionMajor
1886 IntCmpU $R0 ${AFS_MAJORVERSION} +1 Upgrade Downgrade
1888 Call GetInstalledVersionMinor
1890 IntCmpU $R0 ${AFS_MINORVERSION} +1 Upgrade Downgrade
1892 Call GetInstalledVersionPatch
1894 IntCmpU $R0 ${AFS_PATCHLEVEL} Reinstall Upgrade Downgrade
1919 ; See if AFS Server is installed
1920 ; Returns: "1" if it is, 0 if it is not (on the stack)
1921 Function IsServerInstalled
1923 StrCpy $R2 "AFS Server"
1924 Call GetInstalledVersion
1927 StrCmp $R0 "" NotInstalled
1940 ; See if AFS Client is installed
1941 ; Returns: "1" if it is, 0 if it is not (on the stack)
1942 Function IsClientInstalled
1944 StrCpy $R2 "AFS Client"
1945 Call GetInstalledVersion
1948 StrCmp $R0 "" NotInstalled
1962 ; See if AFS Documentation is installed
1963 ; Returns: "1" if it is, 0 if it is not (on the stack)
1964 Function IsDocumentationInstalled
1966 StrCpy $R2 "AFS Supplemental Documentation"
1967 Call GetInstalledVersion
1970 StrCmp $R0 "" NotInstalled
1983 ; See if Control Center is installed
1984 ; Returns: "1" if it is, 0 if it is not (on the stack)
1985 Function IsControlInstalled
1987 StrCpy $R2 "AFS Control Center"
1988 Call GetInstalledVersion
1991 StrCmp $R0 "" NotInstalled
2006 ; output, top of stack (replaces, with e.g. whatever)
2007 ; modifies no other variables.
2009 Function GetParameters
2013 StrCpy $R0 $CMDLINE 1
2017 StrCpy $R1 ' ' ; we're scanning for a space instead of a quote
2019 StrCpy $R0 $CMDLINE 1 $R2
2020 StrCmp $R0 $R1 loop2
2026 StrCpy $R0 $CMDLINE 1 $R2
2027 StrCmp $R0 " " loop2
2028 StrCpy $R0 $CMDLINE "" $R2
2035 ;Check to see if any AFS component is installed
2036 ;Returns: Value on stack: "1" if it is, "0" if it is not
2037 Function IsAnyAFSInstalled
2042 Call IsClientInstalled
2044 Call IsServerInstalled
2046 Call IsControlInstalled
2048 Call IsDocumentationInstalled
2050 ; Now we must see if ANY of the $Rn values are 1
2051 StrCmp $R0 "1" SomethingInstalled
2052 StrCmp $R1 "1" SomethingInstalled
2053 StrCmp $R2 "1" SomethingInstalled
2054 StrCmp $R3 "1" SomethingInstalled
2068 ;Install English Language Files
2069 Function AFSLangFiles
2071 SetOutPath "$INSTDIR\Common"
2072 File "${AFS_CLIENT_BUILDDIR}\afs_config.exe"
2073 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll"
2074 File "${AFS_SERVER_BUILDDIR}\afsadminutil.dll"
2075 File "${AFS_DESTDIR}\lib\afsauthent.dll"
2076 File "${AFS_DESTDIR}\lib\afspthread.dll"
2077 File "${AFS_DESTDIR}\lib\afsrpc.dll"
2078 File "${AFS_SERVER_BUILDDIR}\afsclientadmin.dll"
2079 File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.dll"
2080 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
2081 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.dll"
2082 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
2083 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll"
2084 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
2085 File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
2086 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
2089 File "${AFS_WININSTALL_DIR}\msvcr71d.dll"
2090 File "${AFS_WININSTALL_DIR}\msvcr71d.pdb"
2092 File "${AFS_WININSTALL_DIR}\msvcrtd.dll"
2093 File "${AFS_WININSTALL_DIR}\msvcrtd.pdb"
2097 File "${AFS_WININSTALL_DIR}\msvcr71.dll"
2099 File "${AFS_WININSTALL_DIR}\msvcrt.dll"
2104 File "${AFS_CLIENT_BUILDDIR}\afs_config.pdb"
2105 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.pdb"
2106 File "${AFS_SERVER_BUILDDIR}\afsadminutil.pdb"
2107 File "${AFS_DESTDIR}\lib\afsauthent.pdb"
2108 File "${AFS_DESTDIR}\lib\afspthread.pdb"
2109 File "${AFS_DESTDIR}\lib\afsrpc.pdb"
2110 File "${AFS_SERVER_BUILDDIR}\afsclientadmin.pdb"
2111 File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.pdb"
2112 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
2113 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.pdb"
2114 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
2115 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb"
2116 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb"
2117 File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb"
2118 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb"
2121 StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
2122 StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
2123 StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
2124 StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
2126 StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
2128 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
2129 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
2130 StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
2134 SetOutPath "$INSTDIR\Documentation"
2135 File "..\..\doc\install\Documentation\en_US\README.TXT"
2137 SetOutPath "$INSTDIR\Common"
2138 File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.dll"
2139 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.dll"
2140 File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.dll"
2141 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.dll"
2142 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.dll"
2143 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1033.dll"
2144 File "${AFS_SERVER_BUILDDIR}\afsserver_1033.dll"
2145 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.dll"
2146 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.dll"
2147 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.dll"
2148 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.dll"
2149 File "..\..\doc\help\en_US\afs-cc.CNT"
2150 File "..\..\doc\help\en_US\afs-cc.hlp"
2151 File "..\..\doc\help\en_US\afs-light.CNT"
2152 File "..\..\doc\help\en_US\afs-light.hlp"
2153 File "..\..\doc\help\en_US\afs-nt.CNT"
2154 File "..\..\doc\help\en_US\afs-nt.HLP"
2155 File "..\..\doc\help\en_US\taafscfg.CNT"
2156 File "..\..\doc\help\en_US\taafscfg.hlp"
2157 File "..\..\doc\help\en_US\taafssvrmgr.CNT"
2158 File "..\..\doc\help\en_US\taafssvrmgr.hlp"
2159 File "..\..\doc\help\en_US\taafsusrmgr.CNT"
2160 File "..\..\doc\help\en_US\taafsusrmgr.hlp"
2165 SetOutPath "$INSTDIR\Documentation"
2166 File "..\..\doc\install\Documentation\de_DE\README.TXT"
2168 SetOutPath "$INSTDIR\Common"
2169 File "${AFS_CLIENT_BUILDDIR}\afs_config_1032.dll"
2170 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1032.dll"
2171 File "${AFS_CLIENT_BUILDDIR}\afscreds_1032.dll"
2172 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.dll"
2173 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1032.dll"
2174 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1032.dll"
2175 File "${AFS_SERVER_BUILDDIR}\afsserver_1032.dll"
2176 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1032.dll"
2177 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1032.dll"
2178 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1032.dll"
2179 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1032.dll"
2180 File "..\..\doc\help\de_DE\afs-cc.CNT"
2181 File "..\..\doc\help\de_DE\afs-cc.hlp"
2182 File "..\..\doc\help\de_DE\afs-light.CNT"
2183 File "..\..\doc\help\de_DE\afs-light.hlp"
2184 File "..\..\doc\help\de_DE\afs-nt.CNT"
2185 File "..\..\doc\help\de_DE\afs-nt.HLP"
2186 File "..\..\doc\help\de_DE\taafscfg.CNT"
2187 File "..\..\doc\help\de_DE\taafscfg.hlp"
2188 File "..\..\doc\help\de_DE\taafssvrmgr.CNT"
2189 File "..\..\doc\help\de_DE\taafssvrmgr.hlp"
2190 File "..\..\doc\help\de_DE\taafsusrmgr.CNT"
2191 File "..\..\doc\help\de_DE\taafsusrmgr.hlp"
2194 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.pdb"
2195 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.pdb"
2196 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.pdb"
2197 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.pdb"
2198 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.pdb"
2199 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1033.pdb"
2200 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.pdb"
2201 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.pdb"
2202 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.pdb"
2203 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.pdb"
2205 File "${AFS_WININSTALL_DIR}\msvcr71d.dll"
2206 File "${AFS_WININSTALL_DIR}\msvcr71d.pdb"
2208 File "${AFS_WININSTALL_DIR}\msvcrtd.dll"
2209 File "${AFS_WININSTALL_DIR}\msvcrtd.pdb"
2216 SetOutPath "$INSTDIR\Documentation"
2217 File "..\..\doc\install\Documentation\es_ES\README.TXT"
2219 SetOutPath "$INSTDIR\Common"
2220 File "${AFS_CLIENT_BUILDDIR}\afs_config_1034.dll"
2221 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.dll"
2222 File "${AFS_CLIENT_BUILDDIR}\afscreds_1034.dll"
2223 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.dll"
2224 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1034.dll"
2225 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1034.dll"
2226 File "${AFS_SERVER_BUILDDIR}\afsserver_1034.dll"
2227 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1034.dll"
2228 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1034.dll"
2229 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1034.dll"
2230 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1034.dll"
2231 File "..\..\doc\help\es_ES\afs-cc.CNT"
2232 File "..\..\doc\help\es_ES\afs-cc.hlp"
2233 File "..\..\doc\help\es_ES\afs-light.CNT"
2234 File "..\..\doc\help\es_ES\afs-light.hlp"
2235 File "..\..\doc\help\es_ES\afs-nt.CNT"
2236 File "..\..\doc\help\es_ES\afs-nt.HLP"
2237 File "..\..\doc\help\es_ES\taafscfg.CNT"
2238 File "..\..\doc\help\es_ES\taafscfg.hlp"
2239 File "..\..\doc\help\es_ES\taafssvrmgr.CNT"
2240 File "..\..\doc\help\es_ES\taafssvrmgr.hlp"
2241 File "..\..\doc\help\es_ES\taafsusrmgr.CNT"
2242 File "..\..\doc\help\es_ES\taafsusrmgr.hlp"
2247 SetOutPath "$INSTDIR\Documentation"
2248 File "..\..\doc\install\Documentation\ja_JP\README.TXT"
2250 SetOutPath "$INSTDIR\Common"
2251 File "${AFS_CLIENT_BUILDDIR}\afs_config_1041.dll"
2252 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.dll"
2253 File "${AFS_CLIENT_BUILDDIR}\afscreds_1041.dll"
2254 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.dll"
2255 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1041.dll"
2256 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1041.dll"
2257 File "${AFS_SERVER_BUILDDIR}\afsserver_1041.dll"
2258 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1041.dll"
2259 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1041.dll"
2260 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1041.dll"
2261 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1041.dll"
2262 File "..\..\doc\help\ja_JP\afs-cc.CNT"
2263 File "..\..\doc\help\ja_JP\afs-cc.hlp"
2264 File "..\..\doc\help\ja_JP\afs-light.CNT"
2265 File "..\..\doc\help\ja_JP\afs-light.hlp"
2266 File "..\..\doc\help\ja_JP\afs-nt.CNT"
2267 File "..\..\doc\help\ja_JP\afs-nt.HLP"
2268 File "..\..\doc\help\ja_JP\taafscfg.CNT"
2269 File "..\..\doc\help\ja_JP\taafscfg.hlp"
2270 File "..\..\doc\help\ja_JP\taafssvrmgr.CNT"
2271 File "..\..\doc\help\ja_JP\taafssvrmgr.hlp"
2272 File "..\..\doc\help\ja_JP\taafsusrmgr.CNT"
2273 File "..\..\doc\help\ja_JP\taafsusrmgr.hlp"
2278 SetOutPath "$INSTDIR\Documentation"
2279 File "..\..\doc\install\Documentation\ko_KR\README.TXT"
2281 SetOutPath "$INSTDIR\Common"
2282 File "${AFS_CLIENT_BUILDDIR}\afs_config_1042.dll"
2283 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.dll"
2284 File "${AFS_CLIENT_BUILDDIR}\afscreds_1042.dll"
2285 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.dll"
2286 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1042.dll"
2287 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1042.dll"
2288 File "${AFS_SERVER_BUILDDIR}\afsserver_1042.dll"
2289 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1042.dll"
2290 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1042.dll"
2291 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1042.dll"
2292 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1042.dll"
2293 File "..\..\doc\help\ko_KR\afs-cc.CNT"
2294 File "..\..\doc\help\ko_KR\afs-cc.hlp"
2295 File "..\..\doc\help\ko_KR\afs-light.CNT"
2296 File "..\..\doc\help\ko_KR\afs-light.hlp"
2297 File "..\..\doc\help\ko_KR\afs-nt.CNT"
2298 File "..\..\doc\help\ko_KR\afs-nt.HLP"
2299 File "..\..\doc\help\ko_KR\taafscfg.CNT"
2300 File "..\..\doc\help\ko_KR\taafscfg.hlp"
2301 File "..\..\doc\help\ko_KR\taafssvrmgr.CNT"
2302 File "..\..\doc\help\ko_KR\taafssvrmgr.hlp"
2303 File "..\..\doc\help\ko_KR\taafsusrmgr.CNT"
2304 File "..\..\doc\help\ko_KR\taafsusrmgr.hlp"
2310 SetOutPath "$INSTDIR\Documentation"
2311 File "..\..\doc\install\Documentation\pt_BR\README.TXT"
2313 SetOutPath "$INSTDIR\Common"
2314 File "${AFS_CLIENT_BUILDDIR}\afs_config_1046.dll"
2315 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.dll"
2316 File "${AFS_CLIENT_BUILDDIR}\afscreds_1046.dll"
2317 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.dll"
2318 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1046.dll"
2319 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1046.dll"
2320 File "${AFS_SERVER_BUILDDIR}\afsserver_1046.dll"
2321 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1046.dll"
2322 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1046.dll"
2323 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1046.dll"
2324 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1046.dll"
2325 File "..\..\doc\help\pt_BR\afs-cc.CNT"
2326 File "..\..\doc\help\pt_BR\afs-cc.hlp"
2327 File "..\..\doc\help\pt_BR\afs-light.CNT"
2328 File "..\..\doc\help\pt_BR\afs-light.hlp"
2329 File "..\..\doc\help\pt_BR\afs-nt.CNT"
2330 File "..\..\doc\help\pt_BR\afs-nt.HLP"
2331 File "..\..\doc\help\pt_BR\taafscfg.CNT"
2332 File "..\..\doc\help\pt_BR\taafscfg.hlp"
2333 File "..\..\doc\help\pt_BR\taafssvrmgr.CNT"
2334 File "..\..\doc\help\pt_BR\taafssvrmgr.hlp"
2335 File "..\..\doc\help\pt_BR\taafsusrmgr.CNT"
2336 File "..\..\doc\help\pt_BR\taafsusrmgr.hlp"
2341 SetOutPath "$INSTDIR\Documentation"
2342 File "..\..\doc\install\Documentation\zh_CN\README.TXT"
2344 SetOutPath "$INSTDIR\Common"
2345 File "${AFS_CLIENT_BUILDDIR}\afs_config_2052.dll"
2346 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.dll"
2347 File "${AFS_CLIENT_BUILDDIR}\afscreds_2052.dll"
2348 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.dll"
2349 File "${AFS_SERVER_BUILDDIR}\afseventmsg_2052.dll"
2350 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_2052.dll"
2351 File "${AFS_SERVER_BUILDDIR}\afsserver_2052.dll"
2352 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_2052.dll"
2353 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_2052.dll"
2354 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_2052.dll"
2355 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_2052.dll"
2356 File "..\..\doc\help\zh_CN\afs-cc.CNT"
2357 File "..\..\doc\help\zh_CN\afs-cc.hlp"
2358 File "..\..\doc\help\zh_CN\afs-light.CNT"
2359 File "..\..\doc\help\zh_CN\afs-light.hlp"
2360 File "..\..\doc\help\zh_CN\afs-nt.CNT"
2361 File "..\..\doc\help\zh_CN\afs-nt.HLP"
2362 File "..\..\doc\help\zh_CN\taafscfg.CNT"
2363 File "..\..\doc\help\zh_CN\taafscfg.hlp"
2364 File "..\..\doc\help\zh_CN\taafssvrmgr.CNT"
2365 File "..\..\doc\help\zh_CN\taafssvrmgr.hlp"
2366 File "..\..\doc\help\zh_CN\taafsusrmgr.CNT"
2367 File "..\..\doc\help\zh_CN\taafsusrmgr.hlp"
2372 SetOutPath "$INSTDIR\Documentation"
2373 File "..\..\doc\install\Documentation\zh_TW\README.TXT"
2375 SetOutPath "$INSTDIR\Common"
2376 File "${AFS_CLIENT_BUILDDIR}\afs_config_1028.dll"
2377 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.dll"
2378 File "${AFS_CLIENT_BUILDDIR}\afscreds_1028.dll"
2379 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.dll"
2380 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1028.dll"
2381 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1028.dll"
2382 File "${AFS_SERVER_BUILDDIR}\afsserver_1028.dll"
2383 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1028.dll"
2384 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1028.dll"
2385 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1028.dll"
2386 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1028.dll"
2387 File "..\..\doc\help\zh_TW\afs-cc.CNT"
2388 File "..\..\doc\help\zh_TW\afs-cc.hlp"
2389 File "..\..\doc\help\zh_TW\afs-light.CNT"
2390 File "..\..\doc\help\zh_TW\afs-light.hlp"
2391 File "..\..\doc\help\zh_TW\afs-nt.CNT"
2392 File "..\..\doc\help\zh_TW\afs-nt.HLP"
2393 File "..\..\doc\help\zh_TW\taafscfg.CNT"
2394 File "..\..\doc\help\zh_TW\taafscfg.hlp"
2395 File "..\..\doc\help\zh_TW\taafssvrmgr.CNT"
2396 File "..\..\doc\help\zh_TW\taafssvrmgr.hlp"
2397 File "..\..\doc\help\zh_TW\taafsusrmgr.CNT"
2398 File "..\..\doc\help\zh_TW\taafsusrmgr.hlp"
2406 ;====================================================
2407 ; AddToPath - Adds the given dir to the search path.
2408 ; Input - head of the stack
2409 ; Note - Win9x systems requires reboot
2410 ;====================================================
2417 StrCmp $1 1 AddToPath_NT
2420 FileOpen $1 "$1\autoexec.bat" a
2422 GetFullPathName /SHORT $0 $0
2423 FileWrite $1 "$\r$\nSET PATH=%PATH%;$0$\r$\n"
2428 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
2429 StrCmp $1 "" AddToPath_NTdoIt
2431 Goto AddToPath_NTdoIt
2433 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $0
2434 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
2441 ;====================================================
2442 ; RemoveFromPath - Remove a given dir from the path
2443 ; Input: head of the stack
2444 ;====================================================
2445 Function un.RemoveFromPath
2454 StrCmp $1 1 unRemoveFromPath_NT
2457 FileOpen $1 "$1\autoexec.bat" r
2460 GetFullPathName /SHORT $0 $0
2461 StrCpy $0 "SET PATH=%PATH%;$0"
2463 Goto unRemoveFromPath_dosLoop
2465 unRemoveFromPath_dosLoop:
2467 StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoop
2468 StrCmp $3 "$0$\n" unRemoveFromPath_dosLoop
2469 StrCmp $3 "$0" unRemoveFromPath_dosLoop
2470 StrCmp $3 "" unRemoveFromPath_dosLoopEnd
2472 Goto unRemoveFromPath_dosLoop
2474 unRemoveFromPath_dosLoopEnd:
2478 Delete "$1\autoexec.bat"
2479 CopyFiles /SILENT $4 "$1\autoexec.bat"
2481 Goto unRemoveFromPath_done
2483 unRemoveFromPath_NT:
2485 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
2488 Call un.StrStr ; Find $0 in $1
2489 Pop $0 ; pos of our dir
2490 IntCmp $0 -1 unRemoveFromPath_done
2491 ; else, it is in path
2492 StrCpy $3 $1 $0 ; $3 now has the part of the path before our dir
2493 IntOp $2 $2 + $0 ; $2 now contains the pos after our dir in the path (';')
2494 IntOp $2 $2 + 1 ; $2 now containts the pos after our dir and the semicolon.
2499 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $3
2500 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
2502 unRemoveFromPath_done:
2510 ;====================================================
2511 ; IsNT - Returns 1 if the current system is NT, 0
2513 ; Output: head of the stack
2514 ;====================================================
2517 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
2518 StrCmp $0 "" 0 IsNT_yes
2530 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2532 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2535 ;====================================================
2536 ; StrStr - Finds a given string in another given string.
2537 ; Returns -1 if not found and the pos if found.
2538 ; Input: head of the stack - string to find
2539 ; second in the stack - string to find in
2540 ; Output: head of the stack
2541 ;====================================================
2545 Pop $0 ; $0 now have the string to find
2548 Pop $1 ; $1 now have the string to find in
2562 IntCmp $2 $4 0 0 unStrStrReturn_notFound
2564 StrCmp $5 $0 unStrStr_done unStrStr_loop
2566 unStrStrReturn_notFound:
2579 ;====================================================
2580 ; IsNT - Returns 1 if the current system is NT, 0
2582 ; Output: head of the stack
2583 ;====================================================
2586 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
2587 StrCmp $0 "" 0 unIsNT_yes
2599 !ifdef ADDSHAREDDLLUSED
2602 ; Increments a shared DLLs reference count.
2603 ; Use by passing one item on the stack (the full path of the DLL).
2606 ; Push $SYSDIR\myDll.dll
2610 Function AddSharedDLL
2613 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
2615 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
2621 ; un.RemoveSharedDLL
2623 ; Decrements a shared DLLs reference count, and removes if necessary.
2624 ; Use by passing one item on the stack (the full path of the DLL).
2625 ; Note: for use in the main installer (not the uninstaller), rename the
2626 ; function to RemoveSharedDLL.
2629 ; Push $SYSDIR\myDll.dll
2630 ; Call un.RemoveSharedDLL
2633 Function un.RemoveSharedDLL
2636 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
2637 StrCmp $R0 "" remove
2639 IntCmp $R0 0 rk rk uk
2641 DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
2644 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
2647 Delete /REBOOTOK $R1
2654 !ifdef INSTALL_LOOPBACK
2655 Function afs.InstallMSLoopback
2657 File /oname=$R0 "loopback_install.dll"
2658 nsExec::Exec "rundll32.exe $R0 doLoopBackEntry quiet"
2659 Call GetWindowsVersion
2661 StrCmp $R1 "2000" +1 +2
2662 nsExec::Exec "rundll32.exe $R0 disableLoopBackEntry"
2670 ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
2671 ; Updated by Joost Verburg
2673 ; Returns on top of stack
2675 ; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003)
2677 ; '' (Unknown Windows Version)
2680 ; Call GetWindowsVersion
2682 ; ; at this point $R0 is "NT 4.0" or whatnot
2684 Function GetWindowsVersion
2691 ReadRegStr $R0 HKLM \
2692 "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
2694 IfErrors 0 lbl_winnt
2697 ReadRegStr $R0 HKLM \
2698 "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
2701 StrCmp $R1 '4' 0 lbl_error
2705 StrCmp $R1 '4.0' lbl_win32_95
2706 StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
2724 StrCmp $R1 '3' lbl_winnt_x
2725 StrCmp $R1 '4' lbl_winnt_x
2729 StrCmp $R1 '5.0' lbl_winnt_2000
2730 StrCmp $R1 '5.1' lbl_winnt_XP
2731 StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
2734 StrCpy $R0 "NT $R0" 6
2759 ; Author: Lilla (lilla@earthlink.net) 2003-06-13
2760 ; function IsUserAdmin uses plugin \NSIS\PlusgIns\UserInfo.dll
2761 ; This function is based upon code in \NSIS\Contrib\UserInfo\UserInfo.nsi
2762 ; This function was tested under NSIS 2 beta 4 (latest CVS as of this writing).
2766 ; Pop $R0 ; at this point $R0 is "true" or "false"
2768 Function IsUserAdmin
2777 UserInfo::GetAccountType
2780 StrCmp $R2 "Admin" 0 Continue
2781 ; Observation: I get here when running Win98SE. (Lilla)
2782 ; The functions UserInfo.dll looks for are there on Win98 too,
2783 ; but just don't work. So UserInfo.dll, knowing that admin isn't required
2784 ; on Win98, returns admin anyway. (per kichik)
2785 ; MessageBox MB_OK 'User "$R1" is in the Administrators group'
2790 ; You should still check for an empty string because the functions
2791 ; UserInfo.dll looks for may not be present on Windows 95. (per kichik)
2794 ;MessageBox MB_OK 'User "$R1" is in the "$R2" group'
2798 ; comment/message below is by UserInfo.nsi author:
2799 ; This one means you don't need to care about admin or
2800 ; not admin because Windows 9x doesn't either
2801 ;MessageBox MB_OK "Error! This DLL can't run under Windows 9x!"
2805 ;MessageBox MB_OK 'User= "$R1" AccountType= "$R2" IsUserAdmin= "$R0"'