windows-install-nsis-20081016
[openafs.git] / src / WINNT / install / NSIS / OpenAFS.nsi
index 8ec85cb..b196cdd 100644 (file)
@@ -1,3 +1,4 @@
+!define RELEASE 1
 ; OpenAFS Install Script for NSIS
 ; This version compiles with NSIS v2.07
 ;
@@ -49,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-2008"
 !ifdef DEBUG
 VIAddVersionKey "PrivateBuild" "Checked/Debug"
 !endif               ; End DEBUG
@@ -84,6 +85,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   !define AFS_COMPANY_NAME "OpenAFS"
   !define AFS_PRODUCT_NAME "OpenAFS"
   !define AFS_REGKEY_ROOT "Software\TransarcCorporation"
+  !define NID_PLUGIN_MGR  "Software\MIT\NetIDMgr\PluginManager"
   CRCCheck force
 
   ;Folder selection page
@@ -109,7 +111,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
 ;--------------------------------
 ;Modern UI Configuration
 
-  ;!define MUI_LICENSEPAGE
+  !define MUI_LICENSEPAGE
   !define MUI_CUSTOMPAGECOMMANDS
   !define MUI_WELCOMEPAGE
   !define MUI_COMPONENTSPAGE
@@ -124,6 +126,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   
   
   !insertmacro MUI_PAGE_WELCOME
+  !insertmacro MUI_PAGE_LICENSE "Licenses.rtf"
   !insertmacro MUI_PAGE_COMPONENTS
   !insertmacro MUI_PAGE_DIRECTORY
   Page custom AFSPageGetCellServDB
@@ -132,7 +135,6 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   !insertmacro MUI_PAGE_INSTFILES
   !insertmacro MUI_PAGE_FINISH
   
-  ;LicenseData "Licenses.rtf"
 ;--------------------------------
 ;Languages
 
@@ -325,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
@@ -526,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"
@@ -538,9 +554,9 @@ Section "!AFS Client" secClient
   File "${AFS_CLIENT_BUILDDIR}\afsdacl.exe"
   File "${AFS_CLIENT_BUILDDIR}\cmdebug.exe"
   File "${AFS_CLIENT_BUILDDIR}\aklog.exe"
-  File "${AFS_CLIENT_BUILDDIR}\afscreds.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"
@@ -552,18 +568,19 @@ Section "!AFS Client" secClient
   File "${AFS_DESTDIR}\etc\rxdebug.exe"
   File "${AFS_DESTDIR}\etc\backup.exe"
   !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa.cpl" "$INSTDIR\Client\Program\afs_cpa.cpl" "$INSTDIR"
+  !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afscred.dll" "$INSTDIR\Client\Program\afscred.dll" "$INSTDIR"
+  !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
-!ifndef DEBUG
-  !insertmacro ReplaceDLL "..\..\afsrdr\objfre_w2K_x86\i386\afsrdr.sys" "$SYSDIR\DRIVERS\afsrdr.sys" "$INSTDIR"
-!else
-  !insertmacro ReplaceDLL "..\..\afsrdr\objchk_w2K_x86\i386\afsrdr.sys" "$SYSDIR\DRIVERS\afsrdr.sys" "$INSTDIR"
-!endif
-!endif
-   
+
+  ; Remove the binaries from the old location if present
+  Delete /REBOOTOK "$SYSDIR\afslogon.dll"
+  Delete "$SYSDIR\afscpcc.exe"
+  Delete "$SYSDIR\afslogon.pdb"
+  Delete "$SYSDIR\afscpcc.pdb"
+
    Call AFSLangFiles
 
   ; Get AFS CellServDB file
@@ -625,6 +642,18 @@ Section "!AFS Client" secClient
    DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Debug"
 !endif
 
+  ;NetIDMgr Plug-in Reg Entries
+  WriteRegStr HKLM "${NID_PLUGIN_MGR}\Modules\OpenAFS" "ImagePath" "$INSTDIR\Client\Program\afscred.dll"
+  WriteRegStr HKLM "${NID_PLUGIN_MGR}\Modules\OpenAFS" "Description" "OpenAFS Module"
+  WriteRegStr HKLM "${NID_PLUGIN_MGR}\Modules\OpenAFS" "Vendor" "Secure Endpoints Inc."
+  WriteRegStr HKLM "${NID_PLUGIN_MGR}\Modules\OpenAFS" "PluginList" "AfsCred"
+  WriteRegDWORD HKLM "${NID_PLUGIN_MGR}\Modules\OpenAFS" "NoUnload" "1"
+  
+  WriteRegStr HKLM "${NID_PLUGIN_MGR}\Plugins\AfsCred" "Module" "OpenAFS"
+  WriteRegStr HKLM "${NID_PLUGIN_MGR}\Plugins\AfsCred" "Description" "AFS Credentials Provider"
+  WriteRegStr HKLM "${NID_PLUGIN_MGR}\Plugins\AfsCred" "Dependencies" "Krb5Cred"
+  WriteRegDWORD HKLM "${NID_PLUGIN_MGR}\Plugins\AfsCred" "Type" "1"
+
    ; On Windows 2000 work around KB301673.  This is fixed in Windows XP and 2003
    Call GetWindowsVersion
    Pop $R1
@@ -693,8 +722,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
 
@@ -719,7 +748,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
 
@@ -758,15 +787,16 @@ skipremove:
   ; WinLogon Event Notification
   WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Asynchronous" 0
   WriteRegDWORD HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Impersonate"  1
-  WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "DLLName" "afslogon.dll"
+  WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "DLLName" "$INSTDIR\Client\Program\afslogon.dll"
   WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\WinLogon\Notify\AfsLogon" "Logon" "AFS_Logon_Event"
   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
   
@@ -897,7 +927,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:
@@ -905,10 +935,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"  
@@ -980,7 +1024,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
@@ -1061,11 +1111,6 @@ DoneLanguage:
   WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
   WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
 
-  ; Write start menu shortcut
-  SetOutPath "$SMPROGRAMS\OpenAFS"
-  CreateShortCut "$SMPROGRAMS\OpenAFS\Documentation.lnk" "$INSTDIR\Documentation\html\index.htm"
-  
-  
   WriteUninstaller "$INSTDIR\Uninstall.exe"
   WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayIcon" "$INSTDIR\Uninstall.exe,0"  
   CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
@@ -1075,14 +1120,14 @@ SectionEnd
 
 Section /o "Software Development Kit (SDK)" secSDK
 
-    SetOutPath "$INSTDIR\Client\Program\lib"
-    File /r "${AFS_CLIENT_LIBDIR}\*.*"
+   SetOutPath "$INSTDIR\SDK\lib"
+   File /r "${AFS_CLIENT_LIBDIR}\*.*"
 
-    SetOutPath "$INSTDIR\Client\Program\Include"
-    File /r "${AFS_BUILD_INCDIR}\*.*"    
+   SetOutPath "$INSTDIR\SDK\Include"
+   File /r "${AFS_BUILD_INCDIR}\*.*"    
 
    ; Client Sample
-   SetOutPath "$INSTDIR\Client\Program\Sample"
+   SetOutPath "$INSTDIR\SDK\Sample"
    File "..\..\afsd\sample\token.c"
 
    ;Store install folder
@@ -1137,9 +1182,11 @@ Section /o "Debug symbols" secDebug
   File "${AFS_DESTDIR}\etc\rxdebug.pdb"
   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
@@ -1189,10 +1236,11 @@ DoControl:
 
 DoCommon:
   SetOutPath "$INSTDIR\Common"
+!IFDEF CL_1500
+  ; Do nothing
+!ELSE
 !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"
@@ -1210,6 +1258,7 @@ DoCommon:
 !ENDIF
 !ENDIF
 !ENDIF
+!ENDIF
   
 ; Common Areas
    SetOutPath "$INSTDIR\Common"
@@ -1452,7 +1501,7 @@ NoDocs:
 ; the SDK is installed.  If not, we don't need to push it on the user.
 ; If they are there, we want to make sure they match the installed version.
 CheckSDK:
-   IfFileExists "$INSTDIR\Client\Program\Include\main.h" +1 NoSDK
+   IfFileExists "$INSTDIR\SDK\Include\main.h" +1 NoSDK
    SectionGetFlags ${secSDK} $0
    IntOp $0 $0 | ${SF_SELECTED}
    SectionSetFlags ${secSDK} $0
@@ -1632,10 +1681,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"
@@ -1670,85 +1722,89 @@ StartRemove:
    Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.pdb"
    Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.pdb"
 !IFDEF DEBUG
+!IFDEF CL_1500
+   SetOutPath "$INSTDIR\Common"
+   File /oname=vcruntime.msi "${MSVCMSI}"
+   nsExec::Exec 'msiexec /x "$INSTDIR\Common\vcruntime.msi" /passive /norestart'
+   Delete "$INSTDIR\Common\vcruntime.msi"
+!ELSE
 !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\Common"
+   File /oname=vcruntime.msi "${MSVCMSI}"
+   nsExec::Exec 'msiexec /x "$INSTDIR\Common\vcruntime.msi" /passive /norestart'
+   Delete "$INSTDIR\Common\vcruntime.msi"
 !ELSE
 !IFDEF CL_1310
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\mfc71d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\mfc71d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp71d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp71d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc71d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc71d.pdb"
 !ELSE
 !IFDEF CL_1300
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\mfc70d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\mfc70d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcr70d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcr70d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp70d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp70d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc70d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc70d.pdb"
 !ELSE
-   Delete /REBOOTOK "$INSTDIR\bin\mfc42d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\mfc42d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc42d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc42d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp60d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp60d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.pdb"
+!ENDIF
 !ENDIF
 !ENDIF
 !ENDIF
 !ELSE
+!IFDEF CL_1500
+   SetOutPath "$INSTDIR\Common"
+   File /oname=vcruntime.msi "${MSVCMSI}"
+   nsExec::Exec 'msiexec /x "$INSTDIR\Common\vcruntime.msi" /passive /norestart'
+   Delete "$INSTDIR\Common\vcruntime.msi"
+!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"
+   SetOutPath "$INSTDIR\Common"
+   File /oname=vcruntime.msi "${MSVCMSI}"
+   nsExec::Exec 'msiexec /x "$INSTDIR\Common\vcruntime.msi" /passive /norestart'
+   Delete "$INSTDIR\Common\vcruntime.msi"
 !ELSE
 !IFDEF CL_1310
-   Delete /REBOOTOK "$INSTDIR\bin\mfc71.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr71.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp71.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71CHS.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71CHT.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71DEU.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71ENU.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71ESP.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71FRA.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71ITA.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71JPN.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71KOR.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc71.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcr71.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp71.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71CHS.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71CHT.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71DEU.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71ENU.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71ESP.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71FRA.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71ITA.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71JPN.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71KOR.DLL"
 !ELSE
 !IFDEF CL_1300
-   Delete /REBOOTOK "$INSTDIR\bin\mfc70.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr70.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp70.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70CHS.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70CHT.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70DEU.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70ENU.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70ESP.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70FRA.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70ITA.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70JPN.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70KOR.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc70.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcr70.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp70.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70CHS.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70CHT.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70DEU.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70ENU.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70ESP.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70FRA.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70ITA.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70JPN.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70KOR.DLL"
 !ELSE
-   Delete /REBOOTOK "$INSTDIR\bin\mfc42.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp60.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcrt.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc42.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp60.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcrt.dll"
+!ENDIF
 !ENDIF
 !ENDIF
 !ENDIF
@@ -1821,17 +1877,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"
@@ -1839,101 +1894,110 @@ 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\*"
+  Delete /REBOOTOK "$INSTDIR\SDK\Include\afs\*"
+  Delete /REBOOTOK "$INSTDIR\SDK\Include\rx\*"
+  Delete /REBOOTOK "$INSTDIR\SDK\Sample\*"
+  Delete /REBOOTOK "$INSTDIR\SDK\*"
+
+  RMDir  "$INSTDIR\SDK\Sample"
+  RMDir  "$INSTDIR\SDK\Include\afs"
+  RMDir  "$INSTDIR\SDK\Include\rx"
+  RMDir  "$INSTDIR\SDK\Include"
+  RMDir  "$INSTDIR\SDK"
+
   Delete /REBOOTOK "$INSTDIR\Client\Program\*"
-  Delete /REBOOTOK "$INSTDIR\Client\Program\Include\*"
-  Delete /REBOOTOK "$INSTDIR\Client\Program\Include\afs\*"
-  Delete /REBOOTOK "$INSTDIR\Client\Program\Include\rx\*"
-  Delete /REBOOTOK "$INSTDIR\Client\Program\Sample\*"
-  RMDir  "$INSTDIR\Client\Program\Sample"
-  RMDir  "$INSTDIR\Client\Program\Include\afs"
-  RMDir  "$INSTDIR\Client\Program\Include\rx"
-  RMDir  "$INSTDIR\Client\Program\Include"
+  Delete /REBOOTOK "$INSTDIR\Client\*"
+
   RMDir  "$INSTDIR\Client\Program"
   RMDir  "$INSTDIR\Client"
 
 !IFDEF DEBUG  
+!IFDEF CL_1500
+   SetOutPath "$INSTDIR\Common"
+   File /oname=vcruntime.msi "${MSVCMSI}"
+   nsExec::Exec 'msiexec /x "$INSTDIR\Common\vcruntime.msi" /passive /norestart'
+   Delete "$INSTDIR\Common\vcruntime.msi"
+!ELSE
 !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\Common"
+   File /oname=vcruntime.msi "${MSVCMSI}"
+   nsExec::Exec 'msiexec /x "$INSTDIR\Common\vcruntime.msi" /passive /norestart'
+   Delete "$INSTDIR\Common\vcruntime.msi"
 !ELSE
 !IFDEF CL_1310
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr71d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp71d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\mfc71d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\mfc71d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp71d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp71d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc71d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc71d.pdb"
 !ELSE
 !IFDEF CL_1300
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr70d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp70d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\mfc70d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\mfc70d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcr70d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcr70d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp70d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp70d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc70d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc70d.pdb"
 !ELSE
-   Delete /REBOOTOK "$INSTDIR\bin\mfc42d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\mfc42d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp60d.pdb"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcrtd.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc42d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc42d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp60d.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp60d.pdb"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.pdb"
+!ENDIF
 !ENDIF
 !ENDIF
 !ENDIF
 !ELSE
+!IFDEF CL_1500
+   SetOutPath "$INSTDIR\Common"
+   File /oname=vcruntime.msi "${MSVCMSI}"
+   nsExec::Exec 'msiexec /x "$INSTDIR\Common\vcruntime.msi" /passive /norestart'
+   Delete "$INSTDIR\Common\vcruntime.msi"
+!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"
+   SetOutPath "$INSTDIR\Common"
+   File /oname=vcruntime.msi "${MSVCMSI}"
+   nsExec::Exec 'msiexec /x "$INSTDIR\Common\vcruntime.msi" /passive /norestart'
+   Delete "$INSTDIR\Common\vcruntime.msi"
 !ELSE
 !IFDEF CL_1310
-   Delete /REBOOTOK "$INSTDIR\bin\mfc71.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr71.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp71.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71CHS.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71CHT.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71DEU.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71ENU.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71ESP.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71FRA.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71ITA.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71JPN.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC71KOR.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc71.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcr71.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp71.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71CHS.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71CHT.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71DEU.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71ENU.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71ESP.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71FRA.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71ITA.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71JPN.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC71KOR.DLL"
 !ELSE
 !IFDEF CL_1300
-   Delete /REBOOTOK "$INSTDIR\bin\mfc70.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcr70.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp70.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70CHS.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70CHT.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70DEU.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70ENU.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70ESP.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70FRA.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70ITA.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70JPN.DLL"
-   Delete /REBOOTOK "$INSTDIR\bin\MFC70KOR.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc70.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcr70.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp70.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70CHS.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70CHT.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70DEU.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70ENU.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70ESP.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70FRA.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70ITA.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70JPN.DLL"
+   Delete /REBOOTOK "$INSTDIR\Common\MFC70KOR.DLL"
 !ELSE
-   Delete /REBOOTOK "$INSTDIR\bin\mfc42.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcp60.dll"
-   Delete /REBOOTOK "$INSTDIR\bin\msvcrt.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\mfc42.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcp60.dll"
+   Delete /REBOOTOK "$INSTDIR\Common\msvcrt.dll"
+!ENDIF
 !ENDIF
 !ENDIF
 !ENDIF
@@ -1996,6 +2060,9 @@ StartRemove:
   DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
   DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server"
   DeleteRegKey /ifempty HKLM "${AFS_REGKEY_ROOT}"
+  DeleteRegKey HKLM "${NID_PLUGIN_MGR}\Modules\OpenAFS"
+  DeleteRegKey HKLM "${NID_PLUGIN_MGR}\Plugins\AfsCred"
+  DeleteRegKey /ifempty HKLM "Software\MIT\NetIDMgr"
   DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS"
   DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled"
 
@@ -2722,19 +2789,15 @@ Function AFSLangFiles
  SetOutPath "$INSTDIR\Common"
 
 !IFDEF DEBUG
+!IFDEF CL_1500
+   File /oname=vcruntime.msi "${MSVCMSI}"
+   nsExec::Exec 'msiexec /i "$INSTDIR\Common\vcruntime.msi" /passive /norestart'
+   Delete "$INSTDIR\Common\vcruntime.msi"
+!ELSE
 !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 /oname=vcruntime.msi "${MSVCMSI}"
+   nsExec::Exec 'msiexec /i "$INSTDIR\Common\vcruntime.msi" /passive /norestart'
+   Delete "$INSTDIR\Common\vcruntime.msi"
 !ELSE
 !IFDEF CL_1310
    !insertmacro ReplaceDLL "${SYSTEMDIR}\msvcr71d.dll" "$INSTDIR\Common\msvcr71d.dll" "$INSTDIR"
@@ -2770,20 +2833,17 @@ Function AFSLangFiles
 !ENDIF
 !ENDIF
 !ENDIF
+!ENDIF
+!ELSE
+!IFDEF CL_1500
+   File /oname=vcruntime.msi "${MSVCMSI}"
+   nsExec::Exec 'msiexec /i "$INSTDIR\Common\vcruntime.msi" /passive /norestart'
+   Delete "$INSTDIR\Common\vcruntime.msi"
 !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 /oname=vcruntime.msi "${MSVCMSI}"
+   nsExec::Exec 'msiexec /i "$INSTDIR\Common\vcruntime.msi" /passive /norestart'
+   Delete "$INSTDIR\Common\vcruntime.msi"
 !ELSE
 !IFDEF CL_1310
    !insertmacro ReplaceDLL "${SYSTEMDIR}\mfc71.dll" "$INSTDIR\Common\mfc71.dll" "$INSTDIR"
@@ -2820,6 +2880,7 @@ Function AFSLangFiles
 !ENDIF
 !ENDIF   
 !ENDIF
+!ENDIF
 
    StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
    StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
@@ -2838,12 +2899,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"
@@ -2853,6 +2914,11 @@ DoEnglish:
    ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.pdb"
 !endif
 
+   File "..\..\doc\help\en_US\afs-light.CNT"
+   File "..\..\doc\help\en_US\afs-light.hlp"
+   File "..\..\doc\help\en_US\afs-nt.CNT"
+   File "..\..\doc\help\en_US\afs-nt.HLP"
+
    SetOutPath "$INSTDIR\Common"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1033.dll"           "$INSTDIR\Common\afs_config_1033.dll" "$INSTDIR"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.dll"              "$INSTDIR\Common\afs_cpa_1033.dll" "$INSTDIR"
@@ -2865,10 +2931,6 @@ DoEnglish:
    !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.dll"   "$INSTDIR\Common\TaAfsServerManager_1033.dll" "$INSTDIR"
    File "..\..\doc\help\en_US\afs-cc.CNT"
    File "..\..\doc\help\en_US\afs-cc.hlp"
-   File "..\..\doc\help\en_US\afs-light.CNT"
-   File "..\..\doc\help\en_US\afs-light.hlp"
-   File "..\..\doc\help\en_US\afs-nt.CNT"
-   File "..\..\doc\help\en_US\afs-nt.HLP"
    File "..\..\doc\help\en_US\taafscfg.CNT"
    File "..\..\doc\help\en_US\taafscfg.hlp"
    File "..\..\doc\help\en_US\taafssvrmgr.CNT"
@@ -2895,13 +2957,15 @@ DoGerman:
    SetOutPath "$INSTDIR\Documentation\html"
    File "..\..\doc\install\Documentation\de_DE\html\*"
    SetOutPath "$INSTDIR\Documentation\html\index_files"
-   File "..\..\doc\install\Documentation\de_DE\html\index_files\*"
+   ;File "..\..\doc\install\Documentation\de_DE\html\index_files\*"
    SetOutPath "$INSTDIR\Documentation\html\InstallGd"
    File "..\..\doc\install\Documentation\de_DE\html\InstallGd\*"
    ;SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
    ;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"
@@ -2911,6 +2975,11 @@ DoGerman:
    ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1032.pdb"
 !endif
 
+   File "..\..\doc\help\de_DE\afs-light.CNT"
+   File "..\..\doc\help\de_DE\afs-light.hlp"
+   File "..\..\doc\help\de_DE\afs-nt.CNT"
+   File "..\..\doc\help\de_DE\afs-nt.HLP"
+
    SetOutPath "$INSTDIR\Common"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1032.dll"           "$INSTDIR\Common\afs_config_1032.dll" "$INSTDIR"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.dll"              "$INSTDIR\Common\afs_cpa_1032.dll" "$INSTDIR" 
@@ -2923,10 +2992,6 @@ DoGerman:
    !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1032.dll"   "$INSTDIR\Common\TaAfsServerManager_1032.dll" "$INSTDIR" 
    File "..\..\doc\help\de_DE\afs-cc.CNT"
    File "..\..\doc\help\de_DE\afs-cc.hlp"
-   File "..\..\doc\help\de_DE\afs-light.CNT"
-   File "..\..\doc\help\de_DE\afs-light.hlp"
-   File "..\..\doc\help\de_DE\afs-nt.CNT"
-   File "..\..\doc\help\de_DE\afs-nt.HLP"
    File "..\..\doc\help\de_DE\taafscfg.CNT"
    File "..\..\doc\help\de_DE\taafscfg.hlp"
    File "..\..\doc\help\de_DE\taafssvrmgr.CNT"
@@ -2960,6 +3025,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" 
@@ -2969,6 +3036,11 @@ DoSpanish:
    ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.pdb"
 !endif
 
+   File "..\..\doc\help\es_ES\afs-light.CNT"
+   File "..\..\doc\help\es_ES\afs-light.hlp"
+   File "..\..\doc\help\es_ES\afs-nt.CNT"
+   File "..\..\doc\help\es_ES\afs-nt.HLP"
+
    SetOutPath "$INSTDIR\Common"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1034.dll"          "$INSTDIR\Common\afs_config_1034.dll" "$INSTDIR"  
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.dll"             "$INSTDIR\Common\afs_cpa_1034.dll" "$INSTDIR"  
@@ -2981,10 +3053,6 @@ DoSpanish:
    !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1034.dll"  "$INSTDIR\Common\TaAfsServerManager_1034.dll" "$INSTDIR"  
    File "..\..\doc\help\es_ES\afs-cc.CNT"
    File "..\..\doc\help\es_ES\afs-cc.hlp"
-   File "..\..\doc\help\es_ES\afs-light.CNT"
-   File "..\..\doc\help\es_ES\afs-light.hlp"
-   File "..\..\doc\help\es_ES\afs-nt.CNT"
-   File "..\..\doc\help\es_ES\afs-nt.HLP"
    File "..\..\doc\help\es_ES\taafscfg.CNT"
    File "..\..\doc\help\es_ES\taafscfg.hlp"
    File "..\..\doc\help\es_ES\taafssvrmgr.CNT"
@@ -3011,13 +3079,15 @@ DoJapanese:
    SetOutPath "$INSTDIR\Documentation\html"
    File "..\..\doc\install\Documentation\ja_JP\html\*"
    SetOutPath "$INSTDIR\Documentation\html\index_files"
-   File "..\..\doc\install\Documentation\ja_JP\html\index_files\*"
+   ;File "..\..\doc\install\Documentation\ja_JP\html\index_files\*"
    SetOutPath "$INSTDIR\Documentation\html\InstallGd"
    File "..\..\doc\install\Documentation\ja_JP\html\InstallGd\*"
    SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
    ;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"  
@@ -3027,6 +3097,11 @@ DoJapanese:
    ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.pdb"
 !endif
 
+   File "..\..\doc\help\ja_JP\afs-light.CNT"
+   File "..\..\doc\help\ja_JP\afs-light.hlp"
+   File "..\..\doc\help\ja_JP\afs-nt.CNT"
+   File "..\..\doc\help\ja_JP\afs-nt.HLP"
+
    SetOutPath "$INSTDIR\Common"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1041.dll"           "$INSTDIR\Common\afs_config_1041.dll" "$INSTDIR"   
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.dll"              "$INSTDIR\Common\afs_cpa_1041.dll" "$INSTDIR"   
@@ -3039,10 +3114,6 @@ DoJapanese:
    !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1041.dll"   "$INSTDIR\Common\TaAfsServerManager_1041.dll" "$INSTDIR"   
    File "..\..\doc\help\ja_JP\afs-cc.CNT"
    File "..\..\doc\help\ja_JP\afs-cc.hlp"
-   File "..\..\doc\help\ja_JP\afs-light.CNT"
-   File "..\..\doc\help\ja_JP\afs-light.hlp"
-   File "..\..\doc\help\ja_JP\afs-nt.CNT"
-   File "..\..\doc\help\ja_JP\afs-nt.HLP"
    File "..\..\doc\help\ja_JP\taafscfg.CNT"
    File "..\..\doc\help\ja_JP\taafscfg.hlp"
    File "..\..\doc\help\ja_JP\taafssvrmgr.CNT"
@@ -3069,13 +3140,15 @@ DoKorean:
    SetOutPath "$INSTDIR\Documentation\html"
    File "..\..\doc\install\Documentation\ko_KR\html\*"
    SetOutPath "$INSTDIR\Documentation\html\index_files"
-   File "..\..\doc\install\Documentation\ko_KR\html\index_files\*"
+   ;File "..\..\doc\install\Documentation\ko_KR\html\index_files\*"
    SetOutPath "$INSTDIR\Documentation\html\InstallGd"
    File "..\..\doc\install\Documentation\ko_KR\html\InstallGd\*"
    SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
    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\*"
+   ;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"   
@@ -3085,6 +3158,11 @@ DoKorean:
    ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.pdb"
 !endif
 
+   File "..\..\doc\help\ko_KR\afs-light.CNT"
+   File "..\..\doc\help\ko_KR\afs-light.hlp"
+   File "..\..\doc\help\ko_KR\afs-nt.CNT"
+   File "..\..\doc\help\ko_KR\afs-nt.HLP"
+
    SetOutPath "$INSTDIR\Common"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1042.dll"           "$INSTDIR\Common\afs_config_1042.dll" "$INSTDIR"    
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.dll"              "$INSTDIR\Common\afs_cpa_1042.dll" "$INSTDIR"    
@@ -3097,10 +3175,6 @@ DoKorean:
    !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1042.dll"   "$INSTDIR\Common\TaAfsServerManager_1042.dll" "$INSTDIR"    
    File "..\..\doc\help\ko_KR\afs-cc.CNT"
    File "..\..\doc\help\ko_KR\afs-cc.hlp"
-   File "..\..\doc\help\ko_KR\afs-light.CNT"
-   File "..\..\doc\help\ko_KR\afs-light.hlp"
-   File "..\..\doc\help\ko_KR\afs-nt.CNT"
-   File "..\..\doc\help\ko_KR\afs-nt.HLP"
    File "..\..\doc\help\ko_KR\taafscfg.CNT"
    File "..\..\doc\help\ko_KR\taafscfg.hlp"
    File "..\..\doc\help\ko_KR\taafssvrmgr.CNT"
@@ -3128,13 +3202,15 @@ DoPortugueseBR:
    SetOutPath "$INSTDIR\Documentation\html"
    File "..\..\doc\install\Documentation\pt_BR\html\*"
    SetOutPath "$INSTDIR\Documentation\html\index_files"
-   File "..\..\doc\install\Documentation\pt_BR\html\index_files\*"
+   ;File "..\..\doc\install\Documentation\pt_BR\html\index_files\*"
    SetOutPath "$INSTDIR\Documentation\html\InstallGd"
    File "..\..\doc\install\Documentation\pt_BR\html\InstallGd\*"
    SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
    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\*"
+   ;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"    
@@ -3144,6 +3220,11 @@ DoPortugueseBR:
    ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.pdb"
 !endif
 
+   File "..\..\doc\help\pt_BR\afs-light.CNT"
+   File "..\..\doc\help\pt_BR\afs-light.hlp"
+   File "..\..\doc\help\pt_BR\afs-nt.CNT"
+   File "..\..\doc\help\pt_BR\afs-nt.HLP"
+
    SetOutPath "$INSTDIR\Common"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1046.dll"           "$INSTDIR\Common\afs_config_1046.dll" "$INSTDIR"     
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.dll"              "$INSTDIR\Common\afs_cpa_1046.dll" "$INSTDIR"     
@@ -3156,10 +3237,6 @@ DoPortugueseBR:
    !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1046.dll"   "$INSTDIR\Common\TaAfsServerManager_1046.dll" "$INSTDIR"     
    File "..\..\doc\help\pt_BR\afs-cc.CNT"
    File "..\..\doc\help\pt_BR\afs-cc.hlp"
-   File "..\..\doc\help\pt_BR\afs-light.CNT"
-   File "..\..\doc\help\pt_BR\afs-light.hlp"
-   File "..\..\doc\help\pt_BR\afs-nt.CNT"
-   File "..\..\doc\help\pt_BR\afs-nt.HLP"
    File "..\..\doc\help\pt_BR\taafscfg.CNT"
    File "..\..\doc\help\pt_BR\taafscfg.hlp"
    File "..\..\doc\help\pt_BR\taafssvrmgr.CNT"
@@ -3186,13 +3263,15 @@ DoSimpChinese:
    SetOutPath "$INSTDIR\Documentation\html"
    File "..\..\doc\install\Documentation\zh_CN\html\*"
    SetOutPath "$INSTDIR\Documentation\html\index_files"
-   File "..\..\doc\install\Documentation\zh_CN\html\index_files\*"
+   ;File "..\..\doc\install\Documentation\zh_CN\html\index_files\*"
    SetOutPath "$INSTDIR\Documentation\html\InstallGd"
    File "..\..\doc\install\Documentation\zh_CN\html\InstallGd\*"
    SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
    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\*"
+   ;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"     
@@ -3202,6 +3281,11 @@ DoSimpChinese:
    ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.pdb"
 !endif
 
+   File "..\..\doc\help\zh_CN\afs-light.CNT"
+   File "..\..\doc\help\zh_CN\afs-light.hlp"
+   File "..\..\doc\help\zh_CN\afs-nt.CNT"
+   File "..\..\doc\help\zh_CN\afs-nt.HLP"
+
    SetOutPath "$INSTDIR\Common"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_2052.dll"           "$INSTDIR\Common\afs_config_2052.dll" "$INSTDIR"      
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.dll"              "$INSTDIR\Common\afs_cpa_2052.dll" "$INSTDIR"      
@@ -3214,10 +3298,6 @@ DoSimpChinese:
    !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_2052.dll"   "$INSTDIR\Common\TaAfsServerManager_2052.dll" "$INSTDIR"      
    File "..\..\doc\help\zh_CN\afs-cc.CNT"
    File "..\..\doc\help\zh_CN\afs-cc.hlp"
-   File "..\..\doc\help\zh_CN\afs-light.CNT"
-   File "..\..\doc\help\zh_CN\afs-light.hlp"
-   File "..\..\doc\help\zh_CN\afs-nt.CNT"
-   File "..\..\doc\help\zh_CN\afs-nt.HLP"
    File "..\..\doc\help\zh_CN\taafscfg.CNT"
    File "..\..\doc\help\zh_CN\taafscfg.hlp"
    File "..\..\doc\help\zh_CN\taafssvrmgr.CNT"
@@ -3244,13 +3324,15 @@ DoTradChinese:
    SetOutPath "$INSTDIR\Documentation\html"
    File "..\..\doc\install\Documentation\zh_TW\html\*"
    SetOutPath "$INSTDIR\Documentation\html\index_files"
-   File "..\..\doc\install\Documentation\zh_TW\html\index_files\*"
+   ;File "..\..\doc\install\Documentation\zh_TW\html\index_files\*"
    SetOutPath "$INSTDIR\Documentation\html\InstallGd"
    File "..\..\doc\install\Documentation\zh_TW\html\InstallGd\*"
    SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
    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\*"
+   ;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"      
@@ -3260,6 +3342,11 @@ DoTradChinese:
    ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.pdb"
 !endif
 
+   File "..\..\doc\help\zh_TW\afs-light.CNT"
+   File "..\..\doc\help\zh_TW\afs-light.hlp"
+   File "..\..\doc\help\zh_TW\afs-nt.CNT"
+   File "..\..\doc\help\zh_TW\afs-nt.HLP"
+
    SetOutPath "$INSTDIR\Common"
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_config_1028.dll"           "$INSTDIR\Common\afs_config_1028.dll" "$INSTDIR"       
    !insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.dll"              "$INSTDIR\Common\afs_cpa_1028.dll" "$INSTDIR"       
@@ -3272,10 +3359,6 @@ DoTradChinese:
    !insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1028.dll"   "$INSTDIR\Common\TaAfsServerManager_1028.dll" "$INSTDIR"       
    File "..\..\doc\help\zh_TW\afs-cc.CNT"
    File "..\..\doc\help\zh_TW\afs-cc.hlp"
-   File "..\..\doc\help\zh_TW\afs-light.CNT"
-   File "..\..\doc\help\zh_TW\afs-light.hlp"
-   File "..\..\doc\help\zh_TW\afs-nt.CNT"
-   File "..\..\doc\help\zh_TW\afs-nt.HLP"
    File "..\..\doc\help\zh_TW\taafscfg.CNT"
    File "..\..\doc\help\zh_TW\taafscfg.hlp"
    File "..\..\doc\help\zh_TW\taafssvrmgr.CNT"
@@ -3296,6 +3379,12 @@ DoTradChinese:
    goto done
    
 done:
+
+  ; Write start menu shortcut
+  SetOutPath "$SMPROGRAMS\OpenAFS"
+  CreateShortCut "$SMPROGRAMS\OpenAFS\Documentation.lnk" "$INSTDIR\Documentation\html\index.htm"
+  
+
 FunctionEnd
 
 
@@ -3604,7 +3693,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)
 ;
@@ -3660,7 +3749,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
@@ -3678,6 +3768,10 @@ Function GetWindowsVersion
     Strcpy $R0 '2003'
   Goto lbl_done
 
+  lbl_winnt_vista:
+    Strcpy $R0 'Vista'
+  Goto lbl_done
+
   lbl_error:
     Strcpy $R0 ''
   lbl_done: