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 !define MUI_PRODUCT "OpenAFS" ;Define your own software name here
11 !include nsi-includes.nsi
12 ; Define DEBUG if building a DEBUG installer
18 ;--------------------------------
23 OutFile "OpenAFSforWindows.exe"
25 OutFile "OpenAFSforWindows-DEBUG.exe"
29 !define MUI_ICON "..\..\client_config\afs_config.ico"
30 ; This is an absolute path to the NSIS install directory--we need to make this a variable
31 !define MUI_UNICON "c:\Program Files\NSIS\Contrib\Icons\normal-uninstall.ico"
32 !define AFS_COMPANY_NAME "OpenAFS"
33 !define AFS_PRODUCT_NAME "OpenAFS"
34 !define AFS_REGKEY_ROOT "Software\TransarcCorporation"
37 ;Folder selection page
38 InstallDir "$PROGRAMFILES\OpenAFS\AFS"
40 ;Remember install folder
41 InstallDirRegKey HKCU "Software\TransarcCorporation" ""
43 ;Remember the installer language
44 !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
45 !define MUI_LANGDLL_REGISTRY_KEY "Software\TransarcCorporation"
46 !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
49 !define AFS_CLIENT_BUILDDIR "${AFS_DESTDIR}\root.client\usr\vice\etc"
50 !define AFS_WININSTALL_DIR "${AFS_DESTDIR}\WinInstall\Config"
51 !define AFS_BUILD_INCDIR "${AFS_DESTDIR}\include"
52 !define AFS_CLIENT_LIBDIR "${AFS_DESTDIR}\lib"
53 !define AFS_SERVER_BUILDDIR "${AFS_DESTDIR}\root.server\usr\afs\bin"
54 !define AFS_ETC_BUILDDIR "${AFS_DESTDIR}\etc"
56 ;--------------------------------
57 ;Modern UI Configuration
59 ;!define MUI_LICENSEPAGE
60 !define MUI_CUSTOMPAGECOMMANDS
61 !define MUI_WELCOMEPAGE
62 !define MUI_COMPONENTSPAGE
63 !define MUI_COMPONENTSPAGE_SMALLDESC
64 !define MUI_DIRECTORYPAGE
66 !define MUI_ABORTWARNING
67 !define MUI_FINISHPAGE
69 !define MUI_UNINSTALLER
70 !define MUI_UNCONFIRMPAGE
73 !insertmacro MUI_PAGECOMMAND_WELCOME
74 ;!insertmacro MUI_PAGECOMMAND_LICENSE
75 !insertmacro MUI_PAGECOMMAND_COMPONENTS
76 !insertmacro MUI_PAGECOMMAND_DIRECTORY
77 Page custom AFSPageGetCellServDB
78 Page custom AFSPageGetCellName
79 ;Page custom AFSPageGetConfigURL
80 !insertmacro MUI_PAGECOMMAND_INSTFILES
81 !insertmacro MUI_PAGECOMMAND_FINISH
83 ;LicenseData "Licenses.rtf"
84 ;--------------------------------
87 !insertmacro MUI_LANGUAGE "English"
88 ;!insertmacro MUI_LANGUAGE "French"
89 !insertmacro MUI_LANGUAGE "German"
90 !insertmacro MUI_LANGUAGE "Spanish"
91 !insertmacro MUI_LANGUAGE "SimpChinese"
92 !insertmacro MUI_LANGUAGE "TradChinese"
93 !insertmacro MUI_LANGUAGE "Japanese"
94 ;!insertmacro MUI_LANGUAGE "Korean"
95 ;!insertmacro MUI_LANGUAGE "Italian"
96 ;!insertmacro MUI_LANGUAGE "Dutch"
97 ;!insertmacro MUI_LANGUAGE "Danish"
98 ;!insertmacro MUI_LANGUAGE "Greek"
99 ;!insertmacro MUI_LANGUAGE "Russian"
100 !insertmacro MUI_LANGUAGE "PortugueseBR"
101 ;!insertmacro MUI_LANGUAGE "Polish"
102 ;!insertmacro MUI_LANGUAGE "Ukrainian"
103 ;!insertmacro MUI_LANGUAGE "Czech"
104 ;!insertmacro MUI_LANGUAGE "Slovak"
105 ;!insertmacro MUI_LANGUAGE "Croatian"
106 ;!insertmacro MUI_LANGUAGE "Bulgarian"
107 ;!insertmacro MUI_LANGUAGE "Hungarian"
108 ;!insertmacro MUI_LANGUAGE "Thai"
109 ;!insertmacro MUI_LANGUAGE "Romanian"
110 ;!insertmacro MUI_LANGUAGE "Macedonian"
111 ;!insertmacro MUI_LANGUAGE "Turkish"
113 ;--------------------------------
117 LangString DESC_SecCopyUI ${LANG_ENGLISH} "OpenAFS for Windows: English"
118 ;LangString DESC_SecCopyUI ${LANG_FRENCH} "OpenAFS for Windows: French"
119 LangString DESC_SecCopyUI ${LANG_GERMAN} "OpenAFS for Windows: German"
120 LangString DESC_SecCopyUI ${LANG_SPANISH} "OpenAFS for Windows: Spanish"
121 LangString DESC_SecCopyUI ${LANG_SIMPCHINESE} "OpenAFS for Windows: Simplified Chinese"
122 LangString DESC_SecCopyUI ${LANG_TRADCHINESE} "OpenAFS for Windows: Traditional Chinese description"
123 LangString DESC_SecCopyUI ${LANG_JAPANESE} "OpenAFS for Windows: Japanese description"
124 ;LangString DESC_SecCopyUI ${LANG_KOREAN} "OpenAFS for Windows: Korean description"
125 ;LangString DESC_SecCopyUI ${LANG_ITALIAN} "OpenAFS for Windows: Italian description"
126 ;LangString DESC_SecCopyUI ${LANG_DUTCH} "OpenAFS for Windows: Dutch description"
127 ;LangString DESC_SecCopyUI ${LANG_DANISH} "OpenAFS for Windows: Danish description"
128 ;LangString DESC_SecCopyUI ${LANG_GREEK} "OpenAFS for Windows: Greek description"
129 ;LangString DESC_SecCopyUI ${LANG_RUSSIAN} "OpenAFS for Windows: Russian description"
130 LangString DESC_SecCopyUI ${LANG_PORTUGUESEBR} "OpenAFS for Windows: Portuguese (Brasil) description"
131 ;LangString DESC_SecCopyUI ${LANG_POLISH} "OpenAFS for Windows: Polish description"
132 ;LangString DESC_SecCopyUI ${LANG_UKRAINIAN} "OpenAFS for Windows: Ukrainian description"
133 ;LangString DESC_SecCopyUI ${LANG_CZECH} "OpenAFS for Windows: Czechian description"
134 ;LangString DESC_SecCopyUI ${LANG_SLOVAK} "OpenAFS for Windows: Slovakian description"
135 ;LangString DESC_SecCopyUI ${LANG_CROATIAN} "OpenAFS for Windows: Slovakian description"
136 ;LangString DESC_SecCopyUI ${LANG_BULGARIAN} "OpenAFS for Windows: Bulgarian description"
137 ;LangString DESC_SecCopyUI ${LANG_HUNGARIAN} "OpenAFS for Windows: Hungarian description"
138 ;LangString DESC_SecCopyUI ${LANG_THAI} "OpenAFS for Windows: Thai description"
139 ;LangString DESC_SecCopyUI ${LANG_ROMANIAN} "OpenAFS for Windows: Romanian description"
140 ;LangString DESC_SecCopyUI ${LANG_MACEDONIAN} "OpenAFS for Windows: Macedonian description"
141 ;LangString DESC_SecCopyUI ${LANG_TURKISH} "OpenAFS for Windows: Turkish description"
143 LangString DESC_SecClient ${LANG_ENGLISH} "OpenAFS Client: Allows you to access AFS from your Windows PC."
144 LangString DESC_SecClient ${LANG_GERMAN} "OpenAFS Client: Allows you to access AFS from your Windows PC."
145 LangString DESC_SecClient ${LANG_SPANISH} "OpenAFS Client: Allows you to access AFS from your Windows PC."
146 LangString DESC_SecClient ${LANG_SIMPCHINESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
147 LangString DESC_SecClient ${LANG_TRADCHINESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
148 LangString DESC_SecClient ${LANG_JAPANESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
149 ;LangString DESC_SecClient ${LANG_KOREAN} "OpenAFS Client: Allows you to access AFS from your Windows PC."
150 LangString DESC_SecClient ${LANG_PORTUGUESEBR} "OpenAFS Client: Allows you to access AFS from your Windows PC."
152 LangString DESC_SecServer ${LANG_ENGLISH} "OpenAFS Server: Allows you to run an AFS file server."
153 LangString DESC_SecServer ${LANG_GERMAN} "OpenAFS Server: Allows you to run an AFS file server."
154 LangString DESC_SecServer ${LANG_SPANISH} "OpenAFS Server: Allows you to run an AFS file server."
155 LangString DESC_SecServer ${LANG_SIMPCHINESE} "OpenAFS Server: Allows you to run an AFS file server."
156 LangString DESC_SecServer ${LANG_TRADCHINESE} "OpenAFS Server: Allows you to run an AFS file server."
157 LangString DESC_SecServer ${LANG_JAPANESE} "OpenAFS Server: Allows you to run an AFS file server."
158 ;LangString DESC_SecServer ${LANG_KOREAN} "OpenAFS Server: Allows you to run an AFS file server."
159 LangString DESC_SecServer ${LANG_PORTUGUESEBR} "OpenAFS Server: Allows you to run an AFS file server."
161 LangString DESC_SecControl ${LANG_ENGLISH} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
162 LangString DESC_SecControl ${LANG_GERMAN} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
163 LangString DESC_SecControl ${LANG_SPANISH} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
164 LangString DESC_SecControl ${LANG_SIMPCHINESE} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
165 LangString DESC_SecControl ${LANG_TRADCHINESE} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
166 LangString DESC_SecControl ${LANG_JAPANESE} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
167 ;LangString DESC_SecControl ${LANG_KOREAN} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
168 LangString DESC_SecControl ${LANG_PORTUGUESEBR} "OpenAFS Control Center: GUI utilities for managing and configuring AFS."
170 LangString DESC_SecDocs ${LANG_ENGLISH} "Supplemental Documentation: Additional documentation for using OpenAFS."
171 LangString DESC_SecDocs ${LANG_GERMAN} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS."
172 LangString DESC_SecDocs ${LANG_SPANISH} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS."
173 LangString DESC_SecDocs ${LANG_SIMPCHINESE} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS."
174 LangString DESC_SecDocs ${LANG_TRADCHINESE} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS."
175 LangString DESC_SecDocs ${LANG_JAPANESE} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS."
176 ;LangString DESC_SecDocs ${LANG_KOREAN} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS."
177 LangString DESC_SecDocs ${LANG_PORTUGUESEBR} "OpenAFS Supplemental Documentation: Additional documentation for using OpenAFS."
179 ; Popup error messages
180 LangString CellError ${LANG_ENGLISH} "You must specify a valid CellServDB file to copy during install"
181 LangString CellError ${LANG_GERMAN} "You must specify a valid CellServDB file to copy during the install"
182 LangString CellError ${LANG_SPANISH} "You must specify a valid CellServDB file to copy during the install"
183 LangString CellError ${LANG_SIMPCHINESE} "You must specify a valid CellServDB file to copy during the install"
184 LangString CellError ${LANG_TRADCHINESE} "You must specify a valid CellServDB file to copy during the install"
185 LangString CellError ${LANG_JAPANESE} "You must specify a valid CellServDB file to copy during the install"
186 ;LangString CellError ${LANG_KOREAN} "You must specify a valid CellServDB file to copy during the install"
187 LangString CellError ${LANG_PORTUGUESEBR} "You must specify a valid CellServDB file to copy during the install"
190 ; Upgrade/re-install strings
191 LangString UPGRADE_CLIENT ${LANG_ENGLISH} "Upgrade AFS Client"
192 LangString UPGRADE_CLIENT ${LANG_GERMAN} "Upgrade AFS Client"
193 LangString UPGRADE_CLIENT ${LANG_SPANISH} "Upgrade AFS Client"
194 LangString UPGRADE_CLIENT ${LANG_SIMPCHINESE} "Upgrade AFS Client"
195 LangString UPGRADE_CLIENT ${LANG_TRADCHINESE} "Upgrade AFS Client"
196 LangString UPGRADE_CLIENT ${LANG_JAPANESE} "Upgrade AFS Client"
197 ;LangString UPGRADE_CLIENT ${LANG_KOREAN} "Upgrade AFS Client"
198 LangString UPGRADE_CLIENT ${LANG_PORTUGUESEBR} "Upgrade AFS Client"
200 LangString REINSTALL_CLIENT ${LANG_ENGLISH} "Re-install AFS Client"
201 LangString REINSTALL_CLIENT ${LANG_GERMAN} "Re-install AFS Client"
202 LangString REINSTALL_CLIENT ${LANG_SPANISH} "Re-install AFS Client"
203 LangString REINSTALL_CLIENT ${LANG_SIMPCHINESE} "Re-install AFS Client"
204 LangString REINSTALL_CLIENT ${LANG_TRADCHINESE} "Re-install AFS Client"
205 LangString REINSTALL_CLIENT ${LANG_JAPANESE} "Re-install AFS Client"
206 ;LangString REINSTALL_CLIENT ${LANG_KOREAN} "Re-install AFS Client"
207 LangString REINSTALL_CLIENT ${LANG_PORTUGUESEBR} "Re-install AFS Client"
209 LangString UPGRADE_SERVER ${LANG_ENGLISH} "Upgrade AFS Server"
210 LangString UPGRADE_SERVER ${LANG_GERMAN} "Upgrade AFS Server"
211 LangString UPGRADE_SERVER ${LANG_SPANISH} "Upgrade AFS Server"
212 LangString UPGRADE_SERVER ${LANG_SIMPCHINESE} "Upgrade AFS Server"
213 LangString UPGRADE_SERVER ${LANG_TRADCHINESE} "Upgrade AFS Server"
214 LangString UPGRADE_SERVER ${LANG_JAPANESE} "Upgrade AFS Server"
215 ;LangString UPGRADE_SERVER ${LANG_KOREAN} "Upgrade AFS Server"
216 LangString UPGRADE_SERVER ${LANG_PORTUGUESEBR} "Upgrade AFS Server"
218 LangString REINSTALL_SERVER ${LANG_ENGLISH} "Re-install AFS Server"
219 LangString REINSTALL_SERVER ${LANG_GERMAN} "Re-install AFS Server"
220 LangString REINSTALL_SERVER ${LANG_SPANISH} "Re-install AFS Server"
221 LangString REINSTALL_SERVER ${LANG_SIMPCHINESE} "Re-install AFS Server"
222 LangString REINSTALL_SERVER ${LANG_TRADCHINESE} "Re-install AFS Server"
223 LangString REINSTALL_SERVER ${LANG_JAPANESE} "Re-install AFS Server"
224 ;LangString REINSTALL_SERVER ${LANG_KOREAN} "Re-install AFS Server"
225 LangString REINSTALL_SERVER ${LANG_PORTUGUESEBR} "Re-install AFS Server"
227 ;--------------------------------
229 ; Macro - Upgrade DLL File
230 ; Written by Joost Verburg
231 ; ------------------------
234 ; !insertmacro UpgradeDLL "dllname.dll" "$SYSDIR\dllname.dll"
236 ; !define UPGRADEDLL_NOREGISTER if you want to upgrade a DLL which cannot be registered
238 ; Note that this macro sets overwrite to ON (the default) when it has been inserted.
239 ; If you are using another setting, set it again after inserting the macro.
242 !macro UpgradeDLL LOCALFILE DESTFILE
249 ;------------------------
250 ;Check file and version
252 IfFileExists "${DESTFILE}" "" "copy_${LOCALFILE}"
255 GetDLLVersionLocal "${LOCALFILE}" $R0 $R1
256 GetDLLVersion "${DESTFILE}" $R2 $R3
257 IfErrors "upgrade_${LOCALFILE}"
259 IntCmpU $R0 $R2 "" "done_${LOCALFILE}" "upgrade_${LOCALFILE}"
260 IntCmpU $R1 $R3 "done_${LOCALFILE}" "done_${LOCALFILE}" "upgrade_${LOCALFILE}"
262 ;------------------------
263 ;Let's upgrade the DLL!
267 "upgrade_${LOCALFILE}:"
268 !ifndef UPGRADEDLL_NOREGISTER
270 UnRegDLL "${DESTFILE}"
273 ;------------------------
274 ;Try to copy the DLL directly
277 StrCpy $R0 "${DESTFILE}"
278 Call ":file_${LOCALFILE}"
279 IfErrors "" "noreboot_${LOCALFILE}"
281 ;------------------------
282 ;DLL is in use. Copy it to a temp file and Rename it on reboot.
285 Call ":file_${LOCALFILE}"
286 Rename /REBOOTOK $R0 "${DESTFILE}"
288 ;------------------------
289 ;Register the DLL on reboot
291 !ifndef UPGRADEDLL_NOREGISTER
292 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" \
293 "Register ${DESTFILE}" '"$SYSDIR\rundll32.exe" "${DESTFILE},DllRegisterServer"'
296 Goto "done_${LOCALFILE}"
298 ;------------------------
299 ;DLL does not exist - just extract
302 StrCpy $R0 "${DESTFILE}"
303 Call ":file_${LOCALFILE}"
305 ;------------------------
308 "noreboot_${LOCALFILE}:"
309 !ifndef UPGRADEDLL_NOREGISTER
313 ;------------------------
323 ;------------------------
326 Goto "end_${LOCALFILE}"
328 ;------------------------
329 ;Called to extract the DLL
332 File /oname=$R0 "${LOCALFILE}"
337 ;------------------------
338 ;Set overwrite to default
339 ;(was set to TRY above)
346 ;--------------------------------
349 ;Things that need to be extracted on first (keep these lines before any File command!)
350 ;Only useful for BZIP2 compression
351 !insertmacro MUI_RESERVEFILE_LANGDLL
353 ;--------------------------------
356 ;----------------------
358 Section "AFS Client" SecClient
360 SetShellVarContext all
361 ; Stop any running services or we can't replace the files
362 ; Stop the running processes
364 ;File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe" ; Might not have the MSVCR71.DLL file to run
365 ;nsExec::Exec '$R0 afscreds.exe'
366 ;nsExec::Exec '$R0 krbcc32s.exe'
368 nsExec::Exec "net stop TransarcAFSDaemon"
369 nsExec::Exec "net stop TransarcAFSServer"
371 ; Do client components
372 SetOutPath "$INSTDIR\Client\Program"
373 File "${AFS_CLIENT_BUILDDIR}\afsshare.exe"
374 File "${AFS_BUILD_INCDIR}\afs\cm_config.h"
375 File "${AFS_CLIENT_BUILDDIR}\libosi.dll"
376 File "${AFS_BUILD_INCDIR}\afs\kautils.h"
377 File "${AFS_CLIENT_BUILDDIR}\libafsconf.dll"
378 File "${AFS_CLIENT_BUILDDIR}\klog.exe"
379 File "${AFS_CLIENT_BUILDDIR}\tokens.exe"
380 File "${AFS_CLIENT_BUILDDIR}\unlog.exe"
381 File "${AFS_CLIENT_BUILDDIR}\fs.exe"
382 File "${AFS_CLIENT_LIBDIR}\libafsconf.lib"
383 File "${AFS_CLIENT_LIBDIR}\afsauthent.lib"
384 File "${AFS_CLIENT_BUILDDIR}\afscreds.exe"
385 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll"
386 File "${AFS_BUILD_INCDIR}\afs\auth.h"
387 File "${AFS_CLIENT_BUILDDIR}\afsd_service.exe"
388 File "${AFS_CLIENT_BUILDDIR}\afslogon.dll"
389 File "${AFS_CLIENT_BUILDDIR}\symlink.exe"
390 File "${AFS_DESTDIR}\bin\kpasswd.exe"
391 File "${AFS_SERVER_BUILDDIR}\pts.exe"
392 File "${AFS_SERVER_BUILDDIR}\bos.exe"
393 File "${AFS_SERVER_BUILDDIR}\kas.exe"
394 File "${AFS_SERVER_BUILDDIR}\vos.exe"
395 File "${AFS_SERVER_BUILDDIR}\udebug.exe"
396 File "${AFS_DESTDIR}\bin\translate_et.exe"
397 File "${AFS_DESTDIR}\etc\rxdebug.exe"
398 File "${AFS_DESTDIR}\etc\backup.exe"
401 File "${AFS_CLIENT_BUILDDIR}\afsshare.pdb"
402 File "${AFS_CLIENT_BUILDDIR}\libosi.pdb"
403 File "${AFS_CLIENT_BUILDDIR}\libafsconf.pdb"
404 File "${AFS_CLIENT_BUILDDIR}\klog.pdb"
405 File "${AFS_CLIENT_BUILDDIR}\tokens.pdb"
406 File "${AFS_CLIENT_BUILDDIR}\unlog.pdb"
407 File "${AFS_CLIENT_BUILDDIR}\fs.pdb"
408 File "${AFS_CLIENT_BUILDDIR}\afscreds.pdb"
409 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.pdb"
410 File "${AFS_CLIENT_BUILDDIR}\afsd_service.pdb"
411 File "${AFS_CLIENT_BUILDDIR}\afslogon.pdb"
412 File "${AFS_CLIENT_BUILDDIR}\symlink.pdb"
413 File "${AFS_DESTDIR}\bin\kpasswd.pdb"
414 ;File "${AFS_SERVER_BUILDDIR}\pts.pdb"
415 File "${AFS_SERVER_BUILDDIR}\bos.pdb"
416 File "${AFS_SERVER_BUILDDIR}\kas.pdb"
417 File "${AFS_SERVER_BUILDDIR}\vos.pdb"
418 File "${AFS_SERVER_BUILDDIR}\udebug.pdb"
419 File "${AFS_DESTDIR}\bin\translate_et.pdb"
420 File "${AFS_DESTDIR}\etc\rxdebug.pdb"
421 File "${AFS_DESTDIR}\etc\backup.pdb"
425 SetOutPath "$INSTDIR\Client\Program\Include"
426 File "${AFS_BUILD_INCDIR}\lock.h"
427 File "${AFS_BUILD_INCDIR}\lwp.h"
428 File "${AFS_BUILD_INCDIR}\preempt.h"
429 File "${AFS_BUILD_INCDIR}\timer.h"
430 File "${AFS_BUILD_INCDIR}\des.h"
431 File "${AFS_BUILD_INCDIR}\des_conf.h"
432 File "${AFS_BUILD_INCDIR}\mit-cpyright.h"
433 ;File "${AFS_BUILD_INCDIR}\des-odd.h"
434 File "${AFS_BUILD_INCDIR}\crypt.h"
435 File "${AFS_BUILD_INCDIR}\pthread.h"
436 File "${AFS_BUILD_INCDIR}\dbrpc.h"
437 File "${AFS_BUILD_INCDIR}\basic.h"
438 File "${AFS_BUILD_INCDIR}\osidebug.h"
439 File "${AFS_BUILD_INCDIR}\osiltype.h"
440 File "${AFS_BUILD_INCDIR}\osistatl.h"
441 File "${AFS_BUILD_INCDIR}\trylock.h"
442 File "${AFS_BUILD_INCDIR}\main.h"
443 File "${AFS_BUILD_INCDIR}\osibasel.h"
444 File "${AFS_BUILD_INCDIR}\osifd.h"
445 File "${AFS_BUILD_INCDIR}\osiqueue.h"
446 File "${AFS_BUILD_INCDIR}\osiutils.h"
447 File "${AFS_BUILD_INCDIR}\osi.h"
448 File "${AFS_BUILD_INCDIR}\osidb.h"
449 File "${AFS_BUILD_INCDIR}\osilog.h"
450 File "${AFS_BUILD_INCDIR}\osisleep.h"
451 File "${AFS_BUILD_INCDIR}\perf.h"
452 File "${AFS_BUILD_INCDIR}\ubik.h"
453 File "${AFS_BUILD_INCDIR}\ubik_int.h"
457 SetOutPath "$INSTDIR\Client\Program\Include\afs"
458 File "${AFS_BUILD_INCDIR}\afs\afs_args.h"
459 File "${AFS_BUILD_INCDIR}\afs\debug.h"
460 File "${AFS_BUILD_INCDIR}\afs\param.h"
461 File "${AFS_BUILD_INCDIR}\afs\afs_sysnames.h"
462 ;File "${AFS_BUILD_INCDIR}\afs\permit_xprt.h"
463 File "${AFS_BUILD_INCDIR}\afs\stds.h"
464 File "${AFS_BUILD_INCDIR}\afs\icl.h"
465 File "${AFS_BUILD_INCDIR}\afs\procmgmt.h"
466 File "${AFS_BUILD_INCDIR}\afs\afsutil.h"
467 File "${AFS_BUILD_INCDIR}\afs\assert.h"
468 File "${AFS_BUILD_INCDIR}\afs\dirent.h"
469 File "${AFS_BUILD_INCDIR}\afs\errors.h"
470 File "${AFS_BUILD_INCDIR}\afs\itc.h"
471 File "${AFS_BUILD_INCDIR}\afs\vice.h"
472 File "${AFS_BUILD_INCDIR}\afs\pthread_glock.h"
473 File "${AFS_BUILD_INCDIR}\afs\errmap_nt.h"
474 File "${AFS_BUILD_INCDIR}\afs\dirpath.h"
475 File "${AFS_BUILD_INCDIR}\afs\ktime.h"
476 File "${AFS_BUILD_INCDIR}\afs\fileutil.h"
477 File "${AFS_BUILD_INCDIR}\afs\secutil_nt.h"
478 File "${AFS_BUILD_INCDIR}\afs\com_err.h"
479 File "${AFS_BUILD_INCDIR}\afs\error_table.h"
480 ;File "${AFS_BUILD_INCDIR}\afs\mit_sipb-cr.h"
481 File "${AFS_BUILD_INCDIR}\afs\cmd.h"
482 File "${AFS_BUILD_INCDIR}\afs\rxgen_consts.h"
483 File "${AFS_BUILD_INCDIR}\afs\afsint.h"
484 File "${AFS_BUILD_INCDIR}\afs\afscbint.h"
485 File "${AFS_BUILD_INCDIR}\afs\audit.h"
486 File "${AFS_BUILD_INCDIR}\afs\acl.h"
487 File "${AFS_BUILD_INCDIR}\afs\prs_fs.h"
488 File "${AFS_BUILD_INCDIR}\afs\afsd.h"
489 File "${AFS_BUILD_INCDIR}\afs\cm.h"
490 File "${AFS_BUILD_INCDIR}\afs\cm_buf.h"
491 File "${AFS_BUILD_INCDIR}\afs\cm_cell.h"
492 File "${AFS_BUILD_INCDIR}\afs\cm_config.h"
493 File "${AFS_BUILD_INCDIR}\afs\cm_conn.h"
494 File "${AFS_BUILD_INCDIR}\afs\cm_ioctl.h"
495 File "${AFS_BUILD_INCDIR}\afs\cm_scache.h"
496 File "${AFS_BUILD_INCDIR}\afs\cm_server.h"
497 File "${AFS_BUILD_INCDIR}\afs\cm_user.h"
498 File "${AFS_BUILD_INCDIR}\afs\cm_utils.h"
499 File "${AFS_BUILD_INCDIR}\afs\fs_utils.h"
500 File "${AFS_BUILD_INCDIR}\afs\krb.h"
501 File "${AFS_BUILD_INCDIR}\afs\krb_prot.h"
502 File "${AFS_BUILD_INCDIR}\afs\smb.h"
503 File "${AFS_BUILD_INCDIR}\afs\smb3.h"
504 File "${AFS_BUILD_INCDIR}\afs\smb_iocons.h"
505 File "${AFS_BUILD_INCDIR}\afs\smb_ioctl.h"
506 File "${AFS_BUILD_INCDIR}\afs\afsrpc.h"
507 File "${AFS_BUILD_INCDIR}\afs\afssyscalls.h"
508 File "${AFS_BUILD_INCDIR}\afs\pioctl_nt.h"
509 File "${AFS_BUILD_INCDIR}\afs\auth.h"
510 File "${AFS_BUILD_INCDIR}\afs\cellconfig.h"
511 File "${AFS_BUILD_INCDIR}\afs\keys.h"
512 File "${AFS_BUILD_INCDIR}\afs\ptserver.h"
513 File "${AFS_BUILD_INCDIR}\afs\ptint.h"
514 File "${AFS_BUILD_INCDIR}\afs\pterror.h"
515 File "${AFS_BUILD_INCDIR}\afs\ptint.h"
516 File "${AFS_BUILD_INCDIR}\afs\pterror.h"
517 File "${AFS_BUILD_INCDIR}\afs\ptclient.h"
518 File "${AFS_BUILD_INCDIR}\afs\prserver.h"
519 File "${AFS_BUILD_INCDIR}\afs\print.h"
520 File "${AFS_BUILD_INCDIR}\afs\prerror.h"
521 File "${AFS_BUILD_INCDIR}\afs\prclient.h"
522 File "${AFS_BUILD_INCDIR}\afs\kautils.h"
523 File "${AFS_BUILD_INCDIR}\afs\kauth.h"
524 File "${AFS_BUILD_INCDIR}\afs\kaport.h"
525 File "${AFS_BUILD_INCDIR}\afs\vl_opcodes.h"
526 File "${AFS_BUILD_INCDIR}\afs\vlserver.h"
527 File "${AFS_BUILD_INCDIR}\afs\vldbint.h"
528 File "${AFS_BUILD_INCDIR}\afs\usd.h"
529 File "${AFS_BUILD_INCDIR}\afs\bubasics.h"
530 File "${AFS_BUILD_INCDIR}\afs\butc.h"
531 File "${AFS_BUILD_INCDIR}\afs\bumon.h"
532 File "${AFS_BUILD_INCDIR}\afs\butm.h"
533 File "${AFS_BUILD_INCDIR}\afs\tcdata.h"
534 File "${AFS_BUILD_INCDIR}\afs\budb.h"
535 ;File "${AFS_BUILD_INCDIR}\afs\budb_errors.h"
536 File "${AFS_BUILD_INCDIR}\afs\budb_client.h"
537 File "${AFS_BUILD_INCDIR}\afs\dir.h"
538 File "${AFS_BUILD_INCDIR}\afs\fssync.h"
539 File "${AFS_BUILD_INCDIR}\afs\ihandle.h"
540 File "${AFS_BUILD_INCDIR}\afs\nfs.h"
541 File "${AFS_BUILD_INCDIR}\afs\ntops.h"
542 File "${AFS_BUILD_INCDIR}\afs\partition.h"
543 File "${AFS_BUILD_INCDIR}\afs\viceinode.h"
544 File "${AFS_BUILD_INCDIR}\afs\vnode.h"
545 File "${AFS_BUILD_INCDIR}\afs\volume.h"
546 File "${AFS_BUILD_INCDIR}\afs\voldefs.h"
547 File "${AFS_BUILD_INCDIR}\afs\volser.h"
548 File "${AFS_BUILD_INCDIR}\afs\volint.h"
549 File "${AFS_BUILD_INCDIR}\afs\fs_stats.h"
550 File "${AFS_BUILD_INCDIR}\afs\bosint.h"
551 File "${AFS_BUILD_INCDIR}\afs\bnode.h"
554 SetOutPath "$INSTDIR\Client\Program\Include\rx"
555 File "${AFS_BUILD_INCDIR}\rx\rx.h"
556 File "${AFS_BUILD_INCDIR}\rx\rx_packet.h"
557 File "${AFS_BUILD_INCDIR}\rx\rx_user.h"
558 File "${AFS_BUILD_INCDIR}\rx\rx_event.h"
559 File "${AFS_BUILD_INCDIR}\rx\rx_queue.h"
560 File "${AFS_BUILD_INCDIR}\rx\rx_globals.h"
561 File "${AFS_BUILD_INCDIR}\rx\rx_clock.h"
562 File "${AFS_BUILD_INCDIR}\rx\rx_misc.h"
563 File "${AFS_BUILD_INCDIR}\rx\rx_multi.h"
564 File "${AFS_BUILD_INCDIR}\rx\rx_null.h"
565 File "${AFS_BUILD_INCDIR}\rx\rx_lwp.h"
566 File "${AFS_BUILD_INCDIR}\rx\rx_pthread.h"
567 File "${AFS_BUILD_INCDIR}\rx\rx_xmit_nt.h"
568 File "${AFS_BUILD_INCDIR}\rx\xdr.h"
569 File "${AFS_BUILD_INCDIR}\rx\rxkad.h"
574 SetOutPath "$INSTDIR\Client\Program\Sample"
575 File "..\..\afsd\sample\token.c"
581 ; Do WINDOWSDIR components
582 ; Get AFS CellServDB file
583 Call afs.GetCellServDB
584 !ifdef INSTALL_LOOPBACK
585 Call afs.InstallMSLoopback
589 ; Include Kerberos for Windows files in the installer...
590 SetOutPath "$INSTDIR\kfw\bin\"
591 File "${KFW_SOURCE}\bin\*"
592 SetOutPath "$INSTDIR\kfw\doc"
593 File "${KFW_SOURCE}\doc\*"
596 ReadINIStr $R0 $0 "Field 2" "State"
597 StrCmp $R0 "1" UsePkg DontUsePkg
602 ReadINIStr $R0 $0 "Field 6" "State"
603 StrCmp $R0 "1" UseFile DontUseFile
605 ReadINIStr $R0 $0 "Field 7" "State"
606 CopyFiles $R0 "$WINDIR\afsdcell.ini"
609 ;Store install folder
610 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\Client" "" $INSTDIR
611 Call AFSCommon.Install
613 ; Write registry entries
614 WriteRegStr HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
615 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "" "AFS Client Shell Extension"
616 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "" "$INSTDIR\Client\Program\afs_shl_ext.dll"
617 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "ThreadingModel" "Apartment"
618 WriteRegStr HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
619 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "AFS Client Shell Extension"
622 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
623 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "VersionString" ${MUI_VERSION}
624 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Title" "AFS Client"
625 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Description" "AFS Client"
626 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PathName" "$INSTDIR\Client\Program"
627 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Software Type" "File System"
628 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MajorVersion" ${MUI_MAJORVERSION}
629 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MinorVersion" ${MUI_MINORVERSION}
630 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PatchLevel" ${MUI_PATCHLEVEL}
631 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${MUI_VERSION}" "VersionString" ${MUI_VERSION}
632 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${MUI_VERSION}" "Title" "AFS Client"
633 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${MUI_VERSION}" "Description" "AFS Client"
634 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${MUI_VERSION}" "Software Type" "File System"
635 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${MUI_VERSION}" "PathName" "$INSTDIR\Client\Program"
636 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${MUI_VERSION}" "MajorVersion" ${MUI_MAJORVERSION}
637 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${MUI_VERSION}" "MinorVersion" ${MUI_MINORVERSION}
638 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${MUI_VERSION}" "PatchLevel" ${MUI_PATCHLEVEL}
640 ; Set network settings
641 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled" 0
643 ;Write start menu entries
644 CreateDirectory "$SMPROGRAMS\OpenAFS\Client"
645 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
646 CreateShortCut "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk" "$INSTDIR\Client\Program\afscreds.exe"
647 CreateShortCut "$SMSTARTUP\AFS Credentials.lnk" "$INSTDIR\Client\Program\afscreds.exe"
649 Push "$INSTDIR\Client\Program"
651 Push "$INSTDIR\Common"
655 ; Add kfw to path too
656 Push "$INSTDIR\kfw\bin"
660 ; Create the AFS service
661 SetOutPath "$INSTDIR\Common"
662 File "${AFS_WININSTALL_DIR}\Service.exe"
663 nsExec::Exec "net stop TransarcAFSDaemon"
664 ;IMPORTANT! If we are not refreshing the config files, do NOT remove the service
665 ;Don't re-install because it must be present or we wouldn't have passed the Reg check
666 ReadINIStr $R2 $1 "Field 2" "State"
668 StrCmp $R2 "" skipremove
669 nsExec::Exec '$INSTDIR\Common\Service.exe u TransarcAFSDaemon'
670 nsExec::Exec '$INSTDIR\Common\Service.exe TransarcAFSDaemon "$INSTDIR\Client\Program\afsd_service.exe" "OpenAFS Client Service"'
672 Delete "$INSTDIR\Common\service.exe"
675 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "(Default)" ""
676 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
677 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Class" 2
678 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonOptions" 2
679 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonScript" "$INSTDIR\Client\Program\afscreds.exe -:%s -x"
680 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Name" "OpenAFSDaemon"
681 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "ProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
684 ReadINIStr $R0 $1 "Field 2" "State"
685 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell" $R0
686 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "ShowTrayIcon" 1
687 ;WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "SecurityLevel" 1
690 WriteUninstaller "$INSTDIR\Uninstall.exe"
694 ;------------------------
696 Section "AFS Server" SecServer
698 SetShellVarContext all
699 ; Stop any running services or we can't replace the files
700 ; Stop the running processes
702 ;File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe" ; Might not have the MSVCR71.DLL file to run
703 ;nsExec::Exec '$R0 afscreds.exe'
704 ;nsExec::Exec '$R0 krbcc32s.exe'
706 nsExec::Exec "net stop TransarcAFSDaemon"
707 nsExec::Exec "net stop TransarcAFSServer"
709 CreateDirectory "$INSTDIR\Server\usr\afs\etc"
710 CreateDirectory "$INSTDIR\Server\usr\afs\local"
711 CreateDirectory "$INSTDIR\Server\usr\afs\logs"
713 SetOutPath "$INSTDIR\Server\usr\afs\bin"
714 File "${AFS_SERVER_BUILDDIR}\afskill.exe"
715 File "${AFS_SERVER_BUILDDIR}\afssvrcfg.exe"
716 File "${AFS_SERVER_BUILDDIR}\bosctlsvc.exe"
717 File "${AFS_SERVER_BUILDDIR}\bosserver.exe"
718 File "${AFS_SERVER_BUILDDIR}\buserver.exe"
719 File "${AFS_ETC_BUILDDIR}\butc.exe"
720 File "${AFS_SERVER_BUILDDIR}\fileserver.exe"
721 File "${AFS_ETC_BUILDDIR}\fms.exe"
722 File "${AFS_SERVER_BUILDDIR}\kaserver.exe"
723 File "${AFS_SERVER_BUILDDIR}\ptserver.exe"
724 File "${AFS_SERVER_BUILDDIR}\salvager.exe"
725 File "${AFS_SERVER_BUILDDIR}\upclient.exe"
726 File "${AFS_SERVER_BUILDDIR}\upserver.exe"
727 File "${AFS_SERVER_BUILDDIR}\vlserver.exe"
728 File "${AFS_SERVER_BUILDDIR}\volinfo.exe"
729 File "${AFS_SERVER_BUILDDIR}\volserver.exe"
732 File "${AFS_SERVER_BUILDDIR}\afskill.pdb"
733 File "${AFS_SERVER_BUILDDIR}\afssvrcfg.pdb"
734 File "${AFS_SERVER_BUILDDIR}\bosctlsvc.pdb"
735 File "${AFS_SERVER_BUILDDIR}\bosserver.pdb"
736 File "${AFS_SERVER_BUILDDIR}\buserver.pdb"
737 File "${AFS_ETC_BUILDDIR}\butc.pdb"
738 File "${AFS_SERVER_BUILDDIR}\fileserver.pdb"
739 File "${AFS_ETC_BUILDDIR}\fms.pdb"
740 File "${AFS_SERVER_BUILDDIR}\kaserver.pdb"
741 File "${AFS_SERVER_BUILDDIR}\ptserver.pdb"
742 File "${AFS_SERVER_BUILDDIR}\salvager.pdb"
743 File "${AFS_SERVER_BUILDDIR}\upclient.pdb"
744 File "${AFS_SERVER_BUILDDIR}\upserver.pdb"
745 File "${AFS_SERVER_BUILDDIR}\vlserver.pdb"
746 File "${AFS_SERVER_BUILDDIR}\volinfo.pdb"
747 File "${AFS_SERVER_BUILDDIR}\volserver.pdb"
750 ;AFS Server common files
751 SetOutPath "$INSTDIR\Common"
752 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
753 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll"
754 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
755 File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
756 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
759 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
760 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb"
761 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb"
762 File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb"
763 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb"
765 SetOutPath "$INSTDIR\Common"
769 File "${AFS_SERVER_BUILDDIR}\afsserver.cpl"
772 File "${AFS_SERVER_BUILDDIR}\afsserver.pdb"
775 ;Store install folder
776 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\AFS Server" "" $INSTDIR
778 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
779 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "VersionString" ${MUI_VERSION}
780 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Title" "AFS Server"
781 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Description" "AFS Server for Windows"
782 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PathName" "$INSTDIR\Server"
783 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Software Type" "File System"
784 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "MajorVersion" ${MUI_MAJORVERSION}
785 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "MinorVersion" ${MUI_MINORVERSION}
786 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PatchLevel" ${MUI_PATCHLEVEL}
787 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${MUI_VERSION}" "VersionString" ${MUI_VERSION}
788 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${MUI_VERSION}" "Title" "AFS Server"
789 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${MUI_VERSION}" "Description" "AFS Server for Windows"
790 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${MUI_VERSION}" "Software Type" "File System"
791 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${MUI_VERSION}" "PathName" "$INSTDIR\Server"
792 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${MUI_VERSION}" "MajorVersion" ${MUI_MAJORVERSION}
793 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${MUI_VERSION}" "MinorVersion" ${MUI_MINORVERSION}
794 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${MUI_VERSION}" "PatchLevel" ${MUI_PATCHLEVEL}
796 ; Install the service
797 SetOutPath "$INSTDIR\Common"
798 File "${AFS_WININSTALL_DIR}\Service.exe"
800 File "${AFS_WININSTALL_DIR}\Service.pdb"
802 nsExec::Exec "net stop TransarcAFSServer"
803 nsExec::Exec '$INSTDIR\Common\service.exe u TransarcAFSServer'
804 nsExec::Exec '$INSTDIR\Common\service.exe TransarcAFSServer "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe" "OpenAFS AFS Server"'
805 Delete "$INSTDIR\Common\service.exe"
807 CreateDirectory "$SMPROGRAMS\OpenAFS\Server"
808 CreateShortCut "$SMPROGRAMS\OpenAFS\Server\Configuration Wizard.lnk" "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe" "/wizard"
810 WriteUninstaller "$INSTDIR\Uninstall.exe"
815 ;----------------------------
816 ; OpenAFS Control Center
817 Section "AFS Control Center" SecControl
819 SetShellVarContext all
821 SetOutPath "$INSTDIR\Control Center"
822 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager.exe"
823 File "${AFS_SERVER_BUILDDIR}\TaAfsAdmSvr.exe"
824 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager.exe"
827 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager.pdb"
828 File "${AFS_SERVER_BUILDDIR}\TaAfsAdmSvr.pdb"
829 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager.pdb"
832 ;AFS Server common files
833 Call AFSCommon.Install
835 SetOutPath "$INSTDIR\Common"
837 SetOutPath "$INSTDIR\Common"
840 File "${AFS_WININSTALL_DIR}\msvcr71d.dll"
841 File "${AFS_WININSTALL_DIR}\msvcr71d.pdb"
844 File "${AFS_WININSTALL_DIR}\msvcrtd.dll"
845 File "${AFS_WININSTALL_DIR}\msvcrtd.pdb"
847 File "${AFS_WININSTALL_DIR}\msvcrtd.dll"
848 File "${AFS_WININSTALL_DIR}\msvcrtd.pdb"
853 File "${AFS_WININSTALL_DIR}\msvcr71.dll"
856 File "${AFS_WININSTALL_DIR}\msvcrt.dll"
858 File "${AFS_WININSTALL_DIR}\msvcrt.dll"
863 ;Store install folder
864 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PathName" $INSTDIR
865 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "VersionString" ${MUI_VERSION}
866 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "MajorVersion" ${MUI_MAJORVERSION}
867 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "MinorVersion" ${MUI_MINORVERSION}
868 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PatchLevel" ${MUI_PATCHLEVEL}
869 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${MUI_VERSION}" "VersionString" ${MUI_VERSION}
870 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${MUI_VERSION}" "MajorVersion" ${MUI_MAJORVERSION}
871 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${MUI_VERSION}" "MinorVersion" ${MUI_MINORVERSION}
872 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${MUI_VERSION}" "PatchLevel" ${MUI_PATCHLEVEL}
875 ;Write start menu entries
876 CreateDirectory "$SMPROGRAMS\OpenAFS\Control Center"
877 CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk" "$INSTDIR\Control Center\TaAfsAccountManager.exe"
878 CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk" "$INSTDIR\Control Center\TaAfsServerManager.exe"
880 WriteUninstaller "$INSTDIR\Uninstall.exe"
885 ;----------------------------
886 ; OpenAFS Supplemental Documentation
887 Section "Supplemental Documentation" SecDocs
888 SetShellVarContext all
890 StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
891 StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
892 StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
893 StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
894 ;StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
895 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
896 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
897 StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
901 SetOutPath "$INSTDIR\Documentation\html"
902 File "..\..\doc\install\Documentation\en_US\html\*"
903 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
904 File "..\..\doc\install\Documentation\en_US\html\CmdRef\*"
905 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
906 File "..\..\doc\install\Documentation\en_US\html\InstallGd\*"
907 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
908 File "..\..\doc\install\Documentation\en_US\html\ReleaseNotes\*"
909 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
910 File "..\..\doc\install\Documentation\en_US\html\SysAdminGd\*"
914 SetOutPath "$INSTDIR\Documentation"
915 File "..\..\doc\install\Documentation\de_DE\README.TXT"
916 SetOutPath "$INSTDIR\Documentation\html"
917 File "..\..\doc\install\Documentation\de_DE\html\*"
918 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
919 ;File "..\..\doc\install\Documentation\de_DE\html\CmdRef\*"
920 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
921 File "..\..\doc\install\Documentation\de_DE\html\InstallGd\*"
922 ;SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
923 ;File "..\..\doc\install\Documentation\de_DE\html\ReleaseNotes\*"
924 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
925 ;File "..\..\doc\install\Documentation\de_DE\html\SysAdminGd\*"
929 SetOutPath "$INSTDIR\Documentation"
930 File "..\..\doc\install\Documentation\es_ES\README.TXT"
931 SetOutPath "$INSTDIR\Documentation\html"
932 File "..\..\doc\install\Documentation\es_ES\html\*"
933 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
934 ;File "..\..\doc\install\Documentation\es_ES\html\CmdRef\*"
935 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
936 ;File "..\..\doc\install\Documentation\es_ES\html\InstallGd\*"
937 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
938 ;File "..\..\doc\install\Documentation\es_ES\html\ReleaseNotes\*"
939 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
940 ;File "..\..\doc\install\Documentation\es_ES\html\SysAdminGd\*"
944 SetOutPath "$INSTDIR\Documentation"
945 File "..\..\doc\install\Documentation\ja_JP\README.TXT"
946 SetOutPath "$INSTDIR\Documentation\html"
947 File "..\..\doc\install\Documentation\ja_JP\html\*"
948 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
949 File "..\..\doc\install\Documentation\ja_JP\html\CmdRef\*"
950 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
951 File "..\..\doc\install\Documentation\ja_JP\html\InstallGd\*"
952 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
953 ;File "..\..\doc\install\Documentation\ja_JP\html\ReleaseNotes\*"
954 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
955 ;File "..\..\doc\install\Documentation\ja_JP\html\SysAdminGd\*"
959 SetOutPath "$INSTDIR\Documentation"
960 File "..\..\doc\install\Documentation\ko_KR\README.TXT"
961 SetOutPath "$INSTDIR\Documentation\html"
962 File "..\..\doc\install\Documentation\ko_KR\html\*"
963 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
964 ;File "..\..\doc\install\Documentation\ko_KR\html\CmdRef\*"
965 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
966 File "..\..\doc\install\Documentation\ko_KR\html\InstallGd\*"
967 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
968 File "..\..\doc\install\Documentation\ko_KR\html\ReleaseNotes\*"
969 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
970 File "..\..\doc\install\Documentation\ko_KR\html\SysAdminGd\*"
974 SetOutPath "$INSTDIR\Documentation"
975 File "..\..\doc\install\Documentation\pt_BR\README.TXT"
976 SetOutPath "$INSTDIR\Documentation\html"
977 File "..\..\doc\install\Documentation\pt_BR\html\*"
978 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
979 ;File "..\..\doc\install\Documentation\pt_BR\html\CmdRef\*"
980 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
981 File "..\..\doc\install\Documentation\pt_BR\html\InstallGd\*"
982 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
983 File "..\..\doc\install\Documentation\pt_BR\html\ReleaseNotes\*"
984 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
985 ;File "..\..\doc\install\Documentation\pt_BR\html\SysAdminGd\*"
989 SetOutPath "$INSTDIR\Documentation"
990 File "..\..\doc\install\Documentation\zh_CN\README.TXT"
991 SetOutPath "$INSTDIR\Documentation\html"
992 File "..\..\doc\install\Documentation\zh_CN\html\*"
993 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
994 ;File "..\..\doc\install\Documentation\zh_CN\html\CmdRef\*"
995 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
996 File "..\..\doc\install\Documentation\zh_CN\html\InstallGd\*"
997 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
998 File "..\..\doc\install\Documentation\zh_CN\html\ReleaseNotes\*"
999 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1000 ;File "..\..\doc\install\Documentation\zh_CN\html\SysAdminGd\*"
1004 SetOutPath "$INSTDIR\Documentation"
1005 File "..\..\doc\install\Documentation\zh_TW\README.TXT"
1006 SetOutPath "$INSTDIR\Documentation\html"
1007 File "..\..\doc\install\Documentation\zh_TW\html\*"
1008 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1009 ;File "..\..\doc\install\Documentation\zh_TW\html\CmdRef\*"
1010 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1011 File "..\..\doc\install\Documentation\zh_TW\html\InstallGd\*"
1012 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1013 File "..\..\doc\install\Documentation\zh_TW\html\ReleaseNotes\*"
1014 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1015 ;File "..\..\doc\install\Documentation\zh_TW\html\SysAdminGd\*"
1020 ;Store install folder
1021 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation" "" $INSTDIR
1022 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "VersionString" ${MUI_VERSION}
1023 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "MajorVersion" ${MUI_MAJORVERSION}
1024 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "MinorVersion" ${MUI_MINORVERSION}
1025 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "PatchLevel" ${MUI_PATCHLEVEL}
1026 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${MUI_VERSION}" "VersionString" ${MUI_VERSION}
1027 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${MUI_VERSION}" "MajorVersion" ${MUI_MAJORVERSION}
1028 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${MUI_VERSION}" "MinorVersion" ${MUI_MINORVERSION}
1029 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${MUI_VERSION}" "PatchLevel" ${MUI_PATCHLEVEL}
1031 ; Write start menu shortcut
1032 SetOutPath "$SMPROGRAMS\OpenAFS"
1033 CreateShortCut "$SMPROGRAMS\OpenAFS\Documentation.lnk" "$INSTDIR\Documentation\html\index.htm"
1036 WriteUninstaller "$INSTDIR\Uninstall.exe"
1037 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
1040 ;Display the Finish header
1041 ;Insert this macro after the sections if you are not using a finish page
1042 ;!insertmacro MUI_SECTIONS_FINISHHEADER
1044 ;--------------------------------
1045 ;Installer Functions
1049 !insertmacro MUI_LANGDLL_DISPLAY
1051 ; Set the default install options
1056 StrCmp $R0 "true" contInstall
1058 MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "You must be an administrator of this machine to install this software."
1062 ; Our logic should be like this.
1063 ; 1) If no AFS components are installed, we do a clean install with default options. (Client/Docs)
1064 ; 2) If existing modules are installed, we keep them selected
1065 ; 3) If it is an upgrade, we set the text accordingly, else we mark it as a re-install
1067 Call IsAnyAFSInstalled
1069 StrCmp $R0 "0" DefaultOptions
1071 Call ShouldClientInstall
1074 StrCmp $R2 "0" NoClient
1075 StrCmp $R2 "2" UpgradeClient
1076 StrCmp $R3 "3" DowngradeClient
1078 SectionGetFlags ${secClient} $0
1079 IntOp $0 $0 | ${SF_SELECTED}
1080 SectionSetFlags ${secClient} $0
1081 ;# !insertmacro SelectSection ${secClient}
1084 ;StrCpy $1 ${secClient} ; Gotta remember which section we are at now...
1085 SectionGetFlags ${secClient} $0
1086 IntOp $0 $0 & ${SECTION_OFF}
1087 SectionSetFlags ${secClient} $0
1090 SectionGetFlags ${secClient} $0
1091 IntOp $0 $0 | ${SF_SELECTED}
1092 SectionSetFlags ${secClient} $0
1093 SectionSetText ${secClient} $(UPGRADE_CLIENT)
1096 SectionGetFlags ${secClient} $0
1097 IntOp $0 $0 | ${SF_SELECTED}
1098 SectionSetFlags ${secClient} $0
1099 SectionSetText ${secClient} $(REINSTALL_CLIENT)
1105 Call ShouldServerInstall
1107 StrCmp $R2 "0" NoServer
1108 StrCmp $R2 "2" UpgradeServer
1109 StrCmp $R2 "3" DowngradeServer
1111 SectionGetFlags ${secServer} $0
1112 IntOp $0 $0 | ${SF_SELECTED}
1113 SectionSetFlags ${secServer} $0
1114 ;# !insertmacro UnselectSection ${secServer}
1118 SectionGetFlags ${secServer} $0
1119 IntOp $0 $0 | ${SF_SELECTED}
1120 SectionSetFlags ${secServer} $0
1121 SectionSetText ${secServer} $(UPGRADE_SERVER)
1125 SectionGetFlags ${secServer} $0
1126 IntOp $0 $0 | ${SF_SELECTED}
1127 SectionSetFlags ${secServer} $0
1128 SectionSetText ${secServer} $(REINSTALL_SERVER)
1132 SectionGetFlags ${secServer} $0
1133 IntOp $0 $0 & ${SECTION_OFF}
1134 SectionSetFlags ${secServer} $0
1135 ;# !insertmacro UnselectSection ${secServer}
1139 ; Check control center
1140 Call IsControlInstalled
1142 StrCmp $R2 "0" NoControl
1144 SectionGetFlags ${secControl} $0
1145 IntOp $0 $0 | ${SF_SELECTED}
1146 SectionSetFlags ${secControl} $0
1150 SectionGetFlags ${secControl} $0
1151 IntOp $0 $0 & ${SECTION_OFF}
1152 SectionSetFlags ${secControl} $0
1153 ;# !insertmacro UnselectSection ${secControl}
1156 ; Check Documentation
1157 Call IsDocumentationInstalled
1159 StrCmp $R2 "0" NoDocs
1160 SectionGetFlags ${secDocs} $0
1161 IntOp $0 $0 | ${SF_SELECTED}
1162 SectionSetFlags ${secDocs} $0
1166 SectionGetFlags ${secDocs} $0
1167 IntOp $0 $0 & ${SECTION_OFF}
1168 SectionSetFlags ${secDocs} $0
1173 SectionGetFlags ${secClient} $0
1174 IntOp $0 $0 | ${SF_SELECTED}
1175 SectionSetFlags ${secClient} $0
1177 ; Server NOT selected
1178 SectionGetFlags ${secServer} $0
1179 IntOp $0 $0 & ${SECTION_OFF}
1180 SectionSetFlags ${secServer} $0
1182 ; Control Center NOT selected
1183 SectionGetFlags ${secControl} $0
1184 IntOp $0 $0 & ${SECTION_OFF}
1185 SectionSetFlags ${secControl} $0
1186 ;# !insertmacro UnselectSection ${secControl}
1188 ; Documentation selected
1189 SectionGetFlags ${secDocs} $0
1190 IntOp $0 $0 | ${SF_SELECTED}
1191 SectionSetFlags ${secDocs} $0
1192 ;# !insertmacro UnselectSection ${secDocs}
1201 File /oname=$0 CellServPage.ini
1203 File /oname=$1 AFSCell.ini
1204 ;File /oname=$1 ConfigURL.ini
1212 ;--------------------------------
1213 ; These are our cleanup functions
1214 Function .onInstFailed
1219 Function .onInstSuccess
1225 ;--------------------------------
1228 !insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
1229 !insertmacro MUI_DESCRIPTION_TEXT ${SecServer} $(DESC_SecServer)
1230 !insertmacro MUI_DESCRIPTION_TEXT ${SecClient} $(DESC_SecClient)
1231 !insertmacro MUI_DESCRIPTION_TEXT ${SecControl} $(DESC_SecControl)
1232 !insertmacro MUI_DESCRIPTION_TEXT ${SecDocs} $(DESC_SecDocs)
1233 !insertmacro MUI_FUNCTIONS_DESCRIPTION_END
1235 ;--------------------------------
1236 ;Uninstaller Section
1240 SetShellVarContext all
1241 ; Stop the running processes
1243 File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe"
1244 nsExec::Exec '$R0 afscreds.exe'
1245 nsExec::Exec '$R0 krbcc32s.exe'
1247 ; Delete the AFS service
1249 File /oname=$R0 "${AFS_WININSTALL_DIR}\Service.exe"
1250 nsExec::Exec "net stop TransarcAFSDaemon"
1251 nsExec::Exec "net stop TransarcAFSServer"
1252 nsExec::Exec '$R0 u TransarcAFSDaemon'
1253 ; After we stop the service, but before we delete it, we have to remove the volume data
1254 ; This is because the storage locations are in the registry under the service key.
1255 ; Call un.RemoveAFSVolumes
1256 nsExec::Exec '$R0 u TransarcAFSServer'
1259 Push "$INSTDIR\Client\Program"
1260 Call un.RemoveFromPath
1261 Push "$INSTDIR\Common"
1262 Call un.RemoveFromPath
1264 Push "$INSTDIR\kfw\bin"
1265 Call un.RemoveFromPath
1268 ; Delete documentation
1269 Delete "$INSTDIR\Documentation\README.TXT"
1270 Delete "$INSTDIR\Documentation\html\*"
1271 Delete "$INSTDIR\Documentation\html\CmdRef\*"
1272 Delete "$INSTDIR\Documentation\html\InstallGd\*"
1273 Delete "$INSTDIR\Documentation\html\ReleaseNotes\*"
1274 Delete "$INSTDIR\Documentation\html\SysAdminGd\*"
1276 Delete /REBOOTOK "$INSTDIR\Common\afs_config.exe"
1277 Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.dll"
1278 Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.dll"
1279 Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.dll"
1280 Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.dll"
1281 Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.dll"
1282 Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.dll"
1283 Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.dll"
1284 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll"
1285 Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.dll"
1286 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll"
1287 Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.dll"
1288 Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.dll"
1289 Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.dll"
1290 Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.dll"
1293 Delete /REBOOTOK "$INSTDIR\Common\afs_config.pdb"
1294 Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.pdb"
1295 Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.pdb"
1296 Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.pdb"
1297 Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.pdb"
1298 Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.pdb"
1299 Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.pdb"
1300 Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.pdb"
1301 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.pdb"
1302 Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.pdb"
1303 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.pdb"
1304 Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.pdb"
1305 Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.pdb"
1306 Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.pdb"
1307 Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.pdb"
1310 Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.dll"
1311 Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.pdb"
1313 Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.dll"
1314 Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.pdb"
1318 Delete /REBOOTOK "$INSTDIR\Common\msvcr71.dll"
1320 Delete /REBOOTOK "$INSTDIR\Common\msvcrt.dll"
1326 StrCmp $R1 "/S" SkipAsk
1327 ; IfFileExists "$WINDIR\afsdcell.ini" CellExists SkipDelAsk
1329 MessageBox MB_YESNO "Would you like to keep your configuration files?" IDYES SkipDel
1331 Delete "$WINDIR\afsdcell.ini"
1333 Delete "$WINDIR\afsdsbmt.ini"
1334 Delete "$WINDIR\krb5.ini"
1335 Delete "$WINDIR\afsdns.ini"
1336 Delete "$WINDIR\afs_freelance.ini"
1339 Delete "$WINDIR\afsd_init.log"
1340 Delete "$INSTDIR\Uninstall.exe"
1343 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.exe"
1344 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe"
1345 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe"
1346 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.exe"
1347 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.exe"
1348 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.exe"
1349 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.exe"
1350 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.exe"
1351 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.exe"
1352 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.exe"
1353 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\salvager.exe"
1354 Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.dll"
1355 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\upclient.exe"
1356 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\upserver.exe"
1357 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\vlserver.exe"
1358 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\volinfo.exe"
1359 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\volserver.exe"
1362 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.pdb"
1363 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.pdb"
1364 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.pdb"
1365 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.pdb"
1366 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.pdb"
1367 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.pdb"
1368 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.pdb"
1369 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.pdb"
1370 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.pdb"
1371 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.pdb"
1372 Delete "$INSTDIR\Server\usr\afs\bin\salvager.pdb"
1373 Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.pdb"
1374 Delete "$INSTDIR\Server\usr\afs\bin\upclient.pdb"
1375 Delete "$INSTDIR\Server\usr\afs\bin\upserver.pdb"
1376 Delete "$INSTDIR\Server\usr\afs\bin\vlserver.pdb"
1377 Delete "$INSTDIR\Server\usr\afs\bin\volinfo.pdb"
1378 Delete "$INSTDIR\Server\usr\afs\bin\volserver.pdb"
1381 RMDir /r "$INSTDIR\Server\usr\afs\bin"
1382 RmDir /r "$INSTDIR\Server\usr\afs\etc\logs"
1383 RmDir /r "$INSTDIR\Server\usr\afs\etc"
1384 RmDir /r "$INSTDIR\Server\usr\afs\local"
1385 RMDIR /r "$INSTDIR\Server\usr\afs\logs"
1387 Delete /REBOOTOK "$WINDIR\afsserver.cpl"
1388 Delete /REBOOTOK "$WINDIR\afs_cpa.cpl"
1391 Delete /REBOOTOK "$WINDIR\afsserver.pdb"
1392 Delete /REBOOTOK "$WINDIR\afs_cpa.pdb"
1395 RMDir /r "$INSTDIR\Documentation\html\CmdRef"
1396 RMDir /r "$INSTDIR\Documentation\html\InstallGd"
1397 RMDir /r "$INSTDIR\Documentation\html\ReleaseNotes"
1398 RMDir /r "$INSTDIR\Documentation\html\SysAdminGd"
1399 RMDIr /r "$INSTDIR\Documentation\html"
1401 RMDir "$INSTDIR\Documentation"
1402 ; Delete DOC short cut
1403 Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.exe"
1406 Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.pdb"
1409 Delete /REBOOTOK "$INSTDIR\Client\Program\*"
1410 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\*"
1411 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\afs\*"
1412 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\rx\*"
1413 Delete /REBOOTOK "$INSTDIR\Client\Program\Sample\*"
1414 RMDir "$INSTDIR\Client\Program\Sample"
1415 RMDir "$INSTDIR\Client\Program\Include\afs"
1416 RMDir "$INSTDIR\Client\Program\Include\rx"
1417 RMDir "$INSTDIR\Client\Program\Include"
1418 RMDir "$INSTDIR\Client\Program"
1419 RMDir "$INSTDIR\Client"
1423 Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.dll"
1424 Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.pdb"
1426 Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.dll"
1427 Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.pdb"
1431 Delete /REBOOTOK "$INSTDIR\Common\msvcr71.dll"
1433 Delete /REBOOTOK "$INSTDIR\Common\msvcrt.dll"
1436 Delete /REBOOTOK "$INSTDIR\Common\*"
1437 RMDir "$INSTDIR\Common"
1441 Delete /REBOOTOK "$INSTDIR\kfw\bin\*"
1442 RMDIR /r "$INSTDIR\kfw\bin"
1443 Delete /REBOOTOK "$INSTDIR\kfw\doc\*"
1444 RMDIR /r "$INSTDIR\kfw\doc"
1445 RMDIR /r "$INSTDIR\kfw"
1448 Delete "$SMPROGRAMS\OpenAFS\Documentation.lnk"
1450 ; Remove control center
1451 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.exe"
1452 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.exe"
1453 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.exe"
1454 Delete /REBOOTOK "$INSTDIR\Control Center\CCUninst.dll"
1456 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.pdb"
1457 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.pdb"
1458 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.pdb"
1460 RMDir "$INSTDIR\Control Center"
1462 Delete "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk"
1463 Delete "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk"
1464 Delete "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk"
1465 Delete "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk"
1466 RMDIR "$SMPROGRAMS\OpenAFS\Control Center"
1467 RMDir /r "$SMPROGRAMS\OpenAFS\Client"
1468 RMDir /r "$SMPROGRAMS\OpenAFS"
1469 Delete "$SMSTARTUP\AFS Credentials.lnk"
1471 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "CachePath"
1473 Delete "$R0\AFSCache"
1474 Delete "C:\AFSCache"
1476 DeleteRegKey HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension"
1477 DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32"
1478 DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
1479 DeleteRegKey HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension"
1480 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
1482 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
1483 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client"
1484 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion"
1485 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation"
1486 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion"
1487 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Control Center"
1488 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
1489 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server"
1490 DeleteRegKey /ifempty HKLM "${AFS_REGKEY_ROOT}"
1491 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS"
1492 DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled"
1496 ;Display the Finish header
1497 !insertmacro MUI_UNFINISHHEADER
1501 ;--------------------------------
1502 ;Uninstaller Functions
1506 ;Get language from registry
1507 ReadRegStr $LANGUAGE HKCU "Software\OpenAFS\AFS" "Installer Language"
1511 Function un.onUninstSuccess
1513 MessageBox MB_OK "Please reboot your machine to complete uninstallation of the software"
1517 ;------------------------------
1518 ; Get the CellServDB file from the Internet
1520 Function afs.GetCellServDB
1522 ;Check if we should download CellServDB
1523 ;ReadINIStr $R0 $0 "Field 4" "State"
1524 ;StrCmp $R0 "0" CheckIncl
1526 ReadINIStr $R0 $0 "Field 5" "State"
1527 NSISdl::download $R0 "$WINDIR\afsdcell.ini"
1528 Pop $R0 ;Get the return value
1529 StrCmp $R0 "success" +2
1530 MessageBox MB_OK|MB_ICONSTOP "Download failed: $R0"
1533 ReadINIStr $R0 $0 "Field 3" "State"
1534 StrCmp $R0 "0" CheckOther
1535 SetOutPath "$WINDIR"
1540 ReadINIStr $R0 $0 "Field 7" "State"
1541 CopyFiles $R0 "$WINDIR\afsdcell.ini"
1549 ;-------------------------------
1550 ;Do the page to get the CellServDB
1552 Function AFSPageGetCellServDB
1553 ; Set the install options here
1556 WriteINIStr $0 "Field 2" "Flags" "DISABLED"
1557 WriteINIStr $0 "Field 3" "State" "1"
1559 ; If there is an existing afsdcell.ini file, allow the user to choose it and make it default
1560 IfFileExists "$WINDIR\afsdcell.ini" +1 notpresent
1561 WriteINIStr $0 "Field 2" "Flags" "ENABLED"
1562 WriteINIStr $0 "Field 2" "State" "1"
1563 WriteINIStr $0 "Field 3" "State" "3"
1567 !insertmacro MUI_HEADER_TEXT "CellServDB Configuration" "Please choose a method for installing the CellServDB file:"
1568 InstallOptions::dialog $0
1570 StrCmp $R1 "cancel" exit
1571 StrCmp $R1 "back" done
1572 StrCmp $R1 "success" done
1576 ; Check that if a file is set, a filename is entered...
1577 ReadINIStr $R0 $0 "Field 6" "State"
1578 StrCmp $R0 "1" CheckFileName Skip
1580 ReadINIStr $R0 $0 "Field 7" "State"
1581 IfFileExists $R0 Skip
1583 MessageBox MB_OK|MB_ICONSTOP $(CellError)
1584 WriteINIStr $0 "Field 6" "State" "0"
1592 Function AFSPageGetCellName
1595 StrCmp $R1 "/S" exit
1596 !insertmacro MUI_HEADER_TEXT "Cell Name Configuration" "Please enter the name for your default cell:"
1597 InstallOptions::dialog $1
1599 StrCmp $R1 "cancel" exit
1600 StrCmp $R1 "back" done
1601 StrCmp $R1 "success" done
1607 ; Common install routines for each module
1608 Function AFSCommon.Install
1610 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayName" "OpenAFS for Windows"
1611 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "UninstallString" "$INSTDIR\uninstall.exe"
1612 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayVersion" "${MUI_VERSION}"
1613 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "URLInfoAbout" "http://www.openafs.org/"
1618 ; Check if install should be silent
1626 StrCmp $0 "/S" silent
1627 StrCmp $0 "/S " silent
1636 ; Check if uninstall should be silent
1637 Function un.IsSilent
1644 StrCmp $0 "/S" silent
1645 StrCmp $0 "/S " silent
1656 Exch $R1 ; st=haystack,old$R1, $R1=needle
1657 Exch ; st=old$R1,haystack
1658 Exch $R2 ; st=old$R1,old$R2, $R2=haystack
1670 StrCpy $R5 $R2 $R3 $R4
1676 StrCpy $R1 $R2 "" $R4
1684 ;-------------------
1685 ; Get the currently installed version and place it on the stack
1687 Function GetInstalledVersion
1692 ReadRegStr $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "VersionString"
1693 StrCmp $R0 "" NotTransarc done
1697 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "VersionString"
1706 ; Functions to get each component of the version number
1707 Function GetInstalledVersionMajor
1712 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "MajorVersion"
1713 StrCmp $R0 "" NotTransarc done
1717 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "MajorVersion"
1726 Function GetInstalledVersionMinor
1731 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "MinorVersion"
1732 StrCmp $R0 "" NotTransarc done
1736 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "MinorVersion"
1745 Function GetInstalledVersionPatch
1750 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "PatchLevel"
1751 StrCmp $R0 "" NotTransarc done
1755 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "PatchLevel"
1766 ;-------------------------------
1767 ; Check if the client should be checked for default install
1768 Function ShouldClientInstall
1770 StrCpy $R2 "AFS Client"
1771 Call GetInstalledVersion
1774 StrCmp $R0 "" NotInstalled
1775 ; Now we see if it's an older or newer version
1777 Call GetInstalledVersionMajor
1779 IntCmpU $R0 ${MUI_MAJORVERSION} +1 Upgrade Downgrade
1781 Call GetInstalledVersionMinor
1783 IntCmpU $R0 ${MUI_MINORVERSION} +1 Upgrade Downgrade
1785 Call GetInstalledVersionPatch
1787 IntCmpU $R0 ${MUI_PATCHLEVEL} Reinstall Upgrade Downgrade
1811 ;-------------------------------
1812 ; Check how the server options should be set
1813 Function ShouldServerInstall
1815 StrCpy $R2 "AFS Server"
1816 Call GetInstalledVersion
1819 StrCmp $R0 "" NotInstalled
1820 ; Now we see if it's an older or newer version
1822 Call GetInstalledVersionMajor
1824 IntCmpU $R0 ${MUI_MAJORVERSION} +1 Upgrade Downgrade
1826 Call GetInstalledVersionMinor
1828 IntCmpU $R0 ${MUI_MINORVERSION} +1 Upgrade Downgrade
1830 Call GetInstalledVersionPatch
1832 IntCmpU $R0 ${MUI_PATCHLEVEL} Reinstall Upgrade Downgrade
1857 ; See if AFS Server is installed
1858 ; Returns: "1" if it is, 0 if it is not (on the stack)
1859 Function IsServerInstalled
1861 StrCpy $R2 "AFS Server"
1862 Call GetInstalledVersion
1865 StrCmp $R0 "" NotInstalled
1878 ; See if AFS Client is installed
1879 ; Returns: "1" if it is, 0 if it is not (on the stack)
1880 Function IsClientInstalled
1882 StrCpy $R2 "AFS Client"
1883 Call GetInstalledVersion
1886 StrCmp $R0 "" NotInstalled
1900 ; See if AFS Documentation is installed
1901 ; Returns: "1" if it is, 0 if it is not (on the stack)
1902 Function IsDocumentationInstalled
1904 StrCpy $R2 "AFS Supplemental Documentation"
1905 Call GetInstalledVersion
1908 StrCmp $R0 "" NotInstalled
1921 ; See if Control Center is installed
1922 ; Returns: "1" if it is, 0 if it is not (on the stack)
1923 Function IsControlInstalled
1925 StrCpy $R2 "AFS Control Center"
1926 Call GetInstalledVersion
1929 StrCmp $R0 "" NotInstalled
1944 ; output, top of stack (replaces, with e.g. whatever)
1945 ; modifies no other variables.
1947 Function GetParameters
1951 StrCpy $R0 $CMDLINE 1
1955 StrCpy $R1 ' ' ; we're scanning for a space instead of a quote
1957 StrCpy $R0 $CMDLINE 1 $R2
1958 StrCmp $R0 $R1 loop2
1964 StrCpy $R0 $CMDLINE 1 $R2
1965 StrCmp $R0 " " loop2
1966 StrCpy $R0 $CMDLINE "" $R2
1973 ;Check to see if any AFS component is installed
1974 ;Returns: Value on stack: "1" if it is, "0" if it is not
1975 Function IsAnyAFSInstalled
1980 Call IsClientInstalled
1982 Call IsServerInstalled
1984 Call IsControlInstalled
1986 Call IsDocumentationInstalled
1988 ; Now we must see if ANY of the $Rn values are 1
1989 StrCmp $R0 "1" SomethingInstalled
1990 StrCmp $R1 "1" SomethingInstalled
1991 StrCmp $R2 "1" SomethingInstalled
1992 StrCmp $R3 "1" SomethingInstalled
2006 ;Install English Language Files
2007 Function AFSLangFiles
2009 SetOutPath "$INSTDIR\Common"
2010 File "${AFS_CLIENT_BUILDDIR}\afs_config.exe"
2011 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll"
2012 File "${AFS_SERVER_BUILDDIR}\afsadminutil.dll"
2013 File "${AFS_DESTDIR}\lib\afsauthent.dll"
2014 File "${AFS_DESTDIR}\lib\afspthread.dll"
2015 File "${AFS_DESTDIR}\lib\afsrpc.dll"
2016 File "${AFS_SERVER_BUILDDIR}\afsclientadmin.dll"
2017 File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.dll"
2018 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
2019 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.dll"
2020 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
2021 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll"
2022 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
2023 File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
2024 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
2027 File "${AFS_WININSTALL_DIR}\msvcr71d.dll"
2028 File "${AFS_WININSTALL_DIR}\msvcr71d.pdb"
2030 File "${AFS_WININSTALL_DIR}\msvcrtd.dll"
2031 File "${AFS_WININSTALL_DIR}\msvcrtd.pdb"
2035 File "${AFS_WININSTALL_DIR}\msvcr71.dll"
2037 File "${AFS_WININSTALL_DIR}\msvcrt.dll"
2042 File "${AFS_CLIENT_BUILDDIR}\afs_config.pdb"
2043 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.pdb"
2044 File "${AFS_SERVER_BUILDDIR}\afsadminutil.pdb"
2045 File "${AFS_DESTDIR}\lib\afsauthent.pdb"
2046 File "${AFS_DESTDIR}\lib\afspthread.pdb"
2047 File "${AFS_DESTDIR}\lib\afsrpc.pdb"
2048 File "${AFS_SERVER_BUILDDIR}\afsclientadmin.pdb"
2049 File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.pdb"
2050 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
2051 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.pdb"
2052 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
2053 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb"
2054 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb"
2055 File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb"
2056 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb"
2059 StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
2060 StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
2061 StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
2062 StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
2063 ;StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
2064 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
2065 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
2066 StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
2070 SetOutPath "$INSTDIR\Documentation"
2071 File "..\..\doc\install\Documentation\en_US\README.TXT"
2073 SetOutPath "$INSTDIR\Common"
2074 File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.dll"
2075 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.dll"
2076 File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.dll"
2077 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.dll"
2078 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.dll"
2079 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1033.dll"
2080 File "${AFS_SERVER_BUILDDIR}\afsserver_1033.dll"
2081 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.dll"
2082 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.dll"
2083 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.dll"
2084 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.dll"
2085 File "..\..\doc\help\en_US\afs-cc.CNT"
2086 File "..\..\doc\help\en_US\afs-cc.hlp"
2087 File "..\..\doc\help\en_US\afs-light.CNT"
2088 File "..\..\doc\help\en_US\afs-light.hlp"
2089 File "..\..\doc\help\en_US\afs-nt.CNT"
2090 File "..\..\doc\help\en_US\afs-nt.HLP"
2091 File "..\..\doc\help\en_US\taafscfg.CNT"
2092 File "..\..\doc\help\en_US\taafscfg.hlp"
2093 File "..\..\doc\help\en_US\taafssvrmgr.CNT"
2094 File "..\..\doc\help\en_US\taafssvrmgr.hlp"
2095 File "..\..\doc\help\en_US\taafsusrmgr.CNT"
2096 File "..\..\doc\help\en_US\taafsusrmgr.hlp"
2101 SetOutPath "$INSTDIR\Documentation"
2102 File "..\..\doc\install\Documentation\de_DE\README.TXT"
2104 SetOutPath "$INSTDIR\Common"
2105 File "${AFS_CLIENT_BUILDDIR}\afs_config_1032.dll"
2106 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1032.dll"
2107 File "${AFS_CLIENT_BUILDDIR}\afscreds_1032.dll"
2108 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.dll"
2109 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1032.dll"
2110 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1032.dll"
2111 File "${AFS_SERVER_BUILDDIR}\afsserver_1032.dll"
2112 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1032.dll"
2113 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1032.dll"
2114 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1032.dll"
2115 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1032.dll"
2116 File "..\..\doc\help\de_DE\afs-cc.CNT"
2117 File "..\..\doc\help\de_DE\afs-cc.hlp"
2118 File "..\..\doc\help\de_DE\afs-light.CNT"
2119 File "..\..\doc\help\de_DE\afs-light.hlp"
2120 File "..\..\doc\help\de_DE\afs-nt.CNT"
2121 File "..\..\doc\help\de_DE\afs-nt.HLP"
2122 File "..\..\doc\help\de_DE\taafscfg.CNT"
2123 File "..\..\doc\help\de_DE\taafscfg.hlp"
2124 File "..\..\doc\help\de_DE\taafssvrmgr.CNT"
2125 File "..\..\doc\help\de_DE\taafssvrmgr.hlp"
2126 File "..\..\doc\help\de_DE\taafsusrmgr.CNT"
2127 File "..\..\doc\help\de_DE\taafsusrmgr.hlp"
2130 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.pdb"
2131 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.pdb"
2132 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.pdb"
2133 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.pdb"
2134 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.pdb"
2135 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1033.pdb"
2136 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.pdb"
2137 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.pdb"
2138 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.pdb"
2139 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.pdb"
2141 File "${AFS_WININSTALL_DIR}\msvcr71d.dll"
2142 File "${AFS_WININSTALL_DIR}\msvcr71d.pdb"
2144 File "${AFS_WININSTALL_DIR}\msvcrtd.dll"
2145 File "${AFS_WININSTALL_DIR}\msvcrtd.pdb"
2152 SetOutPath "$INSTDIR\Documentation"
2153 File "..\..\doc\install\Documentation\es_ES\README.TXT"
2155 SetOutPath "$INSTDIR\Common"
2156 File "${AFS_CLIENT_BUILDDIR}\afs_config_1034.dll"
2157 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.dll"
2158 File "${AFS_CLIENT_BUILDDIR}\afscreds_1034.dll"
2159 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.dll"
2160 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1034.dll"
2161 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1034.dll"
2162 File "${AFS_SERVER_BUILDDIR}\afsserver_1034.dll"
2163 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1034.dll"
2164 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1034.dll"
2165 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1034.dll"
2166 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1034.dll"
2167 File "..\..\doc\help\es_ES\afs-cc.CNT"
2168 File "..\..\doc\help\es_ES\afs-cc.hlp"
2169 File "..\..\doc\help\es_ES\afs-light.CNT"
2170 File "..\..\doc\help\es_ES\afs-light.hlp"
2171 File "..\..\doc\help\es_ES\afs-nt.CNT"
2172 File "..\..\doc\help\es_ES\afs-nt.HLP"
2173 File "..\..\doc\help\es_ES\taafscfg.CNT"
2174 File "..\..\doc\help\es_ES\taafscfg.hlp"
2175 File "..\..\doc\help\es_ES\taafssvrmgr.CNT"
2176 File "..\..\doc\help\es_ES\taafssvrmgr.hlp"
2177 File "..\..\doc\help\es_ES\taafsusrmgr.CNT"
2178 File "..\..\doc\help\es_ES\taafsusrmgr.hlp"
2183 SetOutPath "$INSTDIR\Documentation"
2184 File "..\..\doc\install\Documentation\ja_JP\README.TXT"
2186 SetOutPath "$INSTDIR\Common"
2187 File "${AFS_CLIENT_BUILDDIR}\afs_config_1041.dll"
2188 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.dll"
2189 File "${AFS_CLIENT_BUILDDIR}\afscreds_1041.dll"
2190 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.dll"
2191 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1041.dll"
2192 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1041.dll"
2193 File "${AFS_SERVER_BUILDDIR}\afsserver_1041.dll"
2194 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1041.dll"
2195 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1041.dll"
2196 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1041.dll"
2197 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1041.dll"
2198 File "..\..\doc\help\ja_JP\afs-cc.CNT"
2199 File "..\..\doc\help\ja_JP\afs-cc.hlp"
2200 File "..\..\doc\help\ja_JP\afs-light.CNT"
2201 File "..\..\doc\help\ja_JP\afs-light.hlp"
2202 File "..\..\doc\help\ja_JP\afs-nt.CNT"
2203 File "..\..\doc\help\ja_JP\afs-nt.HLP"
2204 File "..\..\doc\help\ja_JP\taafscfg.CNT"
2205 File "..\..\doc\help\ja_JP\taafscfg.hlp"
2206 File "..\..\doc\help\ja_JP\taafssvrmgr.CNT"
2207 File "..\..\doc\help\ja_JP\taafssvrmgr.hlp"
2208 File "..\..\doc\help\ja_JP\taafsusrmgr.CNT"
2209 File "..\..\doc\help\ja_JP\taafsusrmgr.hlp"
2214 SetOutPath "$INSTDIR\Documentation"
2215 File "..\..\doc\install\Documentation\ko_KR\README.TXT"
2217 SetOutPath "$INSTDIR\Common"
2218 File "${AFS_CLIENT_BUILDDIR}\afs_config_1042.dll"
2219 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.dll"
2220 File "${AFS_CLIENT_BUILDDIR}\afscreds_1042.dll"
2221 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.dll"
2222 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1042.dll"
2223 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1042.dll"
2224 File "${AFS_SERVER_BUILDDIR}\afsserver_1042.dll"
2225 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1042.dll"
2226 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1042.dll"
2227 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1042.dll"
2228 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1042.dll"
2229 File "..\..\doc\help\ko_KR\afs-cc.CNT"
2230 File "..\..\doc\help\ko_KR\afs-cc.hlp"
2231 File "..\..\doc\help\ko_KR\afs-light.CNT"
2232 File "..\..\doc\help\ko_KR\afs-light.hlp"
2233 File "..\..\doc\help\ko_KR\afs-nt.CNT"
2234 File "..\..\doc\help\ko_KR\afs-nt.HLP"
2235 File "..\..\doc\help\ko_KR\taafscfg.CNT"
2236 File "..\..\doc\help\ko_KR\taafscfg.hlp"
2237 File "..\..\doc\help\ko_KR\taafssvrmgr.CNT"
2238 File "..\..\doc\help\ko_KR\taafssvrmgr.hlp"
2239 File "..\..\doc\help\ko_KR\taafsusrmgr.CNT"
2240 File "..\..\doc\help\ko_KR\taafsusrmgr.hlp"
2246 SetOutPath "$INSTDIR\Documentation"
2247 File "..\..\doc\install\Documentation\pt_BR\README.TXT"
2249 SetOutPath "$INSTDIR\Common"
2250 File "${AFS_CLIENT_BUILDDIR}\afs_config_1046.dll"
2251 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.dll"
2252 File "${AFS_CLIENT_BUILDDIR}\afscreds_1046.dll"
2253 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.dll"
2254 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1046.dll"
2255 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1046.dll"
2256 File "${AFS_SERVER_BUILDDIR}\afsserver_1046.dll"
2257 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1046.dll"
2258 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1046.dll"
2259 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1046.dll"
2260 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1046.dll"
2261 File "..\..\doc\help\pt_BR\afs-cc.CNT"
2262 File "..\..\doc\help\pt_BR\afs-cc.hlp"
2263 File "..\..\doc\help\pt_BR\afs-light.CNT"
2264 File "..\..\doc\help\pt_BR\afs-light.hlp"
2265 File "..\..\doc\help\pt_BR\afs-nt.CNT"
2266 File "..\..\doc\help\pt_BR\afs-nt.HLP"
2267 File "..\..\doc\help\pt_BR\taafscfg.CNT"
2268 File "..\..\doc\help\pt_BR\taafscfg.hlp"
2269 File "..\..\doc\help\pt_BR\taafssvrmgr.CNT"
2270 File "..\..\doc\help\pt_BR\taafssvrmgr.hlp"
2271 File "..\..\doc\help\pt_BR\taafsusrmgr.CNT"
2272 File "..\..\doc\help\pt_BR\taafsusrmgr.hlp"
2277 SetOutPath "$INSTDIR\Documentation"
2278 File "..\..\doc\install\Documentation\zh_CN\README.TXT"
2280 SetOutPath "$INSTDIR\Common"
2281 File "${AFS_CLIENT_BUILDDIR}\afs_config_2052.dll"
2282 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.dll"
2283 File "${AFS_CLIENT_BUILDDIR}\afscreds_2052.dll"
2284 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.dll"
2285 File "${AFS_SERVER_BUILDDIR}\afseventmsg_2052.dll"
2286 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_2052.dll"
2287 File "${AFS_SERVER_BUILDDIR}\afsserver_2052.dll"
2288 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_2052.dll"
2289 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_2052.dll"
2290 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_2052.dll"
2291 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_2052.dll"
2292 File "..\..\doc\help\zh_CN\afs-cc.CNT"
2293 File "..\..\doc\help\zh_CN\afs-cc.hlp"
2294 File "..\..\doc\help\zh_CN\afs-light.CNT"
2295 File "..\..\doc\help\zh_CN\afs-light.hlp"
2296 File "..\..\doc\help\zh_CN\afs-nt.CNT"
2297 File "..\..\doc\help\zh_CN\afs-nt.HLP"
2298 File "..\..\doc\help\zh_CN\taafscfg.CNT"
2299 File "..\..\doc\help\zh_CN\taafscfg.hlp"
2300 File "..\..\doc\help\zh_CN\taafssvrmgr.CNT"
2301 File "..\..\doc\help\zh_CN\taafssvrmgr.hlp"
2302 File "..\..\doc\help\zh_CN\taafsusrmgr.CNT"
2303 File "..\..\doc\help\zh_CN\taafsusrmgr.hlp"
2308 SetOutPath "$INSTDIR\Documentation"
2309 File "..\..\doc\install\Documentation\zh_TW\README.TXT"
2311 SetOutPath "$INSTDIR\Common"
2312 File "${AFS_CLIENT_BUILDDIR}\afs_config_1028.dll"
2313 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.dll"
2314 File "${AFS_CLIENT_BUILDDIR}\afscreds_1028.dll"
2315 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.dll"
2316 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1028.dll"
2317 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1028.dll"
2318 File "${AFS_SERVER_BUILDDIR}\afsserver_1028.dll"
2319 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1028.dll"
2320 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1028.dll"
2321 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1028.dll"
2322 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1028.dll"
2323 File "..\..\doc\help\zh_TW\afs-cc.CNT"
2324 File "..\..\doc\help\zh_TW\afs-cc.hlp"
2325 File "..\..\doc\help\zh_TW\afs-light.CNT"
2326 File "..\..\doc\help\zh_TW\afs-light.hlp"
2327 File "..\..\doc\help\zh_TW\afs-nt.CNT"
2328 File "..\..\doc\help\zh_TW\afs-nt.HLP"
2329 File "..\..\doc\help\zh_TW\taafscfg.CNT"
2330 File "..\..\doc\help\zh_TW\taafscfg.hlp"
2331 File "..\..\doc\help\zh_TW\taafssvrmgr.CNT"
2332 File "..\..\doc\help\zh_TW\taafssvrmgr.hlp"
2333 File "..\..\doc\help\zh_TW\taafsusrmgr.CNT"
2334 File "..\..\doc\help\zh_TW\taafsusrmgr.hlp"
2342 ;====================================================
2343 ; AddToPath - Adds the given dir to the search path.
2344 ; Input - head of the stack
2345 ; Note - Win9x systems requires reboot
2346 ;====================================================
2353 StrCmp $1 1 AddToPath_NT
2356 FileOpen $1 "$1\autoexec.bat" a
2358 GetFullPathName /SHORT $0 $0
2359 FileWrite $1 "$\r$\nSET PATH=%PATH%;$0$\r$\n"
2364 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
2365 StrCmp $1 "" AddToPath_NTdoIt
2367 Goto AddToPath_NTdoIt
2369 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $0
2370 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
2377 ;====================================================
2378 ; RemoveFromPath - Remove a given dir from the path
2379 ; Input: head of the stack
2380 ;====================================================
2381 Function un.RemoveFromPath
2390 StrCmp $1 1 unRemoveFromPath_NT
2393 FileOpen $1 "$1\autoexec.bat" r
2396 GetFullPathName /SHORT $0 $0
2397 StrCpy $0 "SET PATH=%PATH%;$0"
2399 Goto unRemoveFromPath_dosLoop
2401 unRemoveFromPath_dosLoop:
2403 StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoop
2404 StrCmp $3 "$0$\n" unRemoveFromPath_dosLoop
2405 StrCmp $3 "$0" unRemoveFromPath_dosLoop
2406 StrCmp $3 "" unRemoveFromPath_dosLoopEnd
2408 Goto unRemoveFromPath_dosLoop
2410 unRemoveFromPath_dosLoopEnd:
2414 Delete "$1\autoexec.bat"
2415 CopyFiles /SILENT $4 "$1\autoexec.bat"
2417 Goto unRemoveFromPath_done
2419 unRemoveFromPath_NT:
2421 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
2424 Call un.StrStr ; Find $0 in $1
2425 Pop $0 ; pos of our dir
2426 IntCmp $0 -1 unRemoveFromPath_done
2427 ; else, it is in path
2428 StrCpy $3 $1 $0 ; $3 now has the part of the path before our dir
2429 IntOp $2 $2 + $0 ; $2 now contains the pos after our dir in the path (';')
2430 IntOp $2 $2 + 1 ; $2 now containts the pos after our dir and the semicolon.
2435 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $3
2436 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
2438 unRemoveFromPath_done:
2446 ;====================================================
2447 ; IsNT - Returns 1 if the current system is NT, 0
2449 ; Output: head of the stack
2450 ;====================================================
2453 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
2454 StrCmp $0 "" 0 IsNT_yes
2466 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2468 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2471 ;====================================================
2472 ; StrStr - Finds a given string in another given string.
2473 ; Returns -1 if not found and the pos if found.
2474 ; Input: head of the stack - string to find
2475 ; second in the stack - string to find in
2476 ; Output: head of the stack
2477 ;====================================================
2481 Pop $0 ; $0 now have the string to find
2484 Pop $1 ; $1 now have the string to find in
2498 IntCmp $2 $4 0 0 unStrStrReturn_notFound
2500 StrCmp $5 $0 unStrStr_done unStrStr_loop
2502 unStrStrReturn_notFound:
2515 ;====================================================
2516 ; IsNT - Returns 1 if the current system is NT, 0
2518 ; Output: head of the stack
2519 ;====================================================
2522 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
2523 StrCmp $0 "" 0 unIsNT_yes
2537 ; Increments a shared DLLs reference count.
2538 ; Use by passing one item on the stack (the full path of the DLL).
2541 ; Push $SYSDIR\myDll.dll
2545 Function AddSharedDLL
2548 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
2550 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
2556 ; un.RemoveSharedDLL
2558 ; Decrements a shared DLLs reference count, and removes if necessary.
2559 ; Use by passing one item on the stack (the full path of the DLL).
2560 ; Note: for use in the main installer (not the uninstaller), rename the
2561 ; function to RemoveSharedDLL.
2564 ; Push $SYSDIR\myDll.dll
2565 ; Call un.RemoveSharedDLL
2568 Function un.RemoveSharedDLL
2571 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
2572 StrCmp $R0 "" remove
2574 IntCmp $R0 0 rk rk uk
2576 DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
2579 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
2582 Delete /REBOOTOK $R1
2588 !ifdef INSTALL_LOOPBACK
2589 Function afs.InstallMSLoopback
2591 File /oname=$R0 "loopback_install.dll"
2592 nsExec::Exec "rundll32.exe $R0 doLoopBackEntry quiet"
2593 Call GetWindowsVersion
2595 StrCmp $R1 "2000" +1 +2
2596 nsExec::Exec "rundll32.exe $R0 disableLoopBackEntry"
2604 ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
2605 ; Updated by Joost Verburg
2607 ; Returns on top of stack
2609 ; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003)
2611 ; '' (Unknown Windows Version)
2614 ; Call GetWindowsVersion
2616 ; ; at this point $R0 is "NT 4.0" or whatnot
2618 Function GetWindowsVersion
2625 ReadRegStr $R0 HKLM \
2626 "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
2628 IfErrors 0 lbl_winnt
2631 ReadRegStr $R0 HKLM \
2632 "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
2635 StrCmp $R1 '4' 0 lbl_error
2639 StrCmp $R1 '4.0' lbl_win32_95
2640 StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
2658 StrCmp $R1 '3' lbl_winnt_x
2659 StrCmp $R1 '4' lbl_winnt_x
2663 StrCmp $R1 '5.0' lbl_winnt_2000
2664 StrCmp $R1 '5.1' lbl_winnt_XP
2665 StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
2668 StrCpy $R0 "NT $R0" 6
2693 ; Author: Lilla (lilla@earthlink.net) 2003-06-13
2694 ; function IsUserAdmin uses plugin \NSIS\PlusgIns\UserInfo.dll
2695 ; This function is based upon code in \NSIS\Contrib\UserInfo\UserInfo.nsi
2696 ; This function was tested under NSIS 2 beta 4 (latest CVS as of this writing).
2700 ; Pop $R0 ; at this point $R0 is "true" or "false"
2702 Function IsUserAdmin
2711 UserInfo::GetAccountType
2714 StrCmp $R2 "Admin" 0 Continue
2715 ; Observation: I get here when running Win98SE. (Lilla)
2716 ; The functions UserInfo.dll looks for are there on Win98 too,
2717 ; but just don't work. So UserInfo.dll, knowing that admin isn't required
2718 ; on Win98, returns admin anyway. (per kichik)
2719 ; MessageBox MB_OK 'User "$R1" is in the Administrators group'
2724 ; You should still check for an empty string because the functions
2725 ; UserInfo.dll looks for may not be present on Windows 95. (per kichik)
2728 ;MessageBox MB_OK 'User "$R1" is in the "$R2" group'
2732 ; comment/message below is by UserInfo.nsi author:
2733 ; This one means you don't need to care about admin or
2734 ; not admin because Windows 9x doesn't either
2735 ;MessageBox MB_OK "Error! This DLL can't run under Windows 9x!"
2739 ;MessageBox MB_OK 'User= "$R1" AccountType= "$R2" IsUserAdmin= "$R0"'