windows-nsis-cmdref-subdirs-20080630
[openafs.git] / src / WINNT / install / NSIS / OpenAFS.nsi
index 2126146..702d5ca 100644 (file)
@@ -50,7 +50,7 @@ VIAddVersionKey "CompanyName" "OpenAFS.org"
 VIAddVersionKey "ProductVersion" ${AFS_VERSION}
 VIAddVersionKey "FileVersion" ${AFS_VERSION}
 VIAddVersionKey "FileDescription" "OpenAFS for Windows Installer"
-VIAddVersionKey "LegalCopyright" "(C)2000-2005"
+VIAddVersionKey "LegalCopyright" "(C)2000-2007"
 !ifdef DEBUG
 VIAddVersionKey "PrivateBuild" "Checked/Debug"
 !endif               ; End DEBUG
@@ -327,6 +327,9 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   ReserveFile "AFSCell.ini"
   !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ;InstallOptions plug-in
   !insertmacro MUI_RESERVEFILE_LANGDLL ;Language selection dialog
+
+  RequestExecutionLevel admin
+
 ;--------------------------------
 ; Macros
 ; Macro - Upgrade DLL File
@@ -528,6 +531,17 @@ Section "!AFS Client" secClient
   nsExec::Exec "net stop TransarcAFSDaemon"
   nsExec::Exec "net stop TransarcAFSServer"
   
+  ; Install the Microsoft IDNM Redistributable
+  Call GetWindowsVersion
+  Pop $R1
+  StrCmp $R1 "XP" installIDN +1
+  StrCmp $R1 "2003" installIDN skipIDN
+  installIDN:
+  GetTempFileName $R0
+  File /oname=$R0 "${IDNMREDIST}"
+  nsExec::Exec '$R0 /quiet /norestart'
+  skipIDN:  
+
    ; Do client components
   SetOutPath "$INSTDIR\Client\Program"
   File "${AFS_CLIENT_BUILDDIR}\afsshare.exe"
@@ -542,7 +556,7 @@ Section "!AFS Client" secClient
   File "${AFS_CLIENT_BUILDDIR}\aklog.exe"
   !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds.exe"           "$INSTDIR\Client\Program\afscreds.exe"    "$INSTDIR"
   !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll" "$INSTDIR\Client\Program\afs_shl_ext.dll" "$INSTDIR"
-  File "${AFS_CLIENT_BUILDDIR}\afsd_service.exe"
+  !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afsd_service.exe" "$INSTDIR\Client\Program\afsd_service.exe" "$INSTDIR"
   File "${AFS_CLIENT_BUILDDIR}\symlink.exe"
   File "${AFS_DESTDIR}\bin\kpasswd.exe"
   File "${AFS_SERVER_BUILDDIR}\pts.exe"
@@ -558,10 +572,11 @@ Section "!AFS Client" secClient
   !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscred_en_us.dll" "$INSTDIR\Client\Program\afscred_en_us.dll" "$INSTDIR"
   File "${AFS_CLIENT_BUILDDIR}\afsplhlp.chm"
   
-  SetOutPath "$SYSDIR"
-  !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afslogon.dll" "$SYSDIR\afslogon.dll" "$INSTDIR"
+  !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afslogon.dll" "$INSTDIR\Client\Program\afslogon.dll" "$INSTDIR"
   File "${AFS_CLIENT_BUILDDIR}\afscpcc.exe"
+
 !ifdef AFSIFS
+  SetOutPath "$SYSDIR"
 !ifndef DEBUG
   !insertmacro ReplaceDLL "..\..\afsrdr\objfre_w2K_x86\i386\afsrdr.sys" "$SYSDIR\DRIVERS\afsrdr.sys" "$INSTDIR"
 !else
@@ -710,8 +725,8 @@ skipremove:
 
   ; Daemon entries
   WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "" ""
-  WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "ProviderPath" "$SYSDIR\afslogon.dll"
-  WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$SYSDIR\afslogon.dll"
+  WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "ProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
+  WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
   WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Class" 2
   WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "VerboseLogging" 10
 
@@ -736,7 +751,7 @@ skipremove:
   WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "UseDNS" $R0
   WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "NetbiosName" "AFS"
   WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "MountRoot" "/afs"
-  WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "RxMaxMTU" 1260
+  WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "RxMaxMTU" 0
   WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "IsGateway" 0
   WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "HideDotFiles" 1
 
@@ -780,10 +795,11 @@ skipremove:
   WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Logoff" "AFS_Logoff_Event"
   WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Startup" "AFS_Startup_Event"
 
-  WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\KFWLogon" "Asynchronous" 0
-  WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\KFWLogon" "Impersonate"  0
-  WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\KFWLogon" "DLLName" "afslogon.dll"
-  WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\KFWLogon" "Logon" "KFW_Logon_Event"
+; No longer install KFW Logon Handler - KFW 3.1 and above supports this functionality
+;  WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\KFWLogon" "Asynchronous" 0
+;  WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\KFWLogon" "Impersonate"  0
+;  WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\KFWLogon" "DLLName" "afslogon.dll"
+;  WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\KFWLogon" "Logon" "KFW_Logon_Event"
 
   SetRebootFlag true
   
@@ -914,7 +930,7 @@ skipCheck:
   IfFileExists "$INSTDIR\Server\usr\afs\etc\ThisCell" SkipStartup
 
   ; Make the server config wizard auto-start on bootup if this is an install (not an upgrade)
-  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" "AFS Server Wizard" '"$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe" /wizard"'
+  ; WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" "AFS Server Wizard" '"$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe" /wizard"'
   
   
 SkipStartup:
@@ -922,10 +938,24 @@ SkipStartup:
   ;nsExec::Exec '$INSTDIR\Common\service.exe u TransarcAFSServer'
   nsExec::Exec '$INSTDIR\Common\service.exe TransarcAFSServer "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe" "OpenAFS AFS Server"'
   Delete "$INSTDIR\Common\service.exe"
+
+  strcpy $REG_SUB_KEY "SYSTEM\CurrentControlSet\Services\TransarcAFSServer" 
+  strcpy $REG_VALUE   "DependOnGroup" 
+  strcpy $REG_DATA_1  "PNP_TDI"
+  strcpy $REG_DATA_2  ""
+  strcpy $REG_DATA_3  ""
+  strcpy $REG_DATA_4  ""
+  Call RegWriteMultiStr
+  strcpy $REG_SUB_KEY "SYSTEM\CurrentControlSet\Services\TransarcAFSServer" 
+  strcpy $REG_VALUE   "DependOnService" 
+  strcpy $REG_DATA_1  "Tcpip"
+  strcpy $REG_DATA_2  ""
+  strcpy $REG_DATA_3  ""
+  strcpy $REG_DATA_4  ""
+  Call RegWriteMultiStr
   
-  CreateDirectory "$SMPROGRAMS\OpenAFS\Server"
-  CreateShortCut "$SMPROGRAMS\OpenAFS\Server\Server Configuration.lnk" "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe"
-  
+  ;CreateDirectory "$SMPROGRAMS\OpenAFS\Server"
+  ;CreateShortCut "$SMPROGRAMS\OpenAFS\Server\Server Configuration.lnk" "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe"
   
   WriteUninstaller "$INSTDIR\Uninstall.exe"
   WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayIcon" "$INSTDIR\Uninstall.exe,0"  
@@ -997,7 +1027,13 @@ Section /o "Supplemental Documentation" secDocs
    
 DoEnglish:
    SetOutPath "$INSTDIR\Documentation\html\CmdRef"
-   File "..\..\doc\install\Documentation\en_US\html\CmdRef\*"
+   File "..\..\..\..\doc\man-pages\html\*"
+   SetOutPath "$INSTDIR\Documentation\html\CmdRef\1"
+   File "..\..\..\..\doc\man-pages\html\1\*"
+   SetOutPath "$INSTDIR\Documentation\html\CmdRef\5"
+   File "..\..\..\..\doc\man-pages\html\5\*"
+   SetOutPath "$INSTDIR\Documentation\html\CmdRef\8"
+   File "..\..\..\..\doc\man-pages\html\8\*"
    SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
    File "..\..\doc\install\Documentation\en_US\html\SysAdminGd\*"
    goto DoneLanguage
@@ -1150,9 +1186,10 @@ Section /o "Debug symbols" secDebug
   File "${AFS_DESTDIR}\etc\backup.pdb"
   File "${AFS_CLIENT_BUILDDIR}\afs_cpa.pdb"
   File "${AFS_CLIENT_BUILDDIR}\afscred.pdb"
+  File "${AFS_CLIENT_BUILDDIR}\afslogon.pdb"
+  File "${AFS_CLIENT_BUILDDIR}\afscpcc.pdb"
 
   SetOutPath "$SYSDIR"
-  File "${AFS_CLIENT_BUILDDIR}\afslogon.pdb"
   
 DoServer:
    SectionGetFlags ${secServer} $R0
@@ -1203,9 +1240,7 @@ DoControl:
 DoCommon:
   SetOutPath "$INSTDIR\Common"
 !IFDEF CL_1400
-   File "${SYSTEMDIR}\msvcr80d.pdb"
-   File "${SYSTEMDIR}\msvcp80d.pdb"
-   File "${SYSTEMDIR}\mfc80d.pdb"
+  ; Do nothing
 !ELSE
 !IFDEF CL_1310
    File "${SYSTEMDIR}\msvcr71d.pdb"
@@ -1645,10 +1680,13 @@ StartRemove:
   Delete "$INSTDIR\Documentation\README.TXT"
   Delete "$INSTDIR\Documentation\html\*"
   Delete "$INSTDIR\Documentation\html\index_files\*"
+  Delete "$INSTDIR\Documentation\html\CmdRef\1\*"
+  Delete "$INSTDIR\Documentation\html\CmdRef\5\*"
+  Delete "$INSTDIR\Documentation\html\CmdRef\8\*"
   Delete "$INSTDIR\Documentation\html\CmdRef\*"
-  Delete "$INSTDIR\Documentation\html\InstallGd\*"
-  Delete "$INSTDIR\Documentation\html\ReleaseNotes\*"
   Delete "$INSTDIR\Documentation\html\ReleaseNotes\logo_files\*"
+  Delete "$INSTDIR\Documentation\html\ReleaseNotes\relnotes_files\*"
+  Delete "$INSTDIR\Documentation\html\ReleaseNotes\*"
   Delete "$INSTDIR\Documentation\html\SysAdminGd\*"
 
    Delete /REBOOTOK "$INSTDIR\Common\afs_config.exe"
@@ -1684,12 +1722,10 @@ StartRemove:
    Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.pdb"
 !IFDEF DEBUG
 !IFDEF CL_1400
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr80d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr80d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp80d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp80d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\mfc80d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\mfc80d.pdb"
+   SetOutPath "$INSTDIR\bin"
+   File "${AFS_WININSTALL_DIR}\vcruntime.msi"
+   nsExec::Exec 'msiexec /x "$INSTDIR\bin\vcruntime.msi" /passive'
+   Delete "$INSTDIR\bin\vcruntime.msi"
 !ELSE
 !IFDEF CL_1310
    Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.dll"
@@ -1718,18 +1754,7 @@ StartRemove:
 !ENDIF
 !ELSE
 !IFDEF CL_1400
-   Delete /REBOOTOK "$INSTDIR\bin\mfc80.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr80.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp80.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80CHS.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80CHT.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80DEU.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80ENU.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80ESP.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80FRA.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80ITA.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80JPN.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80KOR.DLL"
+   ; Do nothing
 !ELSE
 !IFDEF CL_1310
    Delete /REBOOTOK "$INSTDIR\bin\mfc71.dll"
@@ -1834,17 +1859,16 @@ StartRemove:
   ;RMDIR /r "$INSTDIR\Server\usr\afs\logs"
   
   Delete /REBOOTOK "$SYSDIR\afsserver.cpl"
-  Delete /REBOOTOK "$SYSDIR\afs_cpa.cpl"
-  Delete /REBOOTOK "$SYSDIR\afslogon.dll"
-  Delete /REBOOTOK "$SYSDIR\afscpcc.exe"
+  Delete /REBOOTOK "$INSTDIR\Client\Program\afs_cpa.cpl"
+  Delete /REBOOTOK "$INSTDIR\Client\Program\afslogon.dll"
+  Delete /REBOOTOK "$INSTDIR\Client\Program\afscpcc.exe"
 
   Delete /REBOOTOK "$SYSDIR\afsserver.pdb"
-  Delete /REBOOTOK "$SYSDIR\afs_cpa.pdb"
-  Delete /REBOOTOK "$SYSDIR\afslogon.pdb"
-  Delete /REBOOTOK "$SYSDIR\afscpcc.pdb"
+  Delete /REBOOTOK "$INSTDIR\Client\Program\afs_cpa.pdb"
+  Delete /REBOOTOK "$INSTDIR\Client\Program\afslogon.pdb"
+  Delete /REBOOTOK "$INSTDIR\Client\Program\afscpcc.pdb"
 
   RMDir /r "$INSTDIR\Documentation\html\CmdRef"
-  RMDir /r "$INSTDIR\Documentation\html\InstallGd"
   RMDir /r "$INSTDIR\Documentation\html\ReleaseNotes"
   RMDir /r "$INSTDIR\Documentation\html\SysAdminGd"
   RMDIr /r "$INSTDIR\Documentation\html"
@@ -1852,7 +1876,6 @@ StartRemove:
   RMDir "$INSTDIR\Documentation"
   ; Delete DOC short cut
   Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.exe"
-
   Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.pdb"
 
   Delete /REBOOTOK "$INSTDIR\SDK\Include\*"
@@ -1875,12 +1898,7 @@ StartRemove:
 
 !IFDEF DEBUG  
 !IFDEF CL_1400
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr80d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr80d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp80d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp80d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\mfc80d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\mfc80d.pdb"
+   ; Do nothing
 !ELSE
 !IFDEF CL_1310
    Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.dll"
@@ -1909,18 +1927,7 @@ StartRemove:
 !ENDIF
 !ELSE
 !IFDEF CL_1400
-   Delete /REBOOTOK "$INSTDIR\bin\mfc80.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr80.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp80.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80CHS.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80CHT.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80DEU.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80ENU.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80ESP.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80FRA.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80ITA.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80JPN.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC80KOR.DLL"
+   ; Do nothing
 !ELSE
 !IFDEF CL_1310
    Delete /REBOOTOK "$INSTDIR\bin\mfc71.dll"
@@ -2745,18 +2752,9 @@ Function AFSLangFiles
 
 !IFDEF DEBUG
 !IFDEF CL_1400
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\msvcr80d.dll" "$INSTDIR\Common\msvcr80d.dll" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\msvcp80d.dll" "$INSTDIR\Common\msvcp80d.dll" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\mfc80d.dll" "$INSTDIR\Common\mfc80d.dll" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80CHS.DLL" "$INSTDIR\Common\MFC80CHS.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80CHT.DLL" "$INSTDIR\Common\MFC80CHT.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80DEU.DLL" "$INSTDIR\Common\MFC80DEU.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80ENU.DLL" "$INSTDIR\Common\MFC80ENU.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80ESP.DLL" "$INSTDIR\Common\MFC80ESP.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80FRA.DLL" "$INSTDIR\Common\MFC80FRA.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80ITA.DLL" "$INSTDIR\Common\MFC80ITA.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80JPN.DLL" "$INSTDIR\Common\MFC80JPN.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80KOR.DLL" "$INSTDIR\Common\MFC80KOR.DLL" "$INSTDIR"
+   File "${AFS_WININSTALL_DIR}\vcruntime.msi"
+   nsExec::Exec 'msiexec /i "$INSTDIR\Common\vcruntime.msi" /passive'
+   Delete "$INSTDIR\Common\vcruntime.msi"
 !ELSE
 !IFDEF CL_1310
    !insertmacro ReplaceDLL "${SYSTEMDIR}\msvcr71d.dll" "$INSTDIR\Common\msvcr71d.dll" "$INSTDIR"
@@ -2794,18 +2792,9 @@ Function AFSLangFiles
 !ENDIF
 !ELSE
 !IFDEF CL_1400
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\mfc80.dll" "$INSTDIR\Common\mfc80.dll" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\msvcr80.dll" "$INSTDIR\Common\msvcr80.dll" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\msvcp80.dll" "$INSTDIR\Common\msvcp80.dll" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80CHS.DLL" "$INSTDIR\Common\MFC80CHS.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80CHT.DLL" "$INSTDIR\Common\MFC80CHT.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80DEU.DLL" "$INSTDIR\Common\MFC80DEU.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80ENU.DLL" "$INSTDIR\Common\MFC80ENU.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80ESP.DLL" "$INSTDIR\Common\MFC80ESP.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80FRA.DLL" "$INSTDIR\Common\MFC80FRA.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80ITA.DLL" "$INSTDIR\Common\MFC80ITA.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80JPN.DLL" "$INSTDIR\Common\MFC80JPN.DLL" "$INSTDIR"
-   !insertmacro ReplaceDLL "${SYSTEMDIR}\MFC80KOR.DLL" "$INSTDIR\Common\MFC80KOR.DLL" "$INSTDIR"
+  File "${AFS_WININSTALL_DIR}\${VCREDISTNAME}"
+  nsExec::Exec '"$INSTDIR\Common\${VCREDISTNAME}" /Q'
+  Delete "$INSTDIR\Common\${VCREDISTNAME}"
 !ELSE
 !IFDEF CL_1310
    !insertmacro ReplaceDLL "${SYSTEMDIR}\mfc71.dll" "$INSTDIR\Common\mfc71.dll" "$INSTDIR"
@@ -2860,12 +2849,12 @@ DoEnglish:
    File "..\..\doc\install\Documentation\en_US\html\*"
    SetOutPath "$INSTDIR\Documentation\html\index_files"
    File "..\..\doc\install\Documentation\en_US\html\index_files\*"
-   SetOutPath "$INSTDIR\Documentation\html\InstallGd"
-   File "..\..\doc\install\Documentation\en_US\html\InstallGd\*"
    SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
    File "..\..\doc\install\Documentation\en_US\html\ReleaseNotes\*"
    SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\logo_files"
    File "..\..\doc\install\Documentation\en_US\html\ReleaseNotes\logo_files\*"
+   SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\relnotes_files"
+   File "..\..\doc\install\Documentation\en_US\html\ReleaseNotes\relnotes_files\*"
 
    SetOutPath "$INSTDIR\Client\Program"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1033.dll"    "$INSTDIR\Client\Program\afscreds_1033.dll" "$INSTDIR"
@@ -2925,6 +2914,8 @@ DoGerman:
    ;File "..\..\doc\install\Documentation\de_DE\html\ReleaseNotes\*"
    ;SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\logo_files"
    ;File "..\..\doc\install\Documentation\de_DE\html\ReleaseNotes\logo_files\*"
+   ;SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\relnotes_files"
+   ;File "..\..\doc\install\Documentation\de_DE\html\ReleaseNotes\relnotes_files\*"
 
    SetOutPath "$INSTDIR\Client\Program"
   !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1032.dll"                      "$INSTDIR\Client\Program\afscreds_1032.dll" "$INSTDIR"
@@ -2984,6 +2975,8 @@ DoSpanish:
    ;File "..\..\doc\install\Documentation\es_ES\html\ReleaseNotes\*"
    SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\logo_files"
    ;File "..\..\doc\install\Documentation\es_ES\html\ReleaseNotes\logo_files\*"
+   SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\relnotes_files"
+   ;File "..\..\doc\install\Documentation\es_ES\html\ReleaseNotes\relnotes_files\*"
 
    SetOutPath "$INSTDIR\Client\Program"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1034.dll"     "$INSTDIR\Client\Program\afscreds_1034.dll" "$INSTDIR" 
@@ -3043,6 +3036,8 @@ DoJapanese:
    ;File "..\..\doc\install\Documentation\ja_JP\html\ReleaseNotes\*"
    SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\logo_files"
    ;File "..\..\doc\install\Documentation\ja_JP\html\ReleaseNotes\logo_files\*"
+   SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\relnotes_files"
+   ;File "..\..\doc\install\Documentation\ja_JP\html\ReleaseNotes\relnotes_files\*"
 
    SetOutPath "$INSTDIR\Client\Program"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1041.dll"  "$INSTDIR\Client\Program\afscreds_1041.dll" "$INSTDIR"  
@@ -3102,6 +3097,8 @@ DoKorean:
    File "..\..\doc\install\Documentation\ko_KR\html\ReleaseNotes\*"
    SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\logo_files"
    ;File "..\..\doc\install\Documentation\ko_KR\html\ReleaseNotes\logo_files\*"
+   SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\relnotes_files"
+   ;File "..\..\doc\install\Documentation\ko_KR\html\ReleaseNotes\relnotes_files\*"
 
    SetOutPath "$INSTDIR\Client\Program"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1042.dll"  "$INSTDIR\Client\Program\afscreds_1042.dll" "$INSTDIR"   
@@ -3162,6 +3159,8 @@ DoPortugueseBR:
    File "..\..\doc\install\Documentation\pt_BR\html\ReleaseNotes\*"
    SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\logo_files"
    ;File "..\..\doc\install\Documentation\pt_BR\html\ReleaseNotes\logo_files\*"
+   SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\relnotes_files"
+   ;File "..\..\doc\install\Documentation\pt_BR\html\ReleaseNotes\relnotes_files\*"
 
    SetOutPath "$INSTDIR\Client\Program"
    !insertmacro ReplaceDLL  "${AFS_CLIENT_BUILDDIR}\afscreds_1046.dll"  "$INSTDIR\Client\Program\afscreds_1046.dll" "$INSTDIR"    
@@ -3221,6 +3220,8 @@ DoSimpChinese:
    File "..\..\doc\install\Documentation\zh_CN\html\ReleaseNotes\*"
    SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\logo_files"
    ;File "..\..\doc\install\Documentation\zh_CN\html\ReleaseNotes\logo_files\*"
+   SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\relnotes_files"
+   ;File "..\..\doc\install\Documentation\zh_CN\html\ReleaseNotes\relnotes_files\*"
 
    SetOutPath "$INSTDIR\Client\Program"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_2052.dll"   "$INSTDIR\Client\Program\afscreds_2052.dll" "$INSTDIR"     
@@ -3280,6 +3281,8 @@ DoTradChinese:
    File "..\..\doc\install\Documentation\zh_TW\html\ReleaseNotes\*"
    SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\logo_files"
    ;File "..\..\doc\install\Documentation\zh_TW\html\ReleaseNotes\logo_files\*"
+   SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes\relnotes_files"
+   ;File "..\..\doc\install\Documentation\zh_TW\html\ReleaseNotes\relnotes_files\*"
 
    SetOutPath "$INSTDIR\Client\Program"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscreds_1028.dll"  "$INSTDIR\Client\Program\_1028.dll" "$INSTDIR"      
@@ -3640,7 +3643,7 @@ FunctionEnd
 ;
 ; Returns on top of stack
 ;
-; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003)
+; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003, Vista/2008)
 ; or
 ; '' (Unknown Windows Version)
 ;
@@ -3696,7 +3699,8 @@ Function GetWindowsVersion
 
   StrCmp $R1 '5.0' lbl_winnt_2000
   StrCmp $R1 '5.1' lbl_winnt_XP
-  StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
+  StrCmp $R1 '5.2' lbl_winnt_2003
+  StrCmp $R1 '6.0' lbl_winnt_vista lbl_error
 
   lbl_winnt_x:
     StrCpy $R0 "NT $R0" 6
@@ -3714,6 +3718,10 @@ Function GetWindowsVersion
     Strcpy $R0 '2003'
   Goto lbl_done
 
+  lbl_winnt_vista:
+    Strcpy $R0 'Vista'
+  Goto lbl_done
+
   lbl_error:
     Strcpy $R0 ''
   lbl_done: