update-to-nsis-script-20040313
[openafs.git] / src / WINNT / install / NSIS / OpenAFS.nsi
index c429f41..36d1b1f 100644 (file)
 !include ${INCLUDEDIR}\nsi-includes.nsi
 ; Define DEBUG if building a DEBUG installer
 
-; This version compiles with NSIS v2.0b3 or NSIS v2.0b4
+; This version compiles with NSIS v2.0
 
-!ifdef v2.0b3       ; v2.0b3
-!ifndef DEBUG        ; !DEBUG
-!define MUI_PRODUCT "OpenAFS" ;Define your own software name here
-!else                ; DEBUG on v2.0b3
-!define MUI_PRODUCT "OpenAFS Checked/Debug"
-!endif               ; End DEBUG
-!define MUI_VERSION ${AFS_VERSION}
-!else                ; v2.0b4
 !ifndef RELEASE
-!ifndef DEBUG        ; !DEBUG on v2.0b4
+!ifndef DEBUG
 Name "OpenAFS ${AFS_VERSION} ${__DATE__} ${__TIME__}"
-!else                ; DEBUG on v2.0b4
+!else
 Name "OpenAFS ${AFS_VERSION} ${__DATE__} ${__TIME__} Checked/Debug"
 !endif               ; End DEBUG/!DEBUG
 !else
-!ifndef DEBUG        ; !DEBUG on v2.0b4
+!ifndef DEBUG
 Name "OpenAFS ${AFS_VERSION}"
-!else                ; DEBUG on v2.0b4
+!else                ; DEBUG
 Name "OpenAFS ${AFS_VERSION} Checked/Debug"
 !endif               ; End DEBUG/!DEBUG
 !endif
@@ -44,7 +36,6 @@ VIAddVersionKey "LegalCopyright" "(C)2003"
 !ifdef DEBUG
 VIAddVersionKey "PrivateBuild" "Checked/Debug"
 !endif               ; End DEBUG
-!endif               ; End v2.0b4
 
 
 !include "MUI.nsh"
@@ -62,11 +53,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   SilentInstall normal
   SetCompressor bzip2
   !define MUI_ICON "..\..\client_config\afs_config.ico"
-  !ifdef v2.0b3
-  !define MUI_UNICON "${NSISDIR}\Contrib\Icons\normal-uninstall.ico"
-  !else
   !define MUI_UNICON "..\..\client_config\afs_config.ico"
-  !endif
   !define AFS_COMPANY_NAME "OpenAFS"
   !define AFS_PRODUCT_NAME "OpenAFS"
   !define AFS_REGKEY_ROOT "Software\TransarcCorporation"
@@ -109,16 +96,6 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   !define MUI_UNCONFIRMPAGE
   
   
-!IFDEF v2.0b3       ; v2.0b3
-  !insertmacro MUI_PAGECOMMAND_WELCOME
- ;!insertmacro MUI_PAGECOMMAND_LICENSE
-  !insertmacro MUI_PAGECOMMAND_COMPONENTS
-  !insertmacro MUI_PAGECOMMAND_DIRECTORY
-  Page custom AFSPageGetCellServDB
-  Page custom AFSPageGetCellName
-  !insertmacro MUI_PAGECOMMAND_INSTFILES
-  !insertmacro MUI_PAGECOMMAND_FINISH
-!ELSE                ; v2.0b4
   !insertmacro MUI_PAGE_WELCOME
   !insertmacro MUI_PAGE_COMPONENTS
   !insertmacro MUI_PAGE_DIRECTORY
@@ -126,7 +103,6 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   Page custom AFSPageGetCellName
   !insertmacro MUI_PAGE_INSTFILES
   !insertmacro MUI_PAGE_FINISH
-!ENDIF
   
   ;LicenseData "Licenses.rtf"
 ;--------------------------------
@@ -139,9 +115,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   !insertmacro MUI_LANGUAGE "SimpChinese"
   !insertmacro MUI_LANGUAGE "TradChinese"    
   !insertmacro MUI_LANGUAGE "Japanese"
-  !ifndef v2.0b3
   !insertmacro MUI_LANGUAGE "Korean"
-  !endif
   ;!insertmacro MUI_LANGUAGE "Italian"
   ;!insertmacro MUI_LANGUAGE "Dutch"
   ;!insertmacro MUI_LANGUAGE "Danish"
@@ -171,9 +145,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   LangString DESC_SecCopyUI ${LANG_SIMPCHINESE} "OpenAFS for Windows: Simplified Chinese"
   LangString DESC_SecCopyUI ${LANG_TRADCHINESE} "OpenAFS for Windows: Traditional Chinese description"
   LangString DESC_SecCopyUI ${LANG_JAPANESE} "OpenAFS for Windows: Japanese description"
-!ifndef v2.0b3
   LangString DESC_SecCopyUI ${LANG_KOREAN} "OpenAFS for Windows: Korean description"
-!endif
   ;LangString DESC_SecCopyUI ${LANG_ITALIAN} "OpenAFS for Windows: Italian description"
   ;LangString DESC_SecCopyUI ${LANG_DUTCH} "OpenAFS for Windows: Dutch description"
   ;LangString DESC_SecCopyUI ${LANG_DANISH} "OpenAFS for Windows: Danish description"
@@ -198,9 +170,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   LangString DESC_secClient ${LANG_SIMPCHINESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
   LangString DESC_secClient ${LANG_TRADCHINESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
   LangString DESC_secClient ${LANG_JAPANESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
-!ifndef v2.0b3  
   LangString DESC_secClient ${LANG_KOREAN} "OpenAFS Client: Allows you to access AFS from your Windows PC."
-!endif
   LangString DESC_secClient ${LANG_PORTUGUESEBR} "OpenAFS Client: Allows you to access AFS from your Windows PC."
   
   LangString DESC_secServer ${LANG_ENGLISH} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
@@ -209,9 +179,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   LangString DESC_secServer ${LANG_SIMPCHINESE} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
   LangString DESC_secServer ${LANG_TRADCHINESE} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
   LangString DESC_secServer ${LANG_JAPANESE} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
-!ifndef v2.0b3 
   LangString DESC_secServer ${LANG_KOREAN} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
-!endif
   LangString DESC_secServer ${LANG_PORTUGUESEBR} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
   
   LangString DESC_secControl ${LANG_ENGLISH} "Control Center: GUI utilities for managing and configuring AFS servers.  This option requires the AFS Client."
@@ -220,9 +188,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   LangString DESC_secControl ${LANG_SIMPCHINESE} "Control Center: GUI utilities for managing and configuring AFS servers.  This option requires the AFS Client."
   LangString DESC_secControl ${LANG_TRADCHINESE} "Control Center: GUI utilities for managing and configuring AFS servers.  This option requires the AFS Client."
   LangString DESC_secControl ${LANG_JAPANESE} "Control Center: GUI utilities for managing and configuring AFS servers.  This option requires the AFS Client."
-!ifndef v2.0b3  
   LangString DESC_secControl ${LANG_KOREAN} "Control Center: GUI utilities for managing and configuring AFS servers.  This option requires the AFS Client."
-!endif
   LangString DESC_secControl ${LANG_PORTUGUESEBR} "Control Center: GUI utilities for managing and configuring AFS servers.  This option requires the AFS Client."
   
   LangString DESC_secDocs ${LANG_ENGLISH} "Supplemental Documentation: Additional documentation for using OpenAFS."
@@ -231,9 +197,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   LangString DESC_secDocs ${LANG_SIMPCHINESE} "Supplemental Documentation: Additional documentation for using OpenAFS."
   LangString DESC_secDocs ${LANG_TRADCHINESE} "Supplemental Documentation: Additional documentation for using OpenAFS."
   LangString DESC_secDocs ${LANG_JAPANESE} "Supplemental Documentation: Additional documentation for using OpenAFS."
-!ifndef v2.0b3  
   LangString DESC_secDocs ${LANG_KOREAN} "Supplemental Documentation: Additional documentation for using OpenAFS."
-!endif
   LangString DESC_secDocs ${LANG_PORTUGUESEBR} "Supplemental Documentation: Additional documentation for using OpenAFS."
   
   LangString DESC_secSDK ${LANG_ENGLISH} "SDK: Header files and libraries for developing software with OpenAFS."
@@ -242,9 +206,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   LangString DESC_secSDK ${LANG_SIMPCHINESE} "SDK: Header files and libraries for developing software with OpenAFS."
   LangString DESC_secSDK ${LANG_TRADCHINESE} "SDK: Header files and libraries for developing software with OpenAFS."
   LangString DESC_secSDK ${LANG_JAPANESE} "SDK: Header files and libraries for developing software with OpenAFS."
-!ifndef v2.0b3
   LangString DESC_secSDK ${LANG_KOREAN} "SDK: Header files and libraries for developing software with OpenAFS."
-!endif
   LangString DESC_secSDK ${LANG_PORTUGUESEBR} "SDK: Header files and libraries for developing software with OpenAFS."
   
 ; Popup error messages
@@ -254,9 +216,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   LangString CellError ${LANG_SIMPCHINESE} "You must specify a valid CellServDB file to copy during the install"
   LangString CellError ${LANG_TRADCHINESE} "You must specify a valid CellServDB file to copy during the install"
   LangString CellError ${LANG_JAPANESE} "You must specify a valid CellServDB file to copy during the install"
-!ifndef v2.0b3  
   LangString CellError ${LANG_KOREAN} "You must specify a valid CellServDB file to copy during the install"
-!endif
   LangString CellError ${LANG_PORTUGUESEBR} "You must specify a valid CellServDB file to copy during the install"
   
   LangString CellNameError ${LANG_ENGLISH} "You must specify a cell name for your client to use."
@@ -265,9 +225,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   LangString CellNameError ${LANG_SIMPCHINESE} "You must specify a cell name for your client to use."
   LangString CellNameError ${LANG_TRADCHINESE} "You must specify a cell name for your client to use."
   LangString CellNameError ${LANG_JAPANESE} "You must specify a cell name for your client to use."
-!ifndef v2.0b3
   LangString CellNameError ${LANG_KOREAN} "You must specify a cell name for your client to use."
-!endif
   LangString CellNameError ${LANG_PORTUGUESEBR} "You must specify a cell name for your client to use."
   
   LangString URLError ${LANG_ENGLISH} "You must specify a URL if you choose the option to download the CellServDB."
@@ -276,9 +234,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   LangString URLError ${LANG_SIMPCHINESE} "You must specify a URL if you choose the option to download the CellServDB."
   LangString URLError ${LANG_TRADCHINESE} "You must specify a URL if you choose the option to download the CellServDB."
   LangString URLError ${LANG_JAPANESE} "You must specify a URL if you choose the option to download the CellServDB."
-!ifndef v2.0b3
   LangString URLError ${LANG_KOREAN} "You must specify a URL if you choose the option to download the CellServDB."
-!endif
   LangString URLError ${LANG_PORTUGUESEBR} "You must specify a URL if you choose the option to download the CellServDB."
 
   
@@ -289,9 +245,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
    LangString UPGRADE_CLIENT ${LANG_SIMPCHINESE} "Upgrade AFS Client"
    LangString UPGRADE_CLIENT ${LANG_TRADCHINESE} "Upgrade AFS Client"
    LangString UPGRADE_CLIENT ${LANG_JAPANESE} "Upgrade AFS Client"
-!ifndef v2.0b3
    LangString UPGRADE_CLIENT ${LANG_KOREAN} "Upgrade AFS Client"
-!endif
    LangString UPGRADE_CLIENT ${LANG_PORTUGUESEBR} "Upgrade AFS Client"
  
    LangString REINSTALL_CLIENT ${LANG_ENGLISH} "Re-install AFS Client"
@@ -300,9 +254,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
    LangString REINSTALL_CLIENT ${LANG_SIMPCHINESE} "Re-install AFS Client"
    LangString REINSTALL_CLIENT ${LANG_TRADCHINESE} "Re-install AFS Client"
    LangString REINSTALL_CLIENT ${LANG_JAPANESE} "Re-install AFS Client"
-!ifndef v2.0b3
    LangString REINSTALL_CLIENT ${LANG_KOREAN} "Re-install AFS Client"
-!endif
    LangString REINSTALL_CLIENT ${LANG_PORTUGUESEBR} "Re-install AFS Client"
   
    LangString UPGRADE_SERVER ${LANG_ENGLISH} "Upgrade AFS Server"
@@ -311,9 +263,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
    LangString UPGRADE_SERVER ${LANG_SIMPCHINESE} "Upgrade AFS Server"
    LangString UPGRADE_SERVER ${LANG_TRADCHINESE} "Upgrade AFS Server"
    LangString UPGRADE_SERVER ${LANG_JAPANESE} "Upgrade AFS Server"
-!ifndef v2.0b3
    LangString UPGRADE_SERVER ${LANG_KOREAN} "Upgrade AFS Server"
-!endif
    LangString UPGRADE_SERVER ${LANG_PORTUGUESEBR} "Upgrade AFS Server"
     
    LangString REINSTALL_SERVER ${LANG_ENGLISH} "Re-install AFS Server"
@@ -322,9 +272,7 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
    LangString REINSTALL_SERVER ${LANG_SIMPCHINESE} "Re-install AFS Server"
    LangString REINSTALL_SERVER ${LANG_TRADCHINESE} "Re-install AFS Server"
    LangString REINSTALL_SERVER ${LANG_JAPANESE} "Re-install AFS Server"
-!ifndef v2.0b3   
    LangString REINSTALL_SERVER ${LANG_KOREAN} "Re-install AFS Server"
-!endif
    LangString REINSTALL_SERVER ${LANG_PORTUGUESEBR} "Re-install AFS Server"
   
   ReserveFile "CellServPage.ini"
@@ -334,120 +282,152 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
 ;--------------------------------
 ; Macros
 ; Macro - Upgrade DLL File
- ; Written by Joost Verburg
- ; ------------------------
- ;
- ; Example of usage:
- ; !insertmacro UpgradeDLL "dllname.dll" "$SYSDIR\dllname.dll"
- ;
- ; !define UPGRADEDLL_NOREGISTER if you want to upgrade a DLL which cannot be registered
- ;
- ; Note that this macro sets overwrite to ON (the default) when it has been inserted.
- ; If you are using another setting, set it again after inserting the macro.
+; Written by Joost Verburg
+; ------------------------
+;
+; Parameters:
+; LOCALFILE   - Location of the new DLL file (on the compiler system)
+; DESTFILE    - Location of the DLL file that should be upgraded
+;              (on the user's system)
+; TEMPBASEDIR - Directory on the user's system to store a temporary file
+;               when the system has to be rebooted.
+;               For Win9x support, this should be on the same volume as the
+;               DESTFILE!
+;               The Windows temp directory could be located on any volume,
+;               so you cannot use  this directory.
+;
+; Define UPGRADEDLL_NOREGISTER if you want to upgrade a DLL that does not
+; have to be registered.
+;
+; Note: If you want to support Win9x, you can only use
+;       short filenames (8.3).
+;
+; Example of usage:
+; !insertmacro UpgradeDLL "dllname.dll" "$SYSDIR\dllname.dll" "$SYSDIR"
+;
 
+!macro UpgradeDLL LOCALFILE DESTFILE TEMPBASEDIR
 
- !macro UpgradeDLL LOCALFILE DESTFILE
+  Push $R0
+  Push $R1
+  Push $R2
+  Push $R3
+  Push $R4
+  Push $R5
 
-   Push $R0
-   Push $R1
-   Push $R2
-   Push $R3
+  ;------------------------
+  ;Unique number for labels
 
-   ;------------------------
-   ;Check file and version
+  !define UPGRADEDLL_UNIQUE ${__LINE__}
 
-   IfFileExists "${DESTFILE}" "" "copy_${LOCALFILE}"
+  ;------------------------
+  ;Copy the parameters used on run-time to a variable
+  ;This allows the usage of variables as paramter
 
-   ClearErrors
-     GetDLLVersionLocal "${LOCALFILE}" $R0 $R1
-     GetDLLVersion "${DESTFILE}" $R2 $R3
-   IfErrors "upgrade_${LOCALFILE}"
+  StrCpy $R4 "${DESTFILE}"
+  StrCpy $R5 "${TEMPBASEDIR}"
 
-   IntCmpU $R0 $R2 "" "done_${LOCALFILE}" "upgrade_${LOCALFILE}"
-   IntCmpU $R1 $R3 "done_${LOCALFILE}" "done_${LOCALFILE}" "upgrade_${LOCALFILE}"
+  ;------------------------
+  ;Check file and version
 
-   ;------------------------
-   ;Let's upgrade the DLL!
+  IfFileExists $R4 0 upgradedll.copy_${UPGRADEDLL_UNIQUE}
 
-   SetOverwrite try
+  ClearErrors
+    GetDLLVersionLocal "${LOCALFILE}" $R0 $R1
+    GetDLLVersion $R4 $R2 $R3
+  IfErrors upgradedll.upgrade_${UPGRADEDLL_UNIQUE}
 
-   "upgrade_${LOCALFILE}:"
-     !ifndef UPGRADEDLL_NOREGISTER
-       ;Unregister the DLL
-       UnRegDLL "${DESTFILE}"
-     !endif
+  IntCmpU $R0 $R2 0 upgradedll.done_${UPGRADEDLL_UNIQUE} \
+    upgradedll.upgrade_${UPGRADEDLL_UNIQUE}
+  IntCmpU $R1 $R3 upgradedll.done_${UPGRADEDLL_UNIQUE} \
+    upgradedll.done_${UPGRADEDLL_UNIQUE} \
+    upgradedll.upgrade_${UPGRADEDLL_UNIQUE}
 
-   ;------------------------
-   ;Try to copy the DLL directly
+  ;------------------------
+  ;Let's upgrade the DLL!
 
-   ClearErrors
-     StrCpy $R0 "${DESTFILE}"
-     Call ":file_${LOCALFILE}"
-   IfErrors "" "noreboot_${LOCALFILE}"
+  SetOverwrite try
 
-   ;------------------------
-   ;DLL is in use. Copy it to a temp file and Rename it on reboot.
+  upgradedll.upgrade_${UPGRADEDLL_UNIQUE}:
+    !ifndef UPGRADEDLL_NOREGISTER
+      ;Unregister the DLL
+      UnRegDLL $R4
+    !endif
 
-   GetTempFileName $R0
-     Call ":file_${LOCALFILE}"
-   Rename /REBOOTOK $R0 "${DESTFILE}"
+  ;------------------------
+  ;Try to copy the DLL directly
 
-   ;------------------------
-   ;Register the DLL on reboot
+  ClearErrors
+    StrCpy $R0 $R4
+    Call :upgradedll.file_${UPGRADEDLL_UNIQUE}
+  IfErrors 0 upgradedll.noreboot_${UPGRADEDLL_UNIQUE}
 
-   !ifndef UPGRADEDLL_NOREGISTER
-     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" \
-     "Register ${DESTFILE}" '"$SYSDIR\rundll32.exe" "${DESTFILE},DllRegisterServer"'
-   !endif
+  ;------------------------
+  ;DLL is in use. Copy it to a temp file and Rename it on reboot.
 
-   Goto "done_${LOCALFILE}"
+  GetTempFileName $R0 $R5
+    Call :upgradedll.file_${UPGRADEDLL_UNIQUE}
+  Rename /REBOOTOK $R0 $R4
 
-   ;------------------------
-   ;DLL does not exist - just extract
+  ;------------------------
+  ;Register the DLL on reboot
 
-   "copy_${LOCALFILE}:"
-     StrCpy $R0 "${DESTFILE}"
-     Call ":file_${LOCALFILE}"
+  !ifndef UPGRADEDLL_NOREGISTER
+    WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" \
+      "Register $R4" 'rundll32.exe "$R4",DllRegisterServer'
+  !endif
 
-   ;------------------------
-   ;Register the DLL
+  Goto upgradedll.done_${UPGRADEDLL_UNIQUE}
 
-   "noreboot_${LOCALFILE}:"
-     !ifndef UPGRADEDLL_NOREGISTER
-       RegDLL "${DESTFILE}"
-     !endif
+  ;------------------------
+  ;DLL does not exist - just extract
 
-   ;------------------------
-   ;Done
+  upgradedll.copy_${UPGRADEDLL_UNIQUE}:
+    StrCpy $R0 $R4
+    Call :upgradedll.file_${UPGRADEDLL_UNIQUE}
 
-   "done_${LOCALFILE}:"
+  ;------------------------
+  ;Register the DLL
 
-   Pop $R3
-   Pop $R2
-   Pop $R1
-   Pop $R0
+  upgradedll.noreboot_${UPGRADEDLL_UNIQUE}:
+    !ifndef UPGRADEDLL_NOREGISTER
+      RegDLL $R4
+    !endif
 
-   ;------------------------
-   ;End
+  ;------------------------
+  ;Done
 
-   Goto "end_${LOCALFILE}"
+  upgradedll.done_${UPGRADEDLL_UNIQUE}:
 
-   ;------------------------
-   ;Called to extract the DLL
+  Pop $R5
+  Pop $R4
+  Pop $R3
+  Pop $R2
+  Pop $R1
+  Pop $R0
 
-   "file_${LOCALFILE}:"
-     File /oname=$R0 "${LOCALFILE}"
-     Return
+  ;------------------------
+  ;End
 
-   "end_${LOCALFILE}:"
+  Goto upgradedll.end_${UPGRADEDLL_UNIQUE}
 
   ;------------------------
-  ;Set overwrite to default
-  ;(was set to TRY above)
+  ;Called to extract the DLL
+
+  upgradedll.file_${UPGRADEDLL_UNIQUE}:
+    File /oname=$R0 "${LOCALFILE}"
+    Return
 
-  SetOverwrite on
+  upgradedll.end_${UPGRADEDLL_UNIQUE}:
 
- !macroend
+ ;------------------------
+ ;Restore settings
+
+ SetOverwrite lastused
+ !undef UPGRADEDLL_UNIQUE
+
+!macroend
 
 
 ;--------------------------------
@@ -457,6 +437,15 @@ VIAddVersionKey "PrivateBuild" "Checked/Debug"
   ;Only useful for BZIP2 compression
   !insertmacro MUI_RESERVEFILE_LANGDLL
   
+;--------------------------------
+; User Variables
+
+var REG_SUB_KEY
+var REG_VALUE
+var REG_DATA_1
+var REG_DATA_2
+var REG_DATA_3
+
 
 ;--------------------------------
 ;Installer Sections
@@ -468,9 +457,10 @@ Section "AFS Client" secClient
   SetShellVarContext all
   ; Stop any running services or we can't replace the files
   ; Stop the running processes
-  ;GetTempFileName $R0
-  ;File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe"   ; Might not have the MSVCR71.DLL file to run
-  ;nsExec::Exec '$R0 afscreds.exe'
+  GetTempFileName $R0
+  File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe"   ; Might not have the MSVCR71.DLL file to run
+  nsExec::Exec '$R0 afscreds.exe'
+  nsExec::Exec "afscreds.exe -z"
 !IFDEF INSTALL_KFW
   ;nsExec::Exec '$R0 krbcc32s.exe'
 !ENDIF
@@ -481,17 +471,18 @@ Section "AFS Client" secClient
    ; Do client components
   SetOutPath "$INSTDIR\Client\Program"
   File "${AFS_CLIENT_BUILDDIR}\afsshare.exe"
-  File "${AFS_CLIENT_BUILDDIR}\libosi.dll"
-  File "${AFS_CLIENT_BUILDDIR}\libafsconf.dll"
+  !define UPGRADEDLL_NOREGISTER
+  !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\libosi.dll" "$INSTDIR\Client\Program\libosi.dll" "$INSTDIR"
+  !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\libafsconf.dll" "$INSTDIR\Client\Program\libafsconf.dll" "$INSTDIR"
   File "${AFS_CLIENT_BUILDDIR}\klog.exe"
   File "${AFS_CLIENT_BUILDDIR}\tokens.exe"
   File "${AFS_CLIENT_BUILDDIR}\unlog.exe"
   File "${AFS_CLIENT_BUILDDIR}\fs.exe"
   File "${AFS_CLIENT_BUILDDIR}\afscreds.exe"
-  File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll"
+  !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll" "$INSTDIR\Client\Program\afs_shl_ext.dll" "$INSTDIR"
   File "${AFS_BUILD_INCDIR}\afs\auth.h"
   File "${AFS_CLIENT_BUILDDIR}\afsd_service.exe"
-  File "${AFS_CLIENT_BUILDDIR}\afslogon.dll"
+  !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afslogon.dll" "$INSTDIR\Client\Program\afslogon.dll" "$INSTDIR"
   File "${AFS_CLIENT_BUILDDIR}\symlink.exe"
   File "${AFS_DESTDIR}\bin\kpasswd.exe"
   File "${AFS_SERVER_BUILDDIR}\pts.exe"
@@ -593,14 +584,18 @@ Section "AFS Client" secClient
    DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Debug"
    DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Debug"
 !endif
-   ; Set network settings
-  WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled" 0
+
+   ; On Windows 2000 work around KB301673.  This is fixed in Windows XP and 2003
+   Call GetWindowsVersion
+   Pop $R1
+   StrCmp $R1 "2000" +1 +2
+   WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled" 0
   
   ;Write start menu entries
   CreateDirectory "$SMPROGRAMS\OpenAFS\Client"
   CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
-  CreateShortCut "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk" "$INSTDIR\Client\Program\afscreds.exe" 
-  CreateShortCut "$SMSTARTUP\AFS Credentials.lnk" "$INSTDIR\Client\Program\afscreds.exe" 
+  CreateShortCut "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk" "$INSTDIR\Client\Program\afscreds.exe" "-A -M -N -Q"
+  CreateShortCut "$SMSTARTUP\AFS Credentials.lnk" "$INSTDIR\Client\Program\afscreds.exe" "-A -M -N -Q"
 
   Push "$INSTDIR\Client\Program"
   Call AddToPath
@@ -628,9 +623,12 @@ skipremove:
   Delete "$INSTDIR\Common\service.exe"
 
   ; Daemon entries
-  WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "(Default)" ""
+  WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "" ""
+  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"
   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
   ReadINIStr $R0 $1 "Field 7" "State"
   ReadINIStr $R1 $1 "Field 9" "State"
   ; Complicated way to do $R1 = ($R1 *2) + $R0
@@ -639,7 +637,6 @@ skipremove:
   WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonOptions" $R1
   WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonScript" "$INSTDIR\Client\Program\afscreds.exe -:%s -x"
   WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Name" "OpenAFSDaemon"
-  WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "ProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
 
   ;Write cell name
   ReadINIStr $R0 $1 "Field 2" "State"
@@ -649,7 +646,30 @@ skipremove:
   WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "SecurityLevel" $R0
   ReadINIStr $R0 $1 "Field 5" "State"  
   WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "FreelanceClient" $R0
-  WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "UseDNS" 0
+  WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "UseDNS" 1
+  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" "IsGateway" 0
+  WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "HideDotFiles" 1
+  WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "TruncateNetbios" "on"
+!IFDEF DEBUG
+  WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "NoFindLanaByName" 1
+!ENDIF
+
+  strcpy $REG_SUB_KEY "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" 
+  strcpy $REG_VALUE   "DependOnGroup" 
+  strcpy $REG_DATA_1  "PNP_TDI"
+  strcpy $REG_DATA_2  ""
+  strcpy $REG_DATA_3  ""
+  Call RegWriteMultiStr
+  strcpy $REG_SUB_KEY "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" 
+  strcpy $REG_VALUE   "DependOnService" 
+  strcpy $REG_DATA_1  "Tcpip"
+  strcpy $REG_DATA_2  "NETBIOS"
+  strcpy $REG_DATA_3  "NetBT"
+  Call RegWriteMultiStr
+
   SetRebootFlag true
   
   WriteUninstaller "$INSTDIR\Uninstall.exe"
@@ -663,9 +683,10 @@ Section "AFS Server" secServer
   SetShellVarContext all
   ; Stop any running services or we can't replace the files
   ; Stop the running processes
-  ;GetTempFileName $R0
-  ;File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe"   ; Might not have the MSVCR71.DLL file to run
-  ;nsExec::Exec '$R0 afscreds.exe'
+  GetTempFileName $R0
+  File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe"   ; Might not have the MSVCR71.DLL file to run
+  nsExec::Exec '$R0 afscreds.exe'
+  nsExec::Exec "afscreds.exe -z"
 !IFDEF INSTALL_KFW
   ;nsExec::Exec '$R0 krbcc32s.exe'
 !ENDIF
@@ -928,9 +949,7 @@ Section "Supplemental Documentation" secDocs
    StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
    StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
    StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
-!ifndef v2.0b3
    StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
-!endif
    StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
    StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
    StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
@@ -1511,30 +1530,20 @@ FunctionEnd
 ;--------------------------------
 ;Descriptions
 
-!ifdef v2.0b3
-!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
-!else
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-!endif
+  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
   !insertmacro MUI_DESCRIPTION_TEXT ${secServer} $(DESC_secServer)
   !insertmacro MUI_DESCRIPTION_TEXT ${secClient} $(DESC_secClient)
   !insertmacro MUI_DESCRIPTION_TEXT ${secControl} $(DESC_secControl)
   !insertmacro MUI_DESCRIPTION_TEXT ${secDocs} $(DESC_secDocs)
   !insertmacro MUI_DESCRIPTION_TEXT ${secSDK} $(DESC_secSDK)
-!ifdef v2.0b3
-  !insertmacro MUI_FUNCTIONS_DESCRIPTION_END
-!else
   !insertmacro MUI_FUNCTION_DESCRIPTION_END
-!endif
  
 ;--------------------------------
 ;Uninstaller Section
 
 Section "Uninstall"
   ; Make sure the user REALLY wants to do this, unless they did a silent uninstall, in which case...let them!
-#ifdef v2.0b4
   IfSilent StartRemove     ; New in v2.0b4
-#endif
   MessageBox MB_YESNO "Are you sure you want to remove OpenAFS from this machine?" IDYES StartRemove
   abort
   
@@ -1545,6 +1554,7 @@ StartRemove:
   GetTempFileName $R0
   File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe"
   nsExec::Exec '$R0 afscreds.exe'
+  nsExec::Exec "afscreds.exe -z"
 !IFDEF INSTALL_KFW
   nsExec::Exec '$R0 krbcc32s.exe'
 !ENDIF
@@ -1689,13 +1699,7 @@ StartRemove:
 !ENDIF
 !ENDIF
   
-!ifdef v2.0b3
-   Call un.IsSilent
-   Pop $R1
-   StrCmp $R1 "/S" SkipAsk
-!else
    IfSilent SkipAsk
-!endif
 ;  IfFileExists "$WINDIR\afsdcell.ini" CellExists SkipDelAsk
 ;  CellExists:
   MessageBox MB_YESNO "Would you like to keep your configuration files?" IDYES SkipDel
@@ -1931,11 +1935,6 @@ StartRemove:
  
   RMDir  "$INSTDIR"
 
-!ifdef v2.0b3
-  ;Display the Finish header
-  !insertmacro MUI_UNFINISHHEADER
-!endif
-
 SectionEnd
 
 ;--------------------------------
@@ -2060,13 +2059,7 @@ FunctionEnd
 
 
 Function AFSPageGetCellName
-!ifdef v2.0b3
-   Call IsSilent
-   Pop $R1
-   StrCmp $R1 "/S" exit
-!else
    IfSilent good
-!endif
   ; Skip this page if we are not installing the client
   SectionGetFlags ${secClient} $R0
   IntOp $R0 $R0 & ${SF_SELECTED}
@@ -2124,75 +2117,6 @@ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "
 
 FunctionEnd
 
-; This code is all needed in v2.0b3 to handle the /S switch...
-!ifdef v2.0b3
-; Check if install should be silent
-Function IsSilent
-  Push $0
-  Push $CMDLINE
-  Push "/S"
-  Call StrStr
-  Pop $0
-  StrCpy $0 $0 3
-  StrCmp $0 "/S" silent
-  StrCmp $0 "/S " silent
-    StrCpy $0 0
-    Goto notsilent
-  silent: StrCpy $0 1
-  notsilent: Exch $0
-FunctionEnd
-
-
-; Check if uninstall should be silent
-Function un.IsSilent
-  Push $0
-  Push $CMDLINE
-  Push "/S"
-  Call un.StrStr
-  Pop $0
-  StrCpy $0 $0 3
-  StrCmp $0 "/S" silent
-  StrCmp $0 "/S " silent
-    StrCpy $0 0
-    Goto notsilent
-  silent: StrCpy $0 1
-  notsilent: Exch $0
-FunctionEnd
-
-
-
-; StrStr function
-Function StrStr
-  Exch $R1 ; st=haystack,old$R1, $R1=needle
-  Exch    ; st=old$R1,haystack
-  Exch $R2 ; st=old$R1,old$R2, $R2=haystack
-  Push $R3
-  Push $R4
-  Push $R5
-  StrLen $R3 $R1
-  StrCpy $R4 0
-  ; $R1=needle
-  ; $R2=haystack
-  ; $R3=len(needle)
-  ; $R4=cnt
-  ; $R5=tmp
-  loop:
-    StrCpy $R5 $R2 $R3 $R4
-    StrCmp $R5 $R1 done
-    StrCmp $R5 "" done
-    IntOp $R4 $R4 + 1
-    Goto loop
-  done:
-  StrCpy $R1 $R2 "" $R4
-  Pop $R5
-  Pop $R4
-  Pop $R3
-  Pop $R2
-  Exch $R1
-FunctionEnd
-!endif
-; End of specific v2.0b3 code...
-
 
 ;-------------------
 ; Get the currently installed version and place it on the stack
@@ -2521,11 +2445,10 @@ Function AFSLangFiles
    ; Common files
    SetOutPath "$INSTDIR\Common"
    File "${AFS_CLIENT_BUILDDIR}\afs_config.exe"
-   File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll"
    File "${AFS_SERVER_BUILDDIR}\afsadminutil.dll"
-   File "${AFS_DESTDIR}\lib\afsauthent.dll"
-   File "${AFS_DESTDIR}\lib\afspthread.dll"
-   File "${AFS_DESTDIR}\lib\afsrpc.dll"
+  !insertmacro UpgradeDLL "${AFS_DESTDIR}\lib\afsauthent.dll" "$INSTDIR\Common\afsauthent.dll" "$INSTDIR"
+  !insertmacro UpgradeDLL "${AFS_DESTDIR}\lib\afspthread.dll" "$INSTDIR\Common\afspthread.dll" "$INSTDIR"
+  !insertmacro UpgradeDLL "${AFS_DESTDIR}\lib\afsrpc.dll" "$INSTDIR\Common\afsrpc.dll" "$INSTDIR"
    File "${AFS_SERVER_BUILDDIR}\afsclientadmin.dll"
    File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.dll"
    File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
@@ -2535,6 +2458,7 @@ Function AFSLangFiles
    File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
    File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
    File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
+
 !IFDEF DEBUG
 !IFDEF CL_1310
    File "${SYSTEMDIR}\msvcr71d.dll"
@@ -2616,7 +2540,6 @@ Function AFSLangFiles
 
 !ifdef DEBUG
    File "${AFS_CLIENT_BUILDDIR}\afs_config.pdb"
-   File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.pdb"
    File "${AFS_SERVER_BUILDDIR}\afsadminutil.pdb"
    File "${AFS_DESTDIR}\lib\afsauthent.pdb"
    File "${AFS_DESTDIR}\lib\afspthread.pdb"
@@ -2636,9 +2559,7 @@ Function AFSLangFiles
    StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
    StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
    StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
-!ifdef v2.0b4
    StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
-!endif
    StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
    StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
    StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
@@ -2648,10 +2569,16 @@ DoEnglish:
    SetOutPath "$INSTDIR\Documentation"
    File "..\..\doc\install\Documentation\en_US\README.TXT"
 
+   SetOutPath "$INSTDIR\Client\Program"
+   File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.dll"
+  !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.dll" "$INSTDIR\Client\Program\afs_shl_ext_1033.dll" "$INSTDIR"
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.pdb"
+!endif
+
    SetOutPath "$INSTDIR\Common"
    File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.dll"
    File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.dll"
    File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.dll"
    ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1033.dll"
@@ -2672,6 +2599,17 @@ DoEnglish:
    File "..\..\doc\help\en_US\taafssvrmgr.hlp"
    File "..\..\doc\help\en_US\taafsusrmgr.CNT"
    File "..\..\doc\help\en_US\taafsusrmgr.hlp"
+
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afsserver_1033.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.pdb"
+!ENDIF
    goto done
 
 DoGerman:
@@ -2679,10 +2617,16 @@ DoGerman:
    SetOutPath "$INSTDIR\Documentation"
    File "..\..\doc\install\Documentation\de_DE\README.TXT"
 
+   SetOutPath "$INSTDIR\Client\Program"
+   File "${AFS_CLIENT_BUILDDIR}\afscreds_1032.dll"
+  !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1032.dll" "$INSTDIR\Client\Program\afs_shl_ext_1032.dll" "$INSTDIR"
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1032.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1032.pdb"
+!endif
+
    SetOutPath "$INSTDIR\Common"
    File "${AFS_CLIENT_BUILDDIR}\afs_config_1032.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1032.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afscreds_1032.dll"
    File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.dll"
    File "${AFS_SERVER_BUILDDIR}\afseventmsg_1032.dll"
    ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1032.dll"
@@ -2705,92 +2649,14 @@ DoGerman:
    File "..\..\doc\help\de_DE\taafsusrmgr.hlp"
 
 !ifdef DEBUG
-   ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.pdb"
-   ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.pdb"
-   ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.pdb"
-   ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.pdb"
-   ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.pdb"
-   ;File "${AFS_SERVER_BUILDDIR}\afsserver_1033.pdb"
-   ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.pdb"
-   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.pdb"
-   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.pdb"
-   ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.pdb"
-!IFDEF CL_1310
-   File "${SYSTEMDIR}\msvcr71d.dll"
-   File "${SYSTEMDIR}\msvcr71d.pdb"
-   File "${SYSTEMDIR}\msvcp71d.dll"
-   File "${SYSTEMDIR}\msvcp71d.pdb"
-   File "${SYSTEMDIR}\mfc71d.dll"
-   File "${SYSTEMDIR}\mfc71d.pdb"
-   File "${SYSTEMDIR}\MFC71CHS.DLL"
-   File "${SYSTEMDIR}\MFC71CHT.DLL"
-   File "${SYSTEMDIR}\MFC71DEU.DLL"
-   File "${SYSTEMDIR}\MFC71ENU.DLL"
-   File "${SYSTEMDIR}\MFC71ESP.DLL"
-   File "${SYSTEMDIR}\MFC71FRA.DLL"
-   File "${SYSTEMDIR}\MFC71ITA.DLL"
-   File "${SYSTEMDIR}\MFC71JPN.DLL"
-   File "${SYSTEMDIR}\MFC71KOR.DLL"
-!ELSE
-!IFDEF CL_1300
-   File "${SYSTEMDIR}\msvcr70d.dll"
-   File "${SYSTEMDIR}\msvcr70d.pdb"
-   File "${SYSTEMDIR}\msvcp70d.dll"
-   File "${SYSTEMDIR}\msvcp70d.pdb"
-   File "${SYSTEMDIR}\mfc70d.dll"
-   File "${SYSTEMDIR}\mfc70d.pdb"
-   File "${SYSTEMDIR}\MFC70CHS.DLL"
-   File "${SYSTEMDIR}\MFC70CHT.DLL"
-   File "${SYSTEMDIR}\MFC70DEU.DLL"
-   File "${SYSTEMDIR}\MFC70ENU.DLL"
-   File "${SYSTEMDIR}\MFC70ESP.DLL"
-   File "${SYSTEMDIR}\MFC70FRA.DLL"
-   File "${SYSTEMDIR}\MFC70ITA.DLL"
-   File "${SYSTEMDIR}\MFC70JPN.DLL"
-   File "${SYSTEMDIR}\MFC70KOR.DLL"
-!ELSE
-   File "${SYSTEMDIR}\mfc42d.dll"
-   File "${SYSTEMDIR}\mfc42d.pdb"
-   File "${SYSTEMDIR}\msvcp60d.dll"
-   File "${SYSTEMDIR}\msvcp60d.pdb"
-   File "${SYSTEMDIR}\msvcrtd.dll"
-   File "${SYSTEMDIR}\msvcrtd.pdb"
-!ENDIF
-!ENDIF
-!ELSE
-!IFDEF CL_1310
-   File "${SYSTEMDIR}\mfc71.dll"
-   File "${SYSTEMDIR}\msvcr71.dll"
-   File "${SYSTEMDIR}\msvcp71.dll"
-   File "${SYSTEMDIR}\MFC71CHS.DLL"
-   File "${SYSTEMDIR}\MFC71CHT.DLL"
-   File "${SYSTEMDIR}\MFC71DEU.DLL"
-   File "${SYSTEMDIR}\MFC71ENU.DLL"
-   File "${SYSTEMDIR}\MFC71ESP.DLL"
-   File "${SYSTEMDIR}\MFC71FRA.DLL"
-   File "${SYSTEMDIR}\MFC71ITA.DLL"
-   File "${SYSTEMDIR}\MFC71JPN.DLL"
-   File "${SYSTEMDIR}\MFC71KOR.DLL"
-!ELSE
-!IFDEF CL_1300
-   File "${SYSTEMDIR}\mfc70.dll"
-   File "${SYSTEMDIR}\msvcr70.dll"
-   File "${SYSTEMDIR}\msvcp70.dll"
-   File "${SYSTEMDIR}\MFC70CHS.DLL"
-   File "${SYSTEMDIR}\MFC70CHT.DLL"
-   File "${SYSTEMDIR}\MFC70DEU.DLL"
-   File "${SYSTEMDIR}\MFC70ENU.DLL"
-   File "${SYSTEMDIR}\MFC70ESP.DLL"
-   File "${SYSTEMDIR}\MFC70FRA.DLL"
-   File "${SYSTEMDIR}\MFC70ITA.DLL"
-   File "${SYSTEMDIR}\MFC70JPN.DLL"
-   File "${SYSTEMDIR}\MFC70KOR.DLL"
-!ELSE
-   File "${SYSTEMDIR}\mfc42.dll"
-   File "${SYSTEMDIR}\msvcp60.dll"
-   File "${SYSTEMDIR}\msvcrt.dll"
-!ENDIF
-!ENDIF
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1032.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1032.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afsserver_1032.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1032.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1032.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1032.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1032.pdb"
 !ENDIF
    goto done   
 
@@ -2799,10 +2665,16 @@ DoSpanish:
    SetOutPath "$INSTDIR\Documentation"
    File "..\..\doc\install\Documentation\es_ES\README.TXT"
 
+   SetOutPath "$INSTDIR\Client\Program"
+   File "${AFS_CLIENT_BUILDDIR}\afscreds_1034.dll"
+  !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.dll" "$INSTDIR\Client\Program\afs_shl_ext_1034.dll" "$INSTDIR"
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1034.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.pdb"
+!endif
+
    SetOutPath "$INSTDIR\Common"
    File "${AFS_CLIENT_BUILDDIR}\afs_config_1034.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afscreds_1034.dll"
    File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.dll"
    File "${AFS_SERVER_BUILDDIR}\afseventmsg_1034.dll"
    ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1034.dll"
@@ -2823,6 +2695,17 @@ DoSpanish:
    File "..\..\doc\help\es_ES\taafssvrmgr.hlp"
    File "..\..\doc\help\es_ES\taafsusrmgr.CNT"
    File "..\..\doc\help\es_ES\taafsusrmgr.hlp"
+
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1034.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1034.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afsserver_1034.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1034.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1034.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1034.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1034.pdb"
+!ENDIF
    goto done
 
 DoJapanese:
@@ -2830,10 +2713,16 @@ DoJapanese:
    SetOutPath "$INSTDIR\Documentation"
    File "..\..\doc\install\Documentation\ja_JP\README.TXT"
 
+   SetOutPath "$INSTDIR\Client\Program"
+   File "${AFS_CLIENT_BUILDDIR}\afscreds_1041.dll"
+  !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.dll" "$INSTDIR\Client\Program\afs_shl_ext_1041.dll" "$INSTDIR"
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1041.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.pdb"
+!endif
+
    SetOutPath "$INSTDIR\Common"
    File "${AFS_CLIENT_BUILDDIR}\afs_config_1041.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afscreds_1041.dll"
    File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.dll"
    File "${AFS_SERVER_BUILDDIR}\afseventmsg_1041.dll"
    ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1041.dll"
@@ -2854,6 +2743,17 @@ DoJapanese:
    File "..\..\doc\help\ja_JP\taafssvrmgr.hlp"
    File "..\..\doc\help\ja_JP\taafsusrmgr.CNT"
    File "..\..\doc\help\ja_JP\taafsusrmgr.hlp"
+
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1041.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1041.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afsserver_1041.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1041.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1041.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1041.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1041.pdb"
+!ENDIF
    goto done
    
 DoKorean:
@@ -2861,10 +2761,16 @@ DoKorean:
    SetOutPath "$INSTDIR\Documentation"
    File "..\..\doc\install\Documentation\ko_KR\README.TXT"
 
+   SetOutPath "$INSTDIR\Client\Program"
+   File "${AFS_CLIENT_BUILDDIR}\afscreds_1042.dll"
+  !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.dll" "$INSTDIR\Client\Program\afs_shl_ext_1042.dll" "$INSTDIR"
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1042.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.pdb"
+!endif
+
    SetOutPath "$INSTDIR\Common"
    File "${AFS_CLIENT_BUILDDIR}\afs_config_1042.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afscreds_1042.dll"
    File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.dll"
    File "${AFS_SERVER_BUILDDIR}\afseventmsg_1042.dll"
    ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1042.dll"
@@ -2885,6 +2791,17 @@ DoKorean:
    File "..\..\doc\help\ko_KR\taafssvrmgr.hlp"
    File "..\..\doc\help\ko_KR\taafsusrmgr.CNT"
    File "..\..\doc\help\ko_KR\taafsusrmgr.hlp"
+
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1042.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1042.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afsserver_1042.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1042.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1042.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1042.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1042.pdb"
+!ENDIF
    goto done
 
 
@@ -2893,10 +2810,16 @@ DoPortugueseBR:
    SetOutPath "$INSTDIR\Documentation"
    File "..\..\doc\install\Documentation\pt_BR\README.TXT"
 
+   SetOutPath "$INSTDIR\Client\Program"
+   File "${AFS_CLIENT_BUILDDIR}\afscreds_1046.dll"
+  !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.dll" "$INSTDIR\Client\Program\afs_shl_ext_1046.dll" "$INSTDIR"
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1046.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.pdb"
+!endif
+
    SetOutPath "$INSTDIR\Common"
    File "${AFS_CLIENT_BUILDDIR}\afs_config_1046.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afscreds_1046.dll"
    File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.dll"
    File "${AFS_SERVER_BUILDDIR}\afseventmsg_1046.dll"
    ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1046.dll"
@@ -2917,6 +2840,17 @@ DoPortugueseBR:
    File "..\..\doc\help\pt_BR\taafssvrmgr.hlp"
    File "..\..\doc\help\pt_BR\taafsusrmgr.CNT"
    File "..\..\doc\help\pt_BR\taafsusrmgr.hlp"
+
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1046.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1046.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afsserver_1046.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1046.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1046.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1046.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1046.pdb"
+!ENDIF
    goto done
    
 DoSimpChinese:
@@ -2924,10 +2858,16 @@ DoSimpChinese:
    SetOutPath "$INSTDIR\Documentation"
    File "..\..\doc\install\Documentation\zh_CN\README.TXT"
 
+   SetOutPath "$INSTDIR\Client\Program"
+   File "${AFS_CLIENT_BUILDDIR}\afscreds_2052.dll"
+  !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.dll" "$INSTDIR\Client\Program\afs_shl_ext_2052.dll" "$INSTDIR"
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afscreds_2052.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.pdb"
+!endif
+
    SetOutPath "$INSTDIR\Common"
    File "${AFS_CLIENT_BUILDDIR}\afs_config_2052.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afscreds_2052.dll"
    File "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.dll"
    File "${AFS_SERVER_BUILDDIR}\afseventmsg_2052.dll"
    ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_2052.dll"
@@ -2948,6 +2888,17 @@ DoSimpChinese:
    File "..\..\doc\help\zh_CN\taafssvrmgr.hlp"
    File "..\..\doc\help\zh_CN\taafsusrmgr.CNT"
    File "..\..\doc\help\zh_CN\taafsusrmgr.hlp"
+
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_config_2052.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_2052.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afsserver_2052.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_2052.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_2052.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_2052.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_2052.pdb"
+!ENDIF
    goto done
    
 DoTradChinese:
@@ -2955,10 +2906,16 @@ DoTradChinese:
    SetOutPath "$INSTDIR\Documentation"
    File "..\..\doc\install\Documentation\zh_TW\README.TXT"
 
+   SetOutPath "$INSTDIR\Client\Program"
+   File "${AFS_CLIENT_BUILDDIR}\afscreds_1028.dll"
+  !insertmacro UpgradeDLL "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.dll" "$INSTDIR\Client\Program\afs_shl_ext_1028.dll" "$INSTDIR"
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1028.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.pdb"
+!endif
+
    SetOutPath "$INSTDIR\Common"
    File "${AFS_CLIENT_BUILDDIR}\afs_config_1028.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.dll"
-   File "${AFS_CLIENT_BUILDDIR}\afscreds_1028.dll"
    File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.dll"
    File "${AFS_SERVER_BUILDDIR}\afseventmsg_1028.dll"
    ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1028.dll"
@@ -2979,6 +2936,17 @@ DoTradChinese:
    File "..\..\doc\help\zh_TW\taafssvrmgr.hlp"
    File "..\..\doc\help\zh_TW\taafsusrmgr.CNT"
    File "..\..\doc\help\zh_TW\taafsusrmgr.hlp"
+
+!ifdef DEBUG
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1028.pdb"
+   ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1028.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afsserver_1028.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1028.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1028.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1028.pdb"
+   ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1028.pdb"
+!ENDIF
    goto done
    
 done:
@@ -3488,3 +3456,97 @@ MakeClientSelected:
 end:
 FunctionEnd
 
+Function RegWriteMultiStr
+!define HKEY_CLASSES_ROOT        0x80000000
+!define HKEY_CURRENT_USER        0x80000001
+!define HKEY_LOCAL_MACHINE       0x80000002
+!define HKEY_USERS               0x80000003
+!define HKEY_PERFORMANCE_DATA    0x80000004
+!define HKEY_PERFORMANCE_TEXT    0x80000050
+!define HKEY_PERFORMANCE_NLSTEXT 0x80000060
+!define HKEY_CURRENT_CONFIG      0x80000005
+!define HKEY_DYN_DATA            0x80000006
+
+!define KEY_QUERY_VALUE          0x0001
+!define KEY_SET_VALUE            0x0002
+!define KEY_CREATE_SUB_KEY       0x0004
+!define KEY_ENUMERATE_SUB_KEYS   0x0008
+!define KEY_NOTIFY               0x0010
+!define KEY_CREATE_LINK          0x0020
+
+!define REG_NONE                 0
+!define REG_SZ                   1
+!define REG_EXPAND_SZ            2
+!define REG_BINARY               3
+!define REG_DWORD                4
+!define REG_DWORD_LITTLE_ENDIAN  4
+!define REG_DWORD_BIG_ENDIAN     5
+!define REG_LINK                 6
+!define REG_MULTI_SZ             7
+
+!define RegCreateKey             "Advapi32::RegCreateKeyA(i, t, *i) i"
+!define RegSetValueEx            "Advapi32::RegSetValueExA(i, t, i, i, i, i) i"
+!define RegCloseKey              "Advapi32::RegCloseKeyA(i) i"
+
+  Exch $R0
+  Push $R1
+  Push $R2
+  Push $R9
+
+  SetPluginUnload alwaysoff
+  ; Create a buffer for the multi_sz value
+  System::Call "*(&t${NSIS_MAX_STRLEN}) i.r1"
+  ; Open/create the registry key
+  System::Call "${RegCreateKey}(${HKEY_LOCAL_MACHINE}, '$REG_SUB_KEY', .r0) .r9"
+  ; Failed?
+  IntCmp $R9 0 write
+    MessageBox MB_OK|MB_ICONSTOP "Can't create registry key! ($9)"
+    Goto noClose
+
+  write:
+    ; Fill in the buffer with our strings
+    StrCpy $R2 $R1                            ; Initial position
+
+    StrLen $R9 '$REG_DATA_1'                 ; Length of first string
+    IntOp $R9 $R9 + 1                         ; Plus null
+    System::Call "*$R2(&t$R9 '$REG_DATA_1')"  ; Place the string
+    IntOp $R2 $R2 + $R9                        ; Advance to the next position
+
+    StrCmp '$REG_DATA_2' "" terminate
+    StrLen $R9 '$REG_DATA_2'                 ; Length of second string
+    IntOp $R9 $R9 + 1                         ; Plus null
+    System::Call "*$R2(&t$R9 '$REG_DATA_2')"  ; Place the string
+    IntOp $R2 $R2 + $R9                        ; Advance to the next position
+
+    StrCmp '$REG_DATA_3' "" terminate
+    StrLen $R9 '$REG_DATA_3'                 ; Length of third string
+    IntOp $R9 $R9 + 1                         ; Plus null
+    System::Call "*$R2(&t$R9 '$REG_DATA_3')"  ; Place the string
+    IntOp $R2 $R2 + $9                        ; Advance to the next position
+
+  terminate:
+    System::Call "*$R2(&t1 '')"              ; Place the terminating null
+    IntOp $R2 $R2 + 1                         ; Advance to the next position
+
+    ; Create/write the value
+    IntOp $R2 $R2 - $R1                        ; Total length
+    System::Call "${RegSetValueEx}(r0, '$REG_VALUE', 0, ${REG_MULTI_SZ}, r1, r2) .r9"
+    ; Failed?
+    IntCmp $R9 0 done
+      MessageBox MB_OK|MB_ICONSTOP "Can't set key value! ($R9)"
+      Goto done
+
+  done:
+    ; Close the registry key
+    System::Call "${RegCloseKey}(r0)"
+
+noClose:
+  ; Clear the buffer
+  SetPluginUnload manual
+  System::Free $R1
+
+  Pop $R9
+  Pop $R2
+  Pop $R1
+  Exch $R0
+FunctionEnd
\ No newline at end of file