Index: openafs/src/NTMake9x
diff -c openafs/src/NTMake9x:1.2 openafs/src/NTMake9x:1.2.4.1
*** openafs/src/NTMake9x:1.2	Sat Jun 23 13:26:05 2001
--- openafs/src/NTMake9x	Thu Aug 23 01:31:46 2001
***************
*** 307,315 ****
  	$(CD) $(OBJ)\WINNT\install\Win9x
  	nmake /nologo /f NTMakefile clean
  	$(CD) ..\..\..\..
! 	.\src\rmbat $(DESTDIR)\include\*.* $(DESTDIR)\include\afs\*.* $(DESTDIR)\include\WINNT\*.* $(DESTDIR)\include\rx\*.*
! 	.\src\rmbat $(DESTDIR)\LIB\*.LIB $(DESTDIR)\LIB\*.DLL $(DESTDIR)\LIB\AFS\*.LIB
! 	.\src\RMBAT $(DESTDIR)\root.client\usr\vice\etc\*.*
  	$(CD) $(OBJ)\config
  	nmake /nologo /f ntmakefile clean_version
  	$(CD) ..\..
--- 307,315 ----
  	$(CD) $(OBJ)\WINNT\install\Win9x
  	nmake /nologo /f NTMakefile clean
  	$(CD) ..\..\..\..
! 	$(DESTDIR)\BIN\rmbat $(DESTDIR)\include\*.* $(DESTDIR)\include\afs\*.* $(DESTDIR)\include\WINNT\*.* $(DESTDIR)\include\rx\*.*
! 	$(DESTDIR)\BIN\rmbat $(DESTDIR)\LIB\*.LIB $(DESTDIR)\LIB\*.DLL $(DESTDIR)\LIB\AFS\*.LIB
! 	$(DESTDIR)\BIN\rmbat $(DESTDIR)\root.client\usr\vice\etc\*.*
  	$(CD) $(OBJ)\config
  	nmake /nologo /f ntmakefile clean_version
  	$(CD) ..\..
Index: openafs/src/README-NT
diff -c openafs/src/README-NT:1.2 openafs/src/README-NT:1.2.4.1
*** openafs/src/README-NT:1.2	Sat Nov  4 05:01:09 2000
--- openafs/src/README-NT	Thu Aug 23 01:31:46 2001
***************
*** 3,9 ****
  
  This software has been released under the terms of the IBM Public
  License.  For details, see the LICENSE file in the top-level source
! directory or online at http://www.openafs.org/dl/license10.html
  
  Building OpenAFS on Windows NT
  ------------------------------
--- 3,9 ----
  
  This software has been released under the terms of the IBM Public
  License.  For details, see the LICENSE file in the top-level source
! directory or on-line at http://www.openafs.org/dl/license10.html
  
  Building OpenAFS on Windows NT
  ------------------------------
***************
*** 53,61 ****
        2. build of the product plus an installer package
  
     In order to do the build that includes the installer package, a
!    copy of InstallShield 5.x must be installed. NOTE: InstallShield
     versions 6 and higher WILL NOT WORK.
  
  D. Optional: Install flex and bison
  
     There are two files in the source tree that are processed with lex
--- 53,69 ----
        2. build of the product plus an installer package
  
     In order to do the build that includes the installer package, a
!    copy of Installshield 5.x must be installed. NOTE: Installshield
     versions 6 and higher WILL NOT WORK.
  
+    Optional DLL's missing for Install Script
+    Two Microsoft DLL's must be included at DEST\WinInstall\Config\.
+    	SHLWAPI.DLL
+ 	WININET.DLL  
+ 
+ 	These files are only used for the Install, they will not be left 
+ 	on the target machine.
+ 
  D. Optional: Install flex and bison
  
     There are two files in the source tree that are processed with lex
***************
*** 94,100 ****
     set MSVCDIR=<path to vc directory of MS Visual C++>
     Ex: set MSVCDIR=c:\progra~1\DevStudio\vc
  
!       This is the path to the compiler directory of the Microsot Visual
        C++ installation.
  
     set AFSDEV_INCLUDE=<default include directories>
--- 102,108 ----
     set MSVCDIR=<path to vc directory of MS Visual C++>
     Ex: set MSVCDIR=c:\progra~1\DevStudio\vc
  
!       This is the path to the compiler directory of the Microsoft Visual
        C++ installation.
  
     set AFSDEV_INCLUDE=<default include directories>
***************
*** 122,133 ****
        This is the root directory of OpenAFS, which is the parent
        directory of the src directory.
  
!    set IS5ROOT=<root directory of the InstallShield5 program files>
     Ex: set IS5ROOT=d:\progra~1\instal~1\instal~1.1pr
  
!       This is the path to the InstallShield5 program directory. You
!       should only define this if you have InstallShield installed on
!       your computer and want to create the install package as part of
        the build.
  
     set BISON_SIMPLE=<path to bison.simple>
--- 130,141 ----
        This is the root directory of OpenAFS, which is the parent
        directory of the src directory.
  
!    set IS5ROOT=<root directory of the Installshield5 program files>
     Ex: set IS5ROOT=d:\progra~1\instal~1\instal~1.1pr
  
!       This is the path to the Installshield5 program directory. You
!       should only define this if you have Installshield installed on
!       your computer and want to create the install script as part of
        the build.
  
     set BISON_SIMPLE=<path to bison.simple>
***************
*** 146,153 ****
  
     As can be seen in the examples above, all paths in ntbuild.bat must
     be in the old MSDOS 8.3 format.
  
! F. Begin the build
  
   1. Make sure you are running the default NT command shell, cmd.exe.
      Other shells may work, but many do not.
--- 154,194 ----
  
     As can be seen in the examples above, all paths in ntbuild.bat must
     be in the old MSDOS 8.3 format.
+ 
+ F. Set version and installation options
+ 
+ 	Modify .\src\config\NTMakefile.i386_nt40
+ 		AFSPRODUCT_VERSION  - Product version
+ 		CELLNAME_DEFAULT - The default AFS cell name
+ 		CELLSERVDB_INSTALL - The default name for the CellServDB included in the install script
+ 		CELLSERVDB_WEB  - The default web address to obtain CellServDB
+ 
+ For Example:
+ 
+  .\src\config\NTMakefile.i386_nt40
+ 
+    AFSPRODUCT_VERSION=1.1.1a
+    CELLNAME_DEFAULT=openafs.org
+    CELLSERVDB_INSTALL=CellServDB.GrandCentral
+    CELLSERVDB_WEB=http://grand.central.org/dl/cellservdb/CellServDB
+ 
+ NOTE: If CELLNAME_DEFAULT has a '.' in cell name, then the name is assumed to be 
+ a valid cell name and when the user installs AFS the AFS Control Center 
+ will default to NOT installed!
+ 
+ Version level may be specified in different formats, for example the following
+ forms all have the same version level; however will be displayed differently:
+ 
+ AFSPRODUCT_VERSION=1.1.1a
+ AFSPRODUCT_VERSION=1.1.1 a
+ AFSPRODUCT_VERSION=1.1.1.1
+ AFSPRODUCT_VERSION=1.1.101
+ 
+ Add CellServDB file to install area.
+ 	 For the previous example you would add file:
+ 	 	 DEST\Winistall\Config\CellServDB.GrandCentral
  
! G. Begin the build
  
   1. Make sure you are running the default NT command shell, cmd.exe.
      Other shells may work, but many do not.
***************
*** 167,173 ****
      You only need to do this once.
  
   4. Begin the build. You can choose to build just the product bits,
!     or, if InstallShield is installed, the product bits and the
      install package.
  
      To build just the product bits, run:
--- 208,214 ----
      You only need to do this once.
  
   4. Begin the build. You can choose to build just the product bits,
!     or, if Installshield is installed, the product bits and the
      install package.
  
      To build just the product bits, run:
Index: openafs/src/README-WIN9X
diff -c openafs/src/README-WIN9X:1.1 openafs/src/README-WIN9X:1.1.4.1
*** openafs/src/README-WIN9X:1.1	Mon Apr 30 02:47:14 2001
--- openafs/src/README-WIN9X	Thu Aug 23 01:31:46 2001
***************
*** 124,130 ****
--- 124,158 ----
        VC6RedistSetup_enu.exe
     This is located at:
        http://support.microsoft.com/support/kb/articles/Q259/4/03.ASP
+ 	Two Microsoft DLL's must be included at DEST\WinInstall\Config\.
+ 	   SHLWAPI.DLL
+ 	   WININET.DLL  
+ 	These DLL's will not be left on the target machine, there are only
+ 	used for installation and removed after installation is complete.
  
+ 6) Required changes to configuration file .\src\config\NTMakefile.i386_win95
+ 
+ AFSPRODUCT_VERSION  - Product version
+ CELLNAME_DEFAULT - The default AFS cell name
+ CELLSERVDB_INSTALL - The default name for the CellServDB included in the install script
+ CELLSERVDB_WEB  - The default web address to obtain CellServDB
+ 		  
+ For Example:
+ 
+  .\src\config\NTMakefile.i386_win95  
+    AFSPRODUCT_VERSION=1.1.1a
+    CELLNAME_DEFAULT=openafs.org
+    CELLSERVDB_INSTALL=CellServDB.GrandCentral
+    CELLSERVDB_WEB=http://grand.central.org/dl/cellservdb/CellServDB
+ 
+ Version level may be specified in different formats, for example the following
+ forms all have the same version level; however will be displayed differently:
+ 
+ AFSPRODUCT_VERSION=1.1.1a
+ AFSPRODUCT_VERSION=1.1.1 a
+ AFSPRODUCT_VERSION=1.1.1.1
+ AFSPRODUCT_VERSION=1.1.101
+ 
  6) Installation
  
     First, execute "nmake /f ntmake9x media" to copy all the client
***************
*** 163,165 ****
--- 191,195 ----
     5. Reboot the target machine.
     6. You can now start the client by executing the program WinAfsLoad.exe
        from the install directory.
+ 
+ 
Index: openafs/src/WINNT/afs_setup_utils/NTMakefile
diff -c openafs/src/WINNT/afs_setup_utils/NTMakefile:1.2 openafs/src/WINNT/afs_setup_utils/NTMakefile:1.2.4.1
*** openafs/src/WINNT/afs_setup_utils/NTMakefile:1.2	Sat Nov  4 05:01:09 2000
--- openafs/src/WINNT/afs_setup_utils/NTMakefile	Thu Aug 23 01:31:50 2001
***************
*** 89,99 ****
--- 89,107 ----
  install : $(INSTALL_UTILS_DLLFILE) $(SERVER_UNINST_DLLFILE) $(CLIENT_UNINST_DLLFILE) \
            $(CC_UNINST_DLLFILE) $(LIGHT_CLIENT_UNINST_DLLFILE) $(DOCS_UNINST_DLLFILE) \
            $(AFSRM_EXEFILE) lang
+ 		  cd _isuser
+ 		  nmake -fntmakefile
+           $(CD) ..
+ 		  cd getwebdll
+ 		  nmake -fntmakefile
+           $(CD) ..
+ 		  echo 
  
  lang ::
  	$(CD) lang
  	for /f %l in ('dir /B ??_??') do @$(NTLANG) %l $(MAKECMD) /nologo /f NTMakefile install
  	$(CD) ..
+    echo done lang
  
  ############################################################################
  # How to build the shared source file for each uninstall dll
***************
*** 156,162 ****
  ############################################################################
  
  clean::
! 
  
  ############################################################################
  #
--- 164,176 ----
  ############################################################################
  
  clean::
!    $(CD) _isuser
!    nmake -fntmakefile clean
!    $(CD) ..
!    $(CD) getwebdll
!    nmake -fntmakefile clean
!    $(CD) ..
!    echo done clean
  
  ############################################################################
  #
Index: openafs/src/WINNT/afs_setup_utils/afs_setup_utils.cpp
diff -c openafs/src/WINNT/afs_setup_utils/afs_setup_utils.cpp:1.2 openafs/src/WINNT/afs_setup_utils/afs_setup_utils.cpp:1.2.4.1
*** openafs/src/WINNT/afs_setup_utils/afs_setup_utils.cpp:1.2	Sat Nov  4 05:01:09 2000
--- openafs/src/WINNT/afs_setup_utils/afs_setup_utils.cpp	Thu Aug 23 01:31:50 2001
***************
*** 8,2096 ****
   */
  
  /*
!  * INCLUDES _________________________________________________________________
!  *
!  */
! 
! extern "C" {
! #include <afs/param.h>
! #include <afs/stds.h>
! #include <afs/fileutil.h>
! }
! 
! #include <windows.h>
! #include <stdio.h>
! #include <time.h>
! #include <assert.h>
! #include <stdlib.h>
! #include <io.h>
! #include <string.h>
! #include <SYS\STAT.H>
! #include <shellapi.h>
! 
! #include <WINNT/afsreg.h>
! #include <WINNT/afssw.h>
! #include <WINNT/talocale.h>
! 
! #include "resource.h"
! #include "progress_dlg.h"
! #include "sutil.h"
! #include "forceremove.h"
! 
! 
! /*
!  * PROTOTYPES _________________________________________________________________
!  *
!  */
! static char *GetAppInstallDir(struct APPINFO *pApp, BOOL bRemembered);
! BOOL UninstallCredsTool();
! BOOL ServerSpecificUninstall();
! BOOL ClientSpecificUninstall();
! 
! 
! 
! /*
!  * DEFINITIONS _________________________________________________________________
!  *
!  */
! #define SUCALLCONV  WINAPI
! 
! #define UNINSTALL_TEMP_INFO_KEY     "HKEY_LOCAL_MACHINE\\Software\\AfsUninstallTempInfo"
! #define INSTALL_DIR_VALUE_NAME      "InstallDir"
! 
! #define AFS_PRESERVED_CFG_INFO_KEY  "HKEY_LOCAL_MACHINE\\Software\\AfsPreservedConfigInfo"
! 
! #define MS_SHARED_FILES_KEY         "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\SharedDLLs"
! 
! // Log file to use when running in silent mode
! #define UNINSTALL_ERROR_LOG_NAME    "\\AfsUninstallErrorLog.txt"
! #define INSTALL_ERROR_LOG_NAME      "\\AfsInstallErrorLog.txt"
! 
! #define TARGETDIR                   "<TARGETDIR>"
! #define WINDIR                      "<WINDIR>"
! #define WINSYSDIR                   "<WINSYSDIR>"
! 
! #define WIN9X_START_MENU_REG_KEY    "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"
! #define WIN9X_START_MENU_REG_VALUE  "Programs"
!     
! #define WINNT_START_MENU_REG_KEY    "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"
! #define WINNT_START_MENU_REG_VALUE  "Common Programs"
! 
! #define LOCALE_ID_LEN               4
! 
! struct REGVALUE {
!     char *pszKey;
!     char *pszValue;
! };
! 
! 
! typedef BOOL (APP_UNINSTALL_FUNC)();
! 
! 
! 
! struct APPINFO {
!     char *pszAppName;
! 
!     // Service Info
!     char *pszSvcName;
!     char *pszSvcKey;
!     char *pszSvcDependOn;
!     char *pszSvcDisplayName;
! 
!     char *pszNetworkProviderOrder;
! 
!     // Message to use to tell the user that we have to stop the service
!     int nServiceShutdownMsgID;
! 
!     // Message to use for the progress dialog that is shown while
!     // waiting for the service to stop.
!     int nServiceShutdownProgressMsgID;
! 
!     // Location in registry of a key we can use to know that the app is installed
!     char *pszAppKey;
! 
!     // Location in registry of this app's install dir
!     struct REGVALUE regInstallDir;
! 
!     // Path Info
!     char *pszLocalRoot;     // The root dir below the install dir
!     char *pszBinPath;       // Path to remove from the system path
! 
!     // Generated files and directories to delete.  These are both multistring lists.
!     char *pszDirsToDel;     // All files in these dirs will be deleted
!     char *pszFilesToDel;    // Use this if you want to delete files but leave the dir.  Wildcards can be used.
! 
!     // Registry values to remove
!     struct REGVALUE *pRegValues;
!     struct REGVALUE *pWinNTRegValues;   // Only remove these if running WinNT
!     struct REGVALUE *pWin9XRegValues;   // Only remove these if running Win9X
! 
!     // Start menu entries to delete
!     char *pszStartMenuEntries;
! 
!     // Registry keys to save if a user wants to preserve config info during uninstall
!     char *pszRegKeysToPreserve;
!     int nPreserveConfigInfoMsgID;
! 
!     // Uninstall func - used for things specific to this app
!     APP_UNINSTALL_FUNC *pUninstallFunc;
! };
! 
! 
! /*
!  * App info structure for the Server product
!  */
! struct APPINFO appServer = {
!     "AFS Server",
!     
!     AFSREG_SVR_SVC_NAME,
!     AFSREG_SVR_SVC_KEY,
!     0,  // No depend on
!     AFSREG_SVR_SVC_DISPLAYNAME_DATA,
! 
!     0,  // No network provider order
! 
!     IDS_MUST_STOP_SERVER,
!     IDS_WAITING_FOR_SERVER_TO_STOP,
! 
!     AFSREG_SVR_SW_VERSION_KEY,
!     
!     { AFSREG_SVR_SW_VERSION_KEY, AFSREG_SVR_SW_VERSION_DIR_VALUE },
! 
!     "\\Server",
!     "\\usr\\afs\\bin",
! 
!     // Dirs to delete
!     TARGETDIR"\\Server\\usr\\afs\\bin\\backup\0"
!     TARGETDIR"\\Server\\usr\\afs\\bin\0"
!     TARGETDIR"\\Server\\usr\\afs\\db\0"
!     TARGETDIR"\\Server\\usr\\afs\\logs\0"
!     TARGETDIR"\\Server\\usr\\afs\\etc\0"
!     TARGETDIR"\\Server\\usr\\afs\\local\0"
!     TARGETDIR"\\Server\\usr\\afs\0"
!     TARGETDIR"\\Server\\usr\0",
!     
!     // Files to delete
!     TARGETDIR"\\Common\\*.gid\0"
!     TARGETDIR"\\Common\\*.fts\0",
! 
!     0,  // No reg values
!     0,  // No NT only reg values
!     0,  // No 9x only reg values
! 
!     "Server\0",
! 
!     // Config info to preserve
!     AFSREG_SVR_SVC_KEY"\0", 
!     IDS_PRESERVE_SERVER_CONFIG_INFO,
! 
!     0   // No special uninstall function
! };
! 
! // Registry values to remove for the Client
! struct REGVALUE clientRegValues[] = {
!     { "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" },
!     { 0, 0 }    // This indicates there are no more entries
! };
! 
! struct REGVALUE clientWinNTRegValues[] = {
!     { "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\File Manager\\AddOns", "AFS Client FME" },
!     { 0, 0 }
! };
! 
! struct REGVALUE clientWin9XRegValues[] = {
!     { "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\NetworkProvider\\Order", "TransarcAFSDaemon" },
!     { 0, 0 }
! };
! 
! /*
!  * App info structure for the Client product
!  */
! struct APPINFO appClient = {
!     "AFS Client",
!     
!     AFSREG_CLT_SVC_NAME,
!     AFSREG_CLT_SVC_KEY,
!     "5250435353004E657462696F730000",
!     AFSREG_CLT_SVC_DISPLAYNAME_DATA,
! 
!     AFSREG_CLT_SVC_NAME,
! 
!     IDS_MUST_STOP_CLIENT,
!     IDS_WAITING_FOR_CLIENT_TO_STOP,
! 
!     AFSREG_CLT_SW_VERSION_KEY,
! 
!     { AFSREG_CLT_SW_VERSION_KEY, AFSREG_CLT_SW_VERSION_DIR_VALUE },
! 
!     "\\Client",
!     "\\Program",
! 
!     // No dirs to delete
!     0,
!     
!     // Files to delete
!     TARGETDIR"\\Common\\*.gid\0"
!     TARGETDIR"\\Common\\*.fts\0"
!     WINDIR"\\..\\AFSCache\0"
!     WINDIR"\\afsd.log\0"
!     WINDIR"\\afsd.ini\0"
!     WINDIR"\\afsdsbmt.ini\0"
!     WINDIR"\\afsd_init.log\0",
!     
!     clientRegValues,
!     clientWinNTRegValues,
!     clientWin9XRegValues,
! 
!     // Start menu entries to remove
!     "Client\0",
! 
!     // Config info to preserve
!     AFSREG_CLT_SVC_KEY"\0",
!     IDS_PRESERVE_CLIENT_CONFIG_INFO,
! 
!     ClientSpecificUninstall
! };
! 
! 
! /*
!  * App info structure for the Light Client product
!  */
! struct APPINFO appLightClient = {
!     "AFS Light",
!     
!     // No service info 
!     0,
!     0,
!     0,
!     0,
! 
!     AFSREG_CLT_SVC_NAME,
! 
!     // No service shutdown messages
!     0,
!     0,
! 
!     "HKEY_LOCAL_MACHINE\\SOFTWARE\\TransarcCorporation\\AFS Light Client",
! 
!     { AFSREG_CLT_SW_VERSION_KEY, AFSREG_CLT_SW_VERSION_DIR_VALUE },
! 
!     "\\Client",
!     "\\Program",
! 
!     // No dirs to delete
!     0,
!     
!     // Files to delete
!     TARGETDIR"\\Common\\*.gid\0"
!     TARGETDIR"\\Common\\*.fts\0",
! 
!     clientRegValues,
!     clientWinNTRegValues,
!     clientWin9XRegValues,
! 
!     // Start menu entries to remove
!     "Light\0",
! 
!     // Config info to preserve
!     AFSREG_CLT_SVC_KEY"\0",
!     IDS_PRESERVE_LIGHT_CLIENT_CONFIG_INFO,
! 
!     UninstallCredsTool
! };
! 
! 
! /*
!  * App info structure for the Control Center product
!  */
! struct APPINFO appControlCenter = {
!     "AFS Control Center",
!     
!     // No service info
!     0,
!     0,
!     0,
!     0,
! 
!     // No network provider order
!     0,
! 
!     // No service shutdown messages    
!     0,
!     0,
! 
!     "HKEY_LOCAL_MACHINE\\SOFTWARE\\TransarcCorporation\\AFS Control Center",
!     
!     { "HKEY_LOCAL_MACHINE\\SOFTWARE\\TransarcCorporation\\AFS Control Center\\CurrentVersion", "PathName" },
! 
!     "\\Control Center",
!     "",
! 
!     // No dirs to delete
!     0,
!     
!     // Files to delete
!     TARGETDIR"\\Common\\*.gid\0"
!     TARGETDIR"\\Common\\*.fts\0",
!     
!     0,  // No reg values
!     0,  // No NT only reg values
!     0,  // No 9x only reg values
! 
!     // Start menu entries to remove
!     "Control Center\0",
! 
!     // Config info to preserve
!     AFSREG_CLT_SVC_KEY"\0",
!     IDS_PRESERVE_CC_CONFIG_INFO,
! 
!     0   // No uninstall function
! };
! 
! 
! /*
!  * App info structure for the Sys Admin Doc files
!  */
! struct APPINFO appDocs = {
!     "AFS Supplemental Documentation",
! 
!     // No service info
!     0,
!     0,
!     0,
!     0,
! 
!     // No network provider order
!     0,
! 
!     // No service shutdown messages    
!     0,
!     0,
! 
!     "HKEY_LOCAL_MACHINE\\SOFTWARE\\TransarcCorporation\\AFS Supplemental Documentation",
!     
!     { "HKEY_LOCAL_MACHINE\\SOFTWARE\\TransarcCorporation\\AFS Supplemental Documentation\\CurrentVersion", "PathName" },
! 
!     "\\Documentation",
!     "",
! 
!     // No dirs to delete
!     0,
!     
!     // Files to delete
!     TARGETDIR"\\Common\\*.gid\0"
!     TARGETDIR"\\Common\\*.fts\0",
! 
!     0,  // No reg values
!     0,  // No NT only reg values
!     0,  // No 9x only reg values
! 
!     // Start menu entries to remove
!     "Documentation\\AFS for Windows Backup Command Reference.lnk\0Documentation\\AFS Command Reference Manual.lnk\0Documentation\\AFS System Administrator's Guide.lnk\0",
! 
!     0,  // No config info to preserve
! 
!     0   // No uninstall function
! };
! 
! 
! // Shared and in-use files
! struct FILEINFO {
!     char *pszName;
!     int nUsedBy;
! };
! 
! #define SERVER  1
! #define CLIENT  2
! #define LCLIENT 4
! #define CC      8
! #define DOCS    16
! 
! 
! struct FILEINFO fileInfo[] = {
!     { TARGETDIR"\\Common\\afsbosadmin.dll",             SERVER | CC },
!     { TARGETDIR"\\Common\\afscfgadmin.dll",             SERVER | CC },
!     { TARGETDIR"\\Common\\afsclientadmin.dll",          SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afskasadmin.dll",             SERVER | CC },
!     { TARGETDIR"\\Common\\afsptsadmin.dll",             SERVER | CC },
!     { TARGETDIR"\\Common\\afsvosadmin.dll",             SERVER | CC },
!     { TARGETDIR"\\Common\\afsadminutil.dll",            SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afsrpc.dll",                  SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afsauthent.dll",              SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\pthread.dll",                 SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\TaAfsAppLib.dll",             SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afsprocmgmt.dll",             SERVER | CLIENT | LCLIENT },
!     { TARGETDIR"\\Common\\afs_config.exe",              CLIENT | LCLIENT| CC },
!     { TARGETDIR"\\Common\\afseventmsg_????.dll",        SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afslegal_????.dll",           SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afsserver_????.dll",          SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afssvrcfg_????.dll",          SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\TaAfsAccountManager_????.dll",SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\TaAfsAppLib_????.dll",        SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\TaAfsServerManager_????.dll", SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afscreds_????.dll",           SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs_config_????.dll",         SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs_cpa_????.dll",            SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs_shl_ext_????.dll",        SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs-nt.hlp",                  SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs-nt.cnt",                  SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\taafssvrmgr.cnt",             SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\taafssvrmgr.hlp",             SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\taafsusrmgr.cnt",             SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\taafsusrmgr.hlp",             SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs-cc.cnt",                  SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs-cc.hlp",                  SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs-light.cnt",               SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs-light.hlp",               SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\taafscfg.cnt",                SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\taafscfg.hlp",                SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Client\\PROGRAM\\afs_shl_ext.dll",    CLIENT | LCLIENT },
!     { TARGETDIR"\\Client\\PROGRAM\\libafsconf.dll",     CLIENT | LCLIENT },
!     { TARGETDIR"\\Client\\PROGRAM\\afslogon.dll",       CLIENT },
!     { TARGETDIR"\\Client\\PROGRAM\\afslog95.dll",       LCLIENT },
!     { TARGETDIR"\\Control Center\\TaAfsAdmSvr.exe",     CC },
!     { WINSYSDIR"\\afs_cpa.cpl",                         CLIENT | LCLIENT | CC },
!     { WINSYSDIR"\\afsserver.cpl",                       SERVER },
!     { TARGETDIR"\\Common\\afsdcell.ini",                CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Documentation\\Html\\banner.gif",     SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\books.gif",      SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\bot.gif",        SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\index.gif",      SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\index.htm",      SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\next.gif",       SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\prev.gif",       SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\toc.gif",        SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\top.gif",        SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\ReleaseNotes\\relnotes.htm",
!                                                         SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Documentation\\Html\\InstallGd\\afsnt35i.htm",
!                                                         SERVER | CLIENT | LCLIENT | CC },
!     { 0,                                                0 }     // End of list
! };
! 
! 
! /*
!  * VARIABLES _________________________________________________________________
!  *
!  */
! HINSTANCE hinst;
! 
! static HWND hDlg;
! static BOOL bPreserveConfigInfo;
! static BOOL bSilentMode;
! static char *pszInstallDir;
! 
! 
! /*
!  * FUNCTIONS _________________________________________________________________
!  *
!  */
! 
! static BOOL UpgradeClientIntParm(HKEY hKey, char *pszOldParm, char *pszNewParm)
! {
!     int nData;
!     LONG result = ERROR_SUCCESS;
! 
!     nData = GetPrivateProfileInt("AFS Client", pszOldParm, -1, "afsd.ini");
!     if (nData > -1)
!         result = RegSetValueEx(hKey, pszNewParm, 0, REG_DWORD, (BYTE *)&nData, sizeof(nData));
! 
!     return (result == ERROR_SUCCESS);
! }
! 
! static BOOL UpgradeClientStringParm(HKEY hKey, char *pszOldParm, char *pszNewParm)
! {
!     char szData[1024];
!     LONG result = ERROR_SUCCESS;
! 
!     GetPrivateProfileString("AFS Client", pszOldParm, "", szData, sizeof(szData), "afsd.ini");
!     if (szData[0])
!         result = RegSetValueEx(hKey, pszNewParm, 0, REG_SZ, (PBYTE)szData, strlen(szData) + 1);
! 
!     return (result == ERROR_SUCCESS);
! }
! 
! int SUCALLCONV Upgrade34ClientConfigInfo()
! {
!     HKEY hKey;
!     LONG result;
!     int nData;
!     
!     result = RegOpenKeyAlt(AFSREG_NULL_KEY, AFSREG_CLT_SVC_PARAM_KEY, KEY_WRITE, TRUE, &hKey, 0);
!     if (result != ERROR_SUCCESS)
!         return -1;
! 
!     UpgradeClientIntParm(hKey, "CacheSize", "CacheSize");
!     UpgradeClientIntParm(hKey, "Stats", "Stats");
!     UpgradeClientIntParm(hKey, "LogoffTokenTransfer", "LogoffTokenTransfer");
!     UpgradeClientIntParm(hKey, "LogoffTokenTransferTimeout", "LogoffTokenTransferTimeout");
!     UpgradeClientIntParm(hKey, "TrapOnPanic", "TrapOnPanic");
!     UpgradeClientIntParm(hKey, "TraceBufferSize", "TraceBufferSize");
!     UpgradeClientIntParm(hKey, "TraceOnShutdown", "TraceOnShutdown");
!     UpgradeClientIntParm(hKey, "ReportSessionStartups", "ReportSessionStartups");
!     
!     UpgradeClientStringParm(hKey, "MountRoot", "MountRoot");
!     UpgradeClientStringParm(hKey, "Cell", "Cell");
! 
!     /* BlockSize to ChunkSize requires convertion */
!     nData = GetPrivateProfileInt("AFS Client", "BlockSize", -1, "afsd.ini");
!     if (nData > -1) {
! 	DWORD chunkSize;
! 	for (chunkSize = 0; (1 << chunkSize) < nData; chunkSize++);
!         (void) RegSetValueEx(hKey, "ChunkSize", 0, REG_DWORD, (BYTE *)&chunkSize, sizeof(chunkSize));
!     }
! 
!     RegCloseKey(hKey);
! 
!     return 0;
! }
! 
! int SUCALLCONV Eradicate34Client()
! {
!     if (Client34Eradicate(TRUE) != ERROR_SUCCESS)
!         return -1;
! 
!     return 0;
! }
! 
! // This function was written a long time ago by Mike Comer for use by the 
! // original DFS Client for NT install program.
! int SUCALLCONV CheckIfAdmin(void)
! {
!     HANDLE                  token = INVALID_HANDLE_VALUE;
!     PVOID                   buffer = 0;
!     DWORD                   bufLength;
!     DWORD                   realBufLength;
!     TOKEN_PRIMARY_GROUP     *pgroup;
!     TOKEN_GROUPS            *groups;
!     int                     result = -1;
!     DWORD                   groupCount;
!     LONG                    status;
!     PSID                    AdministratorSID = NULL;
!     SID_IDENTIFIER_AUTHORITY    authority = SECURITY_NT_AUTHORITY;
! 
!     // allocate the SID for the Administrators group
!     if (!AllocateAndInitializeSid(&authority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &AdministratorSID)) {
!         status = GetLastError();
!         goto getout;
!     }
! 
!     // open the process token
!     if (!OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &token)) {
!         status = GetLastError();
!         token = INVALID_HANDLE_VALUE;
!         goto getout;
!     }
! 
!     // check primary group first
!     buffer = GlobalAlloc(GMEM_FIXED, sizeof(TOKEN_PRIMARY_GROUP));
!     if (!buffer) {
!         goto getout;
!     }
! 
!     bufLength = sizeof(TOKEN_PRIMARY_GROUP);
!     while(1) {
!         if (!GetTokenInformation(token, TokenPrimaryGroup, buffer, bufLength, &realBufLength)) {
!             if (realBufLength > bufLength) {
!                 // not enough space
!                 GlobalFree(buffer);
!                 bufLength = realBufLength;
!                 buffer = GlobalAlloc(GMEM_FIXED, realBufLength);
!                 if (!buffer) {
!                     goto getout;
!                 }
!                 continue;
!             }
! 
!             goto getout;
!         }
!         break;
!     }
! 
!     pgroup = (TOKEN_PRIMARY_GROUP *)buffer;
!     if (EqualSid(pgroup->PrimaryGroup, AdministratorSID)) {
!         result = 0;
!     } else {
!         // okay, try the secondary groups
!         while(1) {
!             if (!GetTokenInformation(token, TokenGroups, buffer, bufLength, &realBufLength)) {
!                 if (realBufLength > bufLength) {
!                     // not enough space
!                     GlobalFree(buffer);
!                     bufLength = realBufLength;
!                     buffer = GlobalAlloc(GMEM_FIXED, realBufLength);
!                     if (!buffer) {
!                         goto getout;
!                     }
!                     continue;
!                 }
! 
!                 // a real error
!                 goto getout;
!             }
!             break;
!         }
! 
!         // we have the list of groups here.  Process them:
!         groups = (TOKEN_GROUPS *)buffer;
!         for(groupCount = 0; groupCount < groups->GroupCount; groupCount++) {
!             if (EqualSid(groups->Groups[groupCount].Sid, AdministratorSID)) {
!                 result = 0;
!                 break;
!             }
!         }
!     }
! 
! getout:
! 
!     if (token != INVALID_HANDLE_VALUE) {
!         CloseHandle(token);
!     }
! 
!     if (buffer) {
!         GlobalFree(buffer);
!     }
! 
!     if (AdministratorSID) {
!         FreeSid(AdministratorSID);
!     }
! 
!     return result;
! }
! 
! static void SetSharedFileRefCount(char *pszFile, int nRefCount)
! {
!     LONG result;
!     HKEY hKey;
!     
!     result = RegOpenKeyAlt(AFSREG_NULL_KEY, MS_SHARED_FILES_KEY, KEY_WRITE, FALSE, &hKey, 0);
!     if (result != ERROR_SUCCESS)
!         return;
!     
!     if (nRefCount <= 0)
!         RegDeleteValue(hKey, pszFile);
!     else
!         RegSetValueEx(hKey, pszFile, 0, REG_DWORD, (BYTE *)&nRefCount, sizeof(int));    
!     
!     RegCloseKey(hKey);
! }
! 
! static char *GetTimeStamp()
! {
!     char szTime[64], szDate[64];
!     static char szTimeDate[128];
! 
!     _strtime(szTime);
!     _strdate(szDate);
! 
!     sprintf(szTimeDate, "[%s %s] ", szTime, szDate);
!     
!     return szTimeDate;
! }
! 
! int SUCALLCONV WriteToInstallErrorLog(char *pszMsg)
! {
!     static BOOL bWritten = FALSE;
!     FILE *fp;
! 
!     // On the first write, recreate the file    
!     fp = fopen(INSTALL_ERROR_LOG_NAME, bWritten ? "a" : "w");
!     if (!fp)
!         return -1;
!         
!     fprintf(fp, "%s%s\r\n", GetTimeStamp(), pszMsg);
!     
!     fclose(fp);
!     
!     bWritten = TRUE;
!     
!     return 0;
! }
! 
! static void WriteToUninstallErrorLog(char *pszMsg)
! {
!     static BOOL bWritten = FALSE;
!     FILE *fp;
! 
!     // On the first write, recreate the file    
!     fp = fopen(UNINSTALL_ERROR_LOG_NAME, bWritten ? "a" : "w");
!     if (!fp)
!         return;
!         
!     fprintf(fp, "%s%s\r\n", GetTimeStamp(), pszMsg);
!     
!     fclose(fp);
!     
!     bWritten = TRUE;
! }
! 
! static char *LoadResString(UINT uID)
! {
!     static char str[256];
!     GetString (str, uID);
!     return str;
! }
! 
! static void ShowError(UINT nResID, LONG nError)
! {
!     char szErr[256];
!     char szPrompt[256];
!     char szMsg[256];
!     char szTitle[256];
!     char *psz;
! 
!     psz = LoadResString(nResID);
!     if (psz)
!         strcpy(szErr, psz);
!     else
!         sprintf(szErr, "unknown error msg (Msg ID = %d)", nResID);
!     
!     psz = LoadResString(IDS_INSTALLATION_FAILURE);
!     strcpy(szPrompt, psz ? psz : "An error has occurred:  %s (Last Error = %ld).");
! 
!     sprintf(szMsg, szPrompt, szErr, nError);
! 
!     psz = LoadResString(IDS_TITLE);
!     strcpy(szTitle, psz ? psz : "AFS");
! 
!     if (bSilentMode)
!         WriteToUninstallErrorLog(szMsg);
!     else
!         MessageBox(hDlg, szMsg, szTitle, MB_OK);
! }
! 
! static int ShowMsg(UINT nResID, int nType)
! {
!     char szTitle[256];
!     char *psz;
! 
!     psz = LoadResString(IDS_TITLE);
!     strcpy(szTitle, psz ? psz : "AFS");
! 
!     return MessageBox(hDlg, LoadResString(nResID), szTitle, nType);
! }
! 
! static char *GetAppInstallDir(struct APPINFO *pApp, BOOL bRemembered)
! {
!     HKEY hKey;
!     LONG nResult;
!     DWORD dwType;
!     static char szInstallDir[256];
!     DWORD dwSize;
!     char *pszKey;
!     char *pszValue;
! 
!     pszKey = bRemembered ? UNINSTALL_TEMP_INFO_KEY : pApp->regInstallDir.pszKey;
!     pszValue = bRemembered ? INSTALL_DIR_VALUE_NAME : pApp->regInstallDir.pszValue;
! 
!     dwSize = sizeof(szInstallDir);
! 
!     nResult = RegOpenKeyAlt(AFSREG_NULL_KEY, pszKey, KEY_READ, FALSE, &hKey, 0);
!     if (nResult == ERROR_SUCCESS) {
!         nResult = RegQueryValueEx(hKey, pszValue, 0, &dwType, (PBYTE)szInstallDir, &dwSize);
!         RegCloseKey(hKey);
!     }
! 
!     if (nResult != ERROR_SUCCESS) {
!         ShowError(IDS_CANT_DETERMINE_APP_PATH, nResult);
!         return 0;
!     }
! 
!     FilepathNormalizeEx(szInstallDir, FPN_BACK_SLASHES);
! 
!     return szInstallDir;
! }
! 
! static BOOL DoesRegKeyExist(char *pszKey)
! {
!     HKEY hKey;
!     LONG nResult;
! 
!     nResult = RegOpenKeyAlt(AFSREG_NULL_KEY, pszKey, KEY_READ, FALSE, &hKey, 0);
!     if (nResult == ERROR_SUCCESS) {
!         RegCloseKey(hKey);
!         return TRUE;
!     }
! 
!     return FALSE;
! }
! 
! static BOOL IsAppInstalled(struct APPINFO *pApp)
! {
!     return DoesRegKeyExist(pApp->pszAppKey);
! }
! 
! static void BuildShortPath(char *pszShortPath, UINT nShortPathLen, char *pszInstallDir, char *pszPath)
! {
!     strncpy(pszShortPath, pszInstallDir, nShortPathLen);
!     strncat(pszShortPath, pszPath, nShortPathLen);
!     
!     GetShortPathName(pszShortPath, pszShortPath, nShortPathLen);
! }
! 
! static BOOL IsWin95()
! {
!     OSVERSIONINFO versionInformation;
! 
!     versionInformation.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
!     
!     GetVersionEx(&versionInformation);
!     
!     if ((versionInformation.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) &&
!         (versionInformation.dwMinorVersion == 0))
!         return TRUE;
!         
!     return FALSE;
! }
! 
! int IsWin98()
! {
!     OSVERSIONINFO versionInformation;
! 
!     versionInformation.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
!     
!     GetVersionEx(&versionInformation);
!     
!     if ((versionInformation.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) &&
!         (versionInformation.dwMinorVersion == 10))
!         return 0;
!         
!     return -1;
! }
! 
! static BOOL IsServiceInstalled(char *pszServiceKey)
! {
!     HKEY hKey;
! 
!     if (RegOpenKeyAlt(0, pszServiceKey, KEY_READ, FALSE, &hKey, 0) == ERROR_SUCCESS) {
!         RegCloseKey(hKey);
!         return TRUE;
!     }
! 
!     return FALSE;
! }
! 
! // If this fails in anyway we just return.  No error is displayed.
! static void MakeSureServiceDoesNotExist(char *pszName)
! {
!     SC_HANDLE hServer = 0, hSCM = 0;
!     SERVICE_STATUS status;
! 
!     hSCM = OpenSCManager(0, 0, SC_MANAGER_CREATE_SERVICE);
!     if (hSCM) {
!         hServer = OpenService(hSCM, pszName, SERVICE_ALL_ACCESS | DELETE);
!         if (hServer) {
!             if (QueryServiceStatus(hServer, &status)) {
!                 if (status.dwCurrentState != SERVICE_STOPPED) {
!                     if (!ControlService(hServer, SERVICE_CONTROL_STOP, &status)) {
!                         CloseServiceHandle(hServer);
!                         CloseServiceHandle(hSCM);
!                         return;
!                     }
!                 }
!             }
!             
!             // Try to delete even if status query fails
!             DeleteService(hServer);
!         }
!     }
! 
!     if (hServer)
!         CloseServiceHandle(hServer);
!     if (hSCM)
!         CloseServiceHandle(hSCM);
! }
! 
! static int InstallService(char *pszName, char *pszDependOn, char *pszDisplayName, char *pszServicePath, BOOL bInteractive)
! {
!     SC_HANDLE hServer = 0, hSCM;
!     BOOL bRestoreOldConfig = FALSE;
! 
!     hSCM = OpenSCManager(0, 0, SC_MANAGER_CREATE_SERVICE);
!     if (!hSCM) {
!         ShowError(IDS_SCM_OPEN_FAILED, GetLastError());
!         return -1;
!     }
! 
! /*  This code is not used, but it could be handy in the future so I am keeping it here.
! 
!     // If the service exists, then we (most probably) are in the middle of an upgrade or reinstall.
!     bRestoreOldConfig = IsServiceInstalled(pszName);
! 
!     if (bRestoreOldConfig) {
!         hServer = OpenService(hSCM, pszName, SERVICE_ALL_ACCESS);
!         if (!hServer || !ChangeServiceConfig(hServer, SERVICE_NO_CHANGE, SERVICE_AUTO_START, SERVICE_NO_CHANGE, 0, 0, 0, 0, 0, 0, 0)) {
!             ShowError(IDS_RESTORE_OF_PREVIOUS_CONFIG_FAILED, GetLastError());
!             bRestoreOldConfig = FALSE;
!             // Fall through to service creation below
!         }
!     } 
! */
!     
!     if (!bRestoreOldConfig) {
!         DWORD dwServiceType;
! 
!         // If the service already exists, the create call will fail.  This can
!         // happen if uninstall failed (which is not infrequent).  Making sure the
!         // service does not exist makes it easier for a user to install over top of
!         // a previously failed uninstall.
!         MakeSureServiceDoesNotExist(pszName);
! 
!         dwServiceType = SERVICE_WIN32_OWN_PROCESS;
!         if (bInteractive)
!             dwServiceType |= SERVICE_INTERACTIVE_PROCESS;
!     
!         hServer = CreateService(hSCM, pszName, pszDisplayName,
!             SERVICE_ALL_ACCESS, dwServiceType, SERVICE_AUTO_START, 
!             SERVICE_ERROR_NORMAL, pszServicePath, 0, 0, "RPCSS\0Netbios\0\0", 0, 0);
!     
!         if (!hServer)
!             ShowError(IDS_SERVICE_CREATE_FAILED, GetLastError());
!     }
! 
!     if (hServer)
!         CloseServiceHandle(hServer);
! 
!     CloseServiceHandle(hSCM);
! 
!     return 0;
! }
! 
! int SUCALLCONV InstallServerService(char *pszServicePath)
! {
!     return InstallService(appServer.pszSvcName, 0, appServer.pszSvcDisplayName, pszServicePath, TRUE);
! }
! 
! int SUCALLCONV InstallClientService(char *pszServicePath)
! {
!     return InstallService(appClient.pszSvcName, appClient.pszSvcDependOn, appClient.pszSvcDisplayName, pszServicePath, FALSE);
! }
! 
! static int UninstallService(struct APPINFO *pAppInfo)
! {
!     SC_HANDLE hServer, hSCM;
!     SERVICE_STATUS status;
!     BOOL bOk;
!     BOOL bServer = FALSE;
!     BOOL bShowingProgressDlg = FALSE;
! 
!     hSCM = OpenSCManager(0, 0, SC_MANAGER_CREATE_SERVICE);
!     if (!hSCM) {
!         ShowError(IDS_SCM_OPEN_FAILED, GetLastError());
!         return -1;
!     }
!     
!     hServer = OpenService(hSCM, pAppInfo->pszSvcName, SERVICE_ALL_ACCESS | DELETE);
!     if (!hServer) {
!         ShowError(IDS_SERVICE_OPEN_FAILED, GetLastError());
!         CloseServiceHandle(hSCM);
!         return -1;
!     }
! 
!     if (!QueryServiceStatus(hServer, &status)) {
!         ShowError(IDS_SERVICE_QUERY_FAILED, GetLastError());
!         CloseServiceHandle(hServer);
!         CloseServiceHandle(hSCM);
!         return -1;
!     }
! 
!     if (status.dwCurrentState != SERVICE_STOPPED) {
!         if (pAppInfo->nServiceShutdownMsgID) {
!             if (!bSilentMode && (ShowMsg(pAppInfo->nServiceShutdownMsgID, MB_YESNO | MB_ICONQUESTION) == IDNO)) {
!                 CloseServiceHandle(hServer);
!                 CloseServiceHandle(hSCM);
!                 return 1;
!             }
!         }
! 
!         if (!bSilentMode)
!             bShowingProgressDlg = ShowProgressDialog(LoadResString(pAppInfo->nServiceShutdownProgressMsgID));
! 
!         if (!ControlService(hServer, SERVICE_CONTROL_STOP, &status)) {
!             if (bShowingProgressDlg)
!                 HideProgressDialog();
!             ShowError(IDS_SERVICE_STOP_FAILED, GetLastError());
!             CloseServiceHandle(hServer);
!             CloseServiceHandle(hSCM);
!             return -1;
!         }
!     }
! 
!     // Wait for the service to stop
!     while (status.dwCurrentState != SERVICE_STOPPED) {
!         // I stopped waiting on dwWaitHint because it seemed the wait hint was too long.
!         // The service would be stopped but we'd still be asleep for a long time yet.
!         Sleep(5000);    //status.dwWaitHint);
! 
!         if (!QueryServiceStatus(hServer, &status)) {
!             if (bShowingProgressDlg)
!                 HideProgressDialog();
!             ShowError(IDS_SERVICE_QUERY_FAILED, GetLastError());
!             CloseServiceHandle(hServer);
!             CloseServiceHandle(hSCM);
!             return -1;
!         }
!     }
! 
!     // The service has been stopped
!     if (bShowingProgressDlg)
!         HideProgressDialog();
! 
!     // This code to disable the service may be of use some day so I am keeping it here.
!     // bOk = ChangeServiceConfig(hServer, SERVICE_NO_CHANGE, SERVICE_DISABLED, SERVICE_NO_CHANGE, 0, 0, 0, 0, 0, 0, 0); 
! 
!     bOk = DeleteService(hServer);
! 
!     if (!bOk)
!         ShowError(IDS_SERVICE_DELETE_FAILED, GetLastError());
! 
!     CloseServiceHandle(hServer);
!     CloseServiceHandle(hSCM);
! 
!     return (bOk ? 0 : -1);
! }
! 
! int SUCALLCONV AddToNetworkProviderOrder(char *pszWhatToAdd)
! {
!     return AddToProviderOrder(pszWhatToAdd) ? 0 : -1;
! }
! 
! static int RemoveFromNetworkProviderOrder(char *pszWhatToDel)
! {
!     return RemoveFromProviderOrder(pszWhatToDel) ? 0 : -1;
! }
! 
! int SUCALLCONV AddToPath(char *pszPath)
! {
!     return AddToSystemPath(pszPath) ? 0 : -1;
! }
! 
! static int RemoveFromPath(char *pszPath)
! {
!     return RemoveFromSystemPath(pszPath) ? 0 : -1;
! }
! 
! static void RemoveFiles(char *pszFileSpec)
! {
!     struct _finddata_t fileinfo;
!     long hSearch;
!     char szDel[MAX_PATH];
!     char szDir[MAX_PATH];
!     char *p;
! 
!     strcpy(szDir, pszFileSpec);
!     p = strrchr(szDir, '\\');
!     if (p)
!         *p = 0;
!     
!     hSearch = _findfirst(pszFileSpec, &fileinfo);
!     if (hSearch == -1)
!         return;
! 
!     while (1) {
!         if ((strcmp(fileinfo.name, ".") != 0) && (strcmp(fileinfo.name, "..") != 0)) {
!             sprintf(szDel, "%s\\%s", szDir, fileinfo.name);
!             DeleteFile(szDel);
!         }
! 
!         if (_findnext(hSearch, &fileinfo) == -1)
!             break;
!     }
! 
!     _findclose(hSearch);
! }
! 
! static void RemoveDir(char *pszDir)
! {
!     char szFileSpec[MAX_PATH];
! 
!     sprintf(szFileSpec, "%s\\*.*", pszDir);
! 
!     RemoveFiles(szFileSpec);
!     RemoveDirectory(pszDir);
! }
! 
! static void RemoveRegValues(struct REGVALUE *pRegValues)
! {
!     struct REGVALUE *pCurValue;
!     HKEY hKey;
!     LONG nResult;
! 
!     if (!pRegValues)
!         return;
! 
!     for (pCurValue = pRegValues; pCurValue->pszKey; pCurValue++) {
!         nResult = RegOpenKeyAlt(AFSREG_NULL_KEY, pCurValue->pszKey, KEY_ALL_ACCESS, FALSE, &hKey, 0);
! 
!         if (nResult == ERROR_SUCCESS) {
!             nResult = RegDeleteValue(hKey, pCurValue->pszValue);
!             RegCloseKey(hKey);
!         }
! 
!         if (nResult != ERROR_SUCCESS)
!             ShowError(IDS_REG_DELETE_VALUE_ERROR, nResult);
!     }
! }
! 
! static BOOL UninstallCredsTool()
! {
!     int nResult = WinExec("afscreds /uninstall", SW_HIDE);
! 
!     if (nResult <= 31) {
!         if (nResult != ERROR_FILE_NOT_FOUND)
!             ShowError(IDS_CANT_UNINSTALL_AFSCREDS, nResult);
!     }
! 
!     // Always return true.  We don't want the uninstall to completely fail just
!     // because the creds tool didn't uninstall.
!     return TRUE;
! }
! 
! 
! static char *GetTempDir()
! {
!     DWORD result;
!     static char szTempDir[MAX_PATH];
! 
!     result = GetTempPath(sizeof(szTempDir) - 1, szTempDir);
!     if (result == 0)
!         return "\\";
!         
!     return szTempDir;
! }
! 
! static char *GetRootInstallDir()
! {
!     char *psz;
!     static char szRootInstallDir[MAX_PATH] = "";
! 
!     if (szRootInstallDir[0] == 0) {
!         strcpy(szRootInstallDir, pszInstallDir);
!     
!         // Strip off the app specific part of the install dir
!         psz = strrchr(szRootInstallDir, '\\');
!         if (psz)
!             *psz = 0;
!     }
! 
!     return szRootInstallDir;
! }
! 
! static BOOL ClientSpecificUninstall()
! {
!     int nChoice;
! 
!     // This function needs to do two things.  First it needs to see if the server is
!     // installed, and if it is, ask the user if they really want to uninstall the
!     // client given that the server needs the client.  Second, if we are uninstalling
!     // the client, we need to uninstall the creds tool.
! 
!     if (!bSilentMode) {
!         if (IsAppInstalled(&appServer)) {
!             nChoice = ShowMsg(IDS_CLIENT_NEEDED_BY_SERVER, MB_ICONQUESTION | MB_YESNO);
!             if (nChoice == IDNO)
!                 return FALSE;       // Cancel the uninstall
!         }
!     }
!     
!     UninstallCredsTool();
! 
!     return TRUE;
! }
! 
! static struct APPINFO *GetApp()
! {
! #ifdef SERVER_UNINST
!     return &appServer;
! #elif CLIENT_UNINST
!     return &appClient;
! #elif CC_UNINST
!     return &appControlCenter;
! #elif LIGHT_CLIENT_UNINST
!     return &appLightClient;
! #elif DOCS_UNINST
!     return &appDocs;
! #else
!     return 0;
! #endif;
! }
! 
! static void RememberInstallDir(char *pszInstallDir)
! {
!     HKEY hKey;
! 
!     // We remember the install dir so that when the UninstUninitialize function is called
!     // by the InstallShield uninstaller, we can find out where we were installed to.  We
!     // have to do this because by the time that function is called, the registry values
!     // created at install time are already gone.  We need to be able to find out where we
!     // were installed so we can clean up anything IS couldn't uninstall.  If this fails in 
!     // any way then we don't care.  The only consequence is that some junk might be left on
!     // the users' system after an uninstall.
!     
!     LONG result = RegOpenKeyAlt(AFSREG_NULL_KEY, UNINSTALL_TEMP_INFO_KEY, KEY_WRITE, TRUE, &hKey, 0);
!     if (result != ERROR_SUCCESS)
!         return;
! 
!     RegSetValueEx(hKey, INSTALL_DIR_VALUE_NAME, 0, REG_SZ, (PBYTE)pszInstallDir, strlen(pszInstallDir) + 1);    
! 
!     RegCloseKey(hKey);
! }
! 
! int SUCALLCONV SetSilentMode()
! {
!     bSilentMode = TRUE;
! 
!     return 0;
! }
! 
! static char *GetWinDir()
! {
!     static char szWinDir[MAX_PATH] = "";
! 
!     if (!szWinDir[0]) 
!         GetWindowsDirectory(szWinDir, sizeof(szWinDir));
!     
!     return szWinDir;
! }
! 
! static char *GetWinSysDir()
! {
!     static char szWinSysDir[MAX_PATH] = "";
! 
!     if (!szWinSysDir[0])
!         GetSystemDirectory(szWinSysDir, sizeof(szWinSysDir));
!     
!     return szWinSysDir;
! } 
! 
! static char *GetLocaleID()
! {
!     static char szID[25] = "";
! 
!     if (szID[0] == 0) {
!         LCID dwID = GetSystemDefaultLCID();
!         
!          // Nuke the high word.  It contains a sort ID.
!         dwID &= 0x0000FFFF;
!         
!         // Convert locale ID to a string
!         itoa(dwID, szID, 10);
! 
!         // This thing should never be more than LOCALE_ID_LEN characters long.
!         szID[LOCALE_ID_LEN] = 0;
!     }
! 
!     return szID;
! }
! 
! static char *ExpandPath(char *pszFile)
! {
!     static char szPath[MAX_PATH];
!     char *psz;
! 
!     szPath[0] = 0;
! 
!     // Convert a path containing TARGETDIR, WINDIR, or WINSYSDIR to a 
!     // real path in the file system.  One of these MUST be the start of
!     // the file path passed in.  Also convert the string ???? to an
!     // actual locale number.
!     if (strncmp(pszFile, TARGETDIR, strlen(TARGETDIR)) == 0)
!         strcpy(szPath, GetRootInstallDir());
!     else if (strncmp(pszFile, WINDIR, strlen(WINDIR)) == 0)
!         strcpy(szPath, GetWinDir());
!     else if (strncmp(pszFile, WINSYSDIR, strlen(WINSYSDIR)) == 0)
!         strcpy(szPath, GetWinSysDir());
!     
!     if (szPath[0]) {    
!         psz = strchr(pszFile, '\\');
!         if (psz)
!             strcat(szPath, psz);
!     } else
!         strcpy(szPath, pszFile);
! 
!     // Is this a language dll?
!     psz = strstr(szPath, "????.");
!     
!     // If it is, replace ???? with the locale number
!     if (psz)
!         strncpy(psz, GetLocaleID(), LOCALE_ID_LEN);
! 
!     return szPath;
! }
! 
! static BOOL FileNeededByOtherApp(struct APPINFO *pApp, struct FILEINFO *pFileInfo)
! {
!     // If the file is used by the server, the app being uninstalled is not the server, and
!     // the server is installed, then this file is used by another app.
!     if (!IsWinNT()) {
!         if ((pFileInfo->nUsedBy & LCLIENT) && (pApp != &appLightClient) && IsAppInstalled(&appLightClient))
!             return TRUE;
!         return FALSE;
!     }
! 
!     if ((pFileInfo->nUsedBy & SERVER) && (pApp != &appServer) && IsAppInstalled(&appServer))
!         return TRUE;
! 
!     if ((pFileInfo->nUsedBy & CLIENT) && (pApp != &appClient) && IsAppInstalled(&appClient))
!         return TRUE;
! 
!     if ((pFileInfo->nUsedBy & CC) && (pApp != &appControlCenter) && IsAppInstalled(&appControlCenter))
!         return TRUE;
!     
!     return FALSE;
! }
! 
! static void DeleteInUseFiles(struct APPINFO *pAppInfo, struct FILEINFO *pFileInfo)
! {
!     char szSrcPath[MAX_PATH];
!     char szDestPath[MAX_PATH];
!     char szTempDir[MAX_PATH];
!     int ii;
! 
!     // If some app's file has been loaded before the app is uninstalled, then
!     // when an uninstall is attempted, the application and all of the dlls that
!     // its uses will be in use and IS will not be able to delete them.  Normally this
!     // is not a problem because IS will tell the user to reboot to finish the uninstall.
!     // However, we must support the ability to perform a silent uninstall followed
!     // immediatly by an install of the same product to the same directories.  If we let
!     // IS handle the uninstall of these files, this is not possible.  The reason is that
!     // when IS fails to remove these in use files, it marks them for deletion after the
!     // next reboot, which is fine.  Unfortunately, it leaves them in the dirs they were
!     // installed to.  So if we don't immediately reboot and perform an install to the
!     // same dirs, once a reboot is performed, those files get deleted and we have a 
!     // broken installation.
! 
!     // What we will do to fix all of this, is when the client is uninstalled, but
!     // before IS does anything, we will move the in use files and associated dlls
!     // into the temp dir and mark them for delete after a reboot.  Then an install
!     // that follows will succeed.
! 
!     // Delete the files that may be in use.  If they are we actually move
!     // them to the temp dir and mark them for deletion after the next reboot.
!     for (ii = 0; pFileInfo[ii].pszName != 0; ii++) {
!         // Get the source path
!         strcpy(szSrcPath, ExpandPath(pFileInfo[ii].pszName));
! 
!         // Only delete the file if it is not used by some other app
!         if (FileNeededByOtherApp(pAppInfo, &pFileInfo[ii]))
!             continue;
! 
!         // If the file doesn't exist then go on to the next file.
!         if (_access(szSrcPath, 0) != 0)
!             continue;
!             
!         // See if we can do a regular delete of the file
!         if (DeleteFile(szSrcPath)) {
!             SetSharedFileRefCount(szSrcPath, 0);
!             continue;
!         }
! 
!         // Get a temp dir that is on the same drive as the src path.
!         // We can't move an in use file to a different drive.
!         strcpy(szTempDir, GetTempDir());
!         if (szTempDir[0] != szSrcPath[0]) {
!             // Get the drive, colon, and slash of the src path
!             strncpy(szTempDir, szSrcPath, 3);
!             szTempDir[3] = 0;
!         }
!         
!         // Get the dest path - we will rename the file during the move
!         GetTempFileName(szTempDir, "AFS", 0, szDestPath);
! 
!         // Move from source to dest, marking the file for deletion after a reboot
!         if (IsWin95()) {
!             if (MoveFile(szSrcPath, szDestPath)) {            
!                 WritePrivateProfileString("rename", szSrcPath, szDestPath, "wininit.ini");
!                 SetSharedFileRefCount(szSrcPath, 0);
!             }
!         } else {    // WinNT or Win98
!             if (MoveFileEx(szSrcPath, szDestPath, MOVEFILE_REPLACE_EXISTING)) {
!                 SetFileAttributes(szDestPath, FILE_ATTRIBUTE_NORMAL);
!                 MoveFileEx(szDestPath, 0, MOVEFILE_DELAY_UNTIL_REBOOT);
!                 SetSharedFileRefCount(szSrcPath, 0);
!             }
!         }
!     }
! }
! 
! // Delete a directory and all its files and subdirectories - Yee haaa!
! static void RemoveDirectoryTree(char *pszDir)
! {
!     HANDLE hFind;
!     WIN32_FIND_DATA findFileData;
!     char szSpec[MAX_PATH];
!     char szSubFileOrDir[MAX_PATH];
!     BOOL bContinue;
! 
!     sprintf(szSpec, "%s\\*.*", pszDir);
!     
!     // First delete the contents of the dir
!     hFind = FindFirstFile(szSpec, &findFileData);
!     bContinue = (hFind != INVALID_HANDLE_VALUE);
!     
!     while (bContinue) {
!         if ((strcmp(findFileData.cFileName, ".") != 0) && (strcmp(findFileData.cFileName, "..") != 0)) {
!             sprintf(szSubFileOrDir, "%s\\%s", pszDir, findFileData.cFileName);
!             
!             if (findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
!                 RemoveDirectoryTree(szSubFileOrDir);
!             else
!                 DeleteFile(szSubFileOrDir);
!         }
! 
!         bContinue = FindNextFile(hFind, &findFileData);
!     }
! 
!     FindClose(hFind);
!         
!     // Now remove the dir
!     RemoveDirectory(pszDir);
! } 
! 
! static char *GetStartMenuRoot()
! {
!     HKEY hKey;
!     LONG nResult;
!     DWORD dwType;
!     DWORD dwSize;
!     char *pszKey;
!     char *pszValue;
! 
!     static char szStartMenuRoot[MAX_PATH] = "";
! 
!     if (szStartMenuRoot[0] == 0) {
!         dwSize = sizeof(szStartMenuRoot);
!     
!         if (IsWinNT()) {
!             pszKey = WINNT_START_MENU_REG_KEY;
!             pszValue = WINNT_START_MENU_REG_VALUE;
!         } else {
!             pszKey = WIN9X_START_MENU_REG_KEY;
!             pszValue = WIN9X_START_MENU_REG_VALUE;
!         }
!         
!         nResult = RegOpenKeyAlt(AFSREG_NULL_KEY, pszKey, KEY_READ, FALSE, &hKey, 0);
!         if (nResult == ERROR_SUCCESS) {
!             nResult = RegQueryValueEx(hKey, pszValue, 0, &dwType, (PBYTE)szStartMenuRoot, &dwSize);
!             RegCloseKey(hKey);
!         }
! 
!         if (nResult != ERROR_SUCCESS)
!             return 0;
!     }
! 
!     FilepathNormalizeEx(szStartMenuRoot, FPN_BACK_SLASHES);
! 
!     return szStartMenuRoot;
! }
! 
! static char *GetAfsStartMenuRoot()
! {
!     static char szAfsStartMenuRoot[MAX_PATH] = "";
!     char *pszStartMenuRoot;
!     
!     if (szAfsStartMenuRoot[0] == 0) {    
!         pszStartMenuRoot = GetStartMenuRoot();
!         if (!pszStartMenuRoot)
!             return 0;
! 
!         if (bSilentMode)
!             sprintf(szAfsStartMenuRoot, "%s\\IBM WebSphere\\Performance Pack\\AFS", pszStartMenuRoot );
!         else
!             sprintf(szAfsStartMenuRoot, "%s\\IBM AFS", pszStartMenuRoot );
!     }
! 
!     return szAfsStartMenuRoot;
! }
! 
! static BOOL IsADir(char *pszName)
! {
!     struct _stat statbuf;
! 
!     if (_stat(pszName, &statbuf) < 0)
!         return FALSE;
! 
!     return statbuf.st_mode & _S_IFDIR;
! }
! 
! static void DeleteStartMenuEntries(char *pszEntries)
! {
!     char szStartMenuPath[MAX_PATH];
!     char *pszAfsStartMenuRoot;
!     char *pszCurEntry;
! 
!     pszAfsStartMenuRoot = GetAfsStartMenuRoot();
! 
!     if (!pszAfsStartMenuRoot)
!         return;
!         
!     for (pszCurEntry = pszEntries; *pszCurEntry; pszCurEntry += strlen(pszCurEntry) + 1) {
!         sprintf(szStartMenuPath, "%s\\%s", pszAfsStartMenuRoot, pszCurEntry);
!         if (IsADir(szStartMenuPath))
!             RemoveDirectoryTree(szStartMenuPath);
!         else
!             DeleteFile(szStartMenuPath);
!     }
! }
! 
! static void RefreshStartMenu()
! {
!     char *pszAfsStartMenuRoot;
!     char szTemp[MAX_PATH];
!     
!     pszAfsStartMenuRoot = GetAfsStartMenuRoot();
!     if (!pszAfsStartMenuRoot)
!         return;
! 
!     sprintf(szTemp, "%s - Refresh Attempt", pszAfsStartMenuRoot);
!         
!     // Deleting items from below the root level of the start menu does not 
!     // cause it to refresh.  In order that users can see changes without
!     // rebooting we will temporarily rename our root most entry, which 
!     // does cause a refresh of the start menu.
!     MoveFileEx(pszAfsStartMenuRoot, szTemp, MOVEFILE_REPLACE_EXISTING);
!     MoveFileEx(szTemp, pszAfsStartMenuRoot, MOVEFILE_REPLACE_EXISTING);
! }
! 
! static BOOL PreserveConfigInfo(struct APPINFO *pApp)
! {
!     char *pszRegKey;
!     char szDestKey[256];
!     LONG result;
! 
!     bPreserveConfigInfo = TRUE;
! 
!     // If not in silent mode, ask user if they want to preserve the cfg info
!     if (!bSilentMode) {
!         int nChoice = ShowMsg(pApp->nPreserveConfigInfoMsgID, MB_ICONQUESTION | MB_YESNOCANCEL);
!         if (nChoice == IDCANCEL)
!             return FALSE;                   // Cancel the uninstall
!         else if (nChoice == IDNO) {     
!             bPreserveConfigInfo = FALSE;    // User doesn't want to preserve the config info
!             return TRUE;
!         }
!     }
! 
!     // Copy each reg key (and all of its subkeys and values) to another place in the registry.
!     for (pszRegKey = pApp->pszRegKeysToPreserve; *pszRegKey; pszRegKey += strlen(pszRegKey) + 1) {
!         if (!DoesRegKeyExist(pszRegKey))
!             continue;
! 
!         // Create the destination path for the copy
!         sprintf(szDestKey, "%s\\%s\\%s", AFS_PRESERVED_CFG_INFO_KEY, pApp->pszAppName, pszRegKey);
! 
!         // Try to copy it
!         result = RegDupKeyAlt(pszRegKey, szDestKey);
! 
!         if ((result != ERROR_SUCCESS) && (result != ERROR_FILE_NOT_FOUND)) {
!             // If the copy failed, then delete any copies that succeeded
!             sprintf(szDestKey, "%s\\%s", AFS_PRESERVED_CFG_INFO_KEY, pApp->pszAppName);
!             RegDeleteEntryAlt(szDestKey, REGENTRY_KEY);
!      		goto done;
!         }
!     }
! 
! 	// Remember the integrated login setting if this app supports that and it was turned on
! 	if (pApp->pszNetworkProviderOrder) {
! 		// Was integerated login turned on?
! 		BOOL bOn, bOk;
! 		bOk = InNetworkProviderOrder(pApp->pszNetworkProviderOrder, &bOn);
! 		if (bOk && bOn) {
! 			HKEY hKey;
! 			sprintf(szDestKey, "%s\\%s\\IntegratedLogin", AFS_PRESERVED_CFG_INFO_KEY, pApp->pszAppName);
! 			result = RegOpenKeyAlt(AFSREG_NULL_KEY, szDestKey, KEY_WRITE, TRUE, &hKey, 0);
! 			// The existance of the key is a flag indicating that integrated login was turned on
! 			RegCloseKey(hKey);
! 		}
! 	}
! 	
! done:
! 	if ((result == ERROR_SUCCESS) || bSilentMode)
! 	    return TRUE;    // Continue with uninstall
! 
!     // Report the error and ask the user if they want to continue the uninstall
!     return (ShowMsg(IDS_SAVE_OF_CONFIG_INFO_FAILED, MB_ICONEXCLAMATION | MB_YESNO) == IDYES);			
! }
! 
! int SUCALLCONV RestoreConfigInfo(int nApp)
! {
!     char *pszRegKey;
!     char szSrcKey[256];
!     struct APPINFO *pApp = 0;
!     BOOL bError = FALSE;
!     LONG result;
! 
!     switch (nApp) {
!         case SERVER:    pApp = &appServer;          break;
!         case CLIENT:    pApp = &appClient;          break;
!         case LCLIENT:   pApp = &appLightClient;     break;
!         case CC:        pApp = &appControlCenter;   break;
!     }
!     
!     if (!pApp)
!         return -1;
!         
!     // Copy each reg key (and all of its subkeys and values) back to its original place in the registry.
!     for (pszRegKey = pApp->pszRegKeysToPreserve; *pszRegKey; pszRegKey += strlen(pszRegKey) + 1) {
!         // Create the source path for the copy
!         sprintf(szSrcKey, "%s\\%s\\%s", AFS_PRESERVED_CFG_INFO_KEY, pApp->pszAppName, pszRegKey);
! 
!         if (!DoesRegKeyExist(szSrcKey))
!             continue;
! 
!         // Try to restore as many of the keys as possible.  Report any errors at the end.
! 
!         // Try to copy it
!         result = RegDupKeyAlt(szSrcKey, pszRegKey);
!         if ((result != ERROR_SUCCESS) && (result != ERROR_FILE_NOT_FOUND))
!             bError = TRUE;
!     }
! 
! 	// Restore integrated login if this app was using it
! 	if (pApp->pszNetworkProviderOrder) {
! 		// Check if integrated login was turned on.  The IntegratedLogin key is a flag
! 		// telling us that it was on.  If the key does not exist, integrated login was
! 		// not on.
! 		sprintf(szSrcKey, "%s\\%s\\IntegratedLogin", AFS_PRESERVED_CFG_INFO_KEY, pApp->pszAppName);
! 		if (DoesRegKeyExist(szSrcKey)) {
! 			if (!AddToProviderOrder(pApp->pszNetworkProviderOrder))
! 				bError = TRUE;
! 		}
! 	}
! 
!     // Remove our saved copies of the config info
!     sprintf(szSrcKey, "%s\\%s", AFS_PRESERVED_CFG_INFO_KEY, pApp->pszAppName);
!     RegDeleteEntryAlt(szSrcKey, REGENTRY_KEY);
!             
!     if (bError)
!         ShowError(IDS_RESTORE_OF_PREVIOUS_CONFIG_FAILED, 0);
! 
!     return TRUE;
! }
! 
! static BOOL DoSubKeysExist(char *pszKey)
! {
!     LONG result;
!     HKEY hKey;
!     char *pszSubKeys = 0;
!     BOOL bExist;
!     
!     result = RegOpenKeyAlt(AFSREG_NULL_KEY, pszKey, KEY_READ, FALSE, &hKey, 0);
!     if (result != ERROR_SUCCESS)
!         return FALSE;
!         
!     result = RegEnumKeyAlt(hKey,  &pszSubKeys);
!     RegCloseKey(hKey);
!     
!     if (result != ERROR_SUCCESS)
!         return FALSE;
!    
!     if (pszSubKeys) {
!         bExist = TRUE;
!         free(pszSubKeys);
!     } else
!         bExist = FALSE;    
! 
!     return bExist;
! }
! 
! /*
!  * The following definitions are taken from richedit.h:
!  *
!  */
! 
! #define EM_SETBKGNDCOLOR		(WM_USER + 67) // from Richedit.h
! #define EM_STREAMIN				(WM_USER + 73) // from Richedit.h
! #define SF_RTF			        0x0002
! 
! typedef DWORD (CALLBACK *EDITSTREAMCALLBACK)(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb);
! 
! typedef struct _editstream {
! 	DWORD dwCookie;		/* user value passed to callback as first parameter */
! 	DWORD dwError;		/* last error */
! 	EDITSTREAMCALLBACK pfnCallback;
! } EDITSTREAM;
! 
! /*
!  *
!  */
! 
! DWORD CALLBACK License_StreamText (DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
! {
!    LPTSTR psz = (LPTSTR)dwCookie;
!    LONG cchAvail = lstrlen(psz);
!    if ((*pcb = min(cchAvail, cb)) != 0) {
!       memcpy (pbBuff, psz, *pcb);
!       memmove (psz, &psz[*pcb], cchAvail - *pcb + 1);
!    }
!    return 0;
! }
! 
! 
! void License_OnInitDialog (HWND hDlg, LPTSTR pszFile)
! {
!     // Open the license file and shove its text in our RichEdit control
!     //
!     HANDLE hFile;
!     if ((hFile = CreateFile (pszFile, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) != INVALID_HANDLE_VALUE) {
! 
!         size_t cbText;
!         if ((cbText = GetFileSize (hFile, NULL)) != 0) {
! 
!             LPTSTR abText = (LPTSTR)GlobalAlloc (GMEM_FIXED, cbText + 3);
! 
!             DWORD cbRead;
!             if (ReadFile (hFile, abText, cbText, &cbRead, NULL)) {
!                 abText[ cbRead ] = 0;
! 
!                 EDITSTREAM Stream;
!                 memset (&Stream, 0x00, sizeof(Stream));
!                 Stream.dwCookie = (DWORD)abText;
!                 Stream.pfnCallback = License_StreamText;
! 
!                 SendDlgItemMessage (hDlg, IDC_TEXT, EM_STREAMIN, SF_RTF, (LPARAM)&Stream);
!             }
! 
!             GlobalFree (abText);
!         }
! 
!         CloseHandle (hFile);
!     }
! 
!     // Make the control's background be gray
!     //
!     SendDlgItemMessage (hDlg, IDC_TEXT, EM_SETBKGNDCOLOR, FALSE, (LPARAM)GetSysColor(COLOR_BTNFACE));
! }
! 
! BOOL CALLBACK License_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
! {
!     switch (msg) {
!         case WM_INITDIALOG:
!             SetWindowLong (hDlg, DWL_USER, lp);
!             License_OnInitDialog (hDlg, (LPTSTR)lp);
!             break;
! 
!         case WM_COMMAND:
!             switch (LOWORD(wp)) {
!                 case IDCANCEL:
!                 case IDOK:
!                     EndDialog (hDlg, LOWORD(wp));
!                     break;
! 
!                 case IDC_PRINT:
!                     TCHAR szDir[ MAX_PATH ];
!                     GetCurrentDirectory (MAX_PATH, szDir);
!                     ShellExecute (hDlg, TEXT("print"), (LPTSTR)GetWindowLong (hDlg, DWL_USER), NULL, szDir, SW_HIDE);
!                     break;
!             }
!             break;
!     }
!     return FALSE;
! }
! 
! BOOL FindAfsInstallationPathByComponent (LPTSTR pszInstallationPath, LPTSTR pszComponent)
! {
!     *pszInstallationPath = 0;
! 
!     TCHAR szRegPath[ MAX_PATH ];
!     wsprintf (szRegPath, TEXT("Software\\TransarcCorporation\\%s\\CurrentVersion"), pszComponent);
! 
!     HKEY hk;
!     if (RegOpenKey (HKEY_LOCAL_MACHINE, szRegPath, &hk) == 0) {
!         DWORD dwType = REG_SZ;
!         DWORD dwSize = MAX_PATH;
! 
!         if (RegQueryValueEx (hk, TEXT("PathName"), NULL, &dwType, (PBYTE)pszInstallationPath, &dwSize) == 0) {
!             *(LPTSTR)FindBaseFileName (pszInstallationPath) = TEXT('\0');
! 
!             if (pszInstallationPath[0] && (pszInstallationPath[ lstrlen(pszInstallationPath)-1 ] == TEXT('\\')))
!             pszInstallationPath[ lstrlen(pszInstallationPath)-1 ] = TEXT('\0');
!         }
! 
!         RegCloseKey (hk);
!     }
! 
!     return !!*pszInstallationPath;
! }
! 
! BOOL FindAfsInstallationPath (LPTSTR pszInstallationPath)
! {
!    if (FindAfsInstallationPathByComponent (pszInstallationPath, TEXT("AFS Client")))
!       return TRUE;
!    if (FindAfsInstallationPathByComponent (pszInstallationPath, TEXT("AFS Control Center")))
!       return TRUE;
!    if (FindAfsInstallationPathByComponent (pszInstallationPath, TEXT("AFS Server")))
!       return TRUE;
!    if (FindAfsInstallationPathByComponent (pszInstallationPath, TEXT("AFS Supplemental Documentation")))
!       return TRUE;
!    return FALSE;
! }
! 
! HINSTANCE LoadRichTextControl (void)
! {
!     HINSTANCE hInst;
!     if ((hInst = LoadLibrary ("riched20.dll")) != NULL)
!         return hInst;
!     if ((hInst = LoadLibrary ("riched32.dll")) != NULL)
!         return hInst;
!     if ((hInst = LoadLibrary ("riched.dll")) != NULL)
!         return hInst;
!     if ((hInst = LoadLibrary ("richedit.dll")) != NULL)
!         return hInst;
!     return NULL;
! }
! 
! int SUCALLCONV ShowLicense (char *pszTarget, char *pszSource)
! {
!     // If the license already lives on this user's machine, don't show
!     // it again. This only has to be done if the user has never
!     // accepted the license agreement before (it's part of the setup
!     // program, so it gets installed if they've accepted it).
!     //
!     // We were handed a relative path of the form:
!     //    Documentation/html/license.rtf
!     //
!     // We'll need to find the AFS installation directory, in order to
!     // find that Documentation subtree.
!     //
!     BOOL fShowLicense = TRUE;
! 
!     TCHAR szInstallationPath[ MAX_PATH ];
!     if (FindAfsInstallationPath (szInstallationPath)) {
!         TCHAR szLicensePath[ MAX_PATH ];
!         wsprintf (szLicensePath, TEXT("%s\\%s"), szInstallationPath, pszTarget);
! 
!         if (GetFileAttributes (szLicensePath) != (DWORD)-1) {
!             fShowLicense = FALSE;
!         }
!     }
! 
!     // Before we can show the license file, we have to prepare the RichEdit
!     // control. That means loading the appropriate library and calling its
!     // initialization functions.
!     //
!     HINSTANCE hRichEdit;
!     if ((hRichEdit = LoadRichTextControl()) != NULL) {
! 
!         // If we must show the license, do so now. This is a modal dialog,
!         // so we'll know whether or not the user accepts the license.
!         //
!         if (ModalDialogParam (IDD_LICENSE, GetActiveWindow(), License_DlgProc, (LPARAM)pszSource) == IDCANCEL) {
!             // The user rejected the license; fail setup
!             return FALSE;
!         }
! 
!     	FreeLibrary (hRichEdit);
!     }
! 
!     // The user accepted the license, so we can continue with Setup.
!     // The license file is installed as part of Setup.
!     return TRUE;
! }
! 
! int SUCALLCONV UninstInitialize(HWND hIS, HINSTANCE hIS5, long Reserved)
! {
!     char szPath[MAX_PATH];
!     struct APPINFO *pAppInfo;
!     char *pszFile = 0;
!     char *pszSubDir = 0;
! 
!     hDlg = hIS;
! 
!     bSilentMode = !IsWindowVisible(hIS);
! 
!     // Which app are we uninstalling?
!     pAppInfo = GetApp();
!     if (!pAppInfo) {
!         ShowError(IDS_CANT_DETERMINE_PRODUCT, 0);
!         return -1;
!     }
! 
!     // Get the app's install dir
!     pszInstallDir = GetAppInstallDir(pAppInfo, FALSE);
!     if (!pszInstallDir)
!         return -1;
! 
!     // If this app has a custom uninstall func, call it here
!     if (pAppInfo->pUninstallFunc)
!         if (!pAppInfo->pUninstallFunc())
!             return -1;
! 
!     if (pAppInfo->pszRegKeysToPreserve)
!         if (!PreserveConfigInfo(pAppInfo))
!             return -1;
! 
!     // Unconfigure the service, if there is one for this app
!     if (pAppInfo->pszSvcKey) {
!         if (IsServiceInstalled(pAppInfo->pszSvcKey))
!             if (UninstallService(pAppInfo) == 1)
!                 return -1;
!     }
! 
!     RememberInstallDir(pszInstallDir);
! 
!     DeleteInUseFiles(pAppInfo, fileInfo);
! 
!     // Remove the app's bin path from the system path
!     if (pAppInfo->pszBinPath) {
!         BuildShortPath(szPath, sizeof(szPath), pszInstallDir, pAppInfo->pszBinPath);
!         RemoveFromPath(szPath);
!     }
! 
!     // Remove entry from NetworkProvider\Order key in registry
!     if (pAppInfo->pszNetworkProviderOrder)
!         RemoveFromNetworkProviderOrder(pAppInfo->pszNetworkProviderOrder);
! 
!     // Remove any generated subdirectories
!     if (!bPreserveConfigInfo && pAppInfo->pszDirsToDel) {
!         for (pszSubDir = pAppInfo->pszDirsToDel; *pszSubDir; pszSubDir += strlen(pszSubDir) + 1)
!             RemoveDir(ExpandPath(pszSubDir));
!     }
! 
!     // Remove any generated files
!     if (!bPreserveConfigInfo && pAppInfo->pszFilesToDel) {
!         for (pszFile = pAppInfo->pszFilesToDel; *pszFile; pszFile += strlen(pszFile) + 1)
!             RemoveFiles(ExpandPath(pszFile));
!     }
! 
!     // Remove any registry values that IS can't handle
!     RemoveRegValues(pAppInfo->pRegValues);
!     if (IsWinNT())
!         RemoveRegValues(pAppInfo->pWinNTRegValues);
!     else    
!         RemoveRegValues(pAppInfo->pWin9XRegValues);
! 
!     // Remove the start menu entries for this app
!     if (pAppInfo->pszStartMenuEntries) {
!         DeleteStartMenuEntries(pAppInfo->pszStartMenuEntries);
!         RefreshStartMenu();
!     }
! 
!     // Remove the install dir
!     RemoveDirectory(pszInstallDir);
! 
!     return 0;
! }
! 
! void SUCALLCONV UninstUnInitialize(HWND hIS, HINSTANCE hIS5, long Reserved)
! {
!     char *pszInstallDir;
!     char szDirPath[MAX_PATH];
!     char *psz;
!     struct APPINFO *pAppInfo;
! 
!     // If we just uninstalled the last AFS app, then do some cleanup.
!     if (IsAppInstalled(&appServer) || IsAppInstalled(&appClient) ||
!         IsAppInstalled(&appControlCenter) || IsAppInstalled(&appLightClient) ||
!         IsAppInstalled(&appDocs))
!     {
!         return;
!     }
! 
!     bSilentMode = !IsWindowVisible(hIS);
!     
!     // Which app did we just uninstall?
!     pAppInfo = GetApp();
!     if (!pAppInfo) {
!         ShowError(IDS_CANT_DETERMINE_PRODUCT, 0);
!         return;
!     }
! 
!     // Get the app's install dir
!     pszInstallDir = GetAppInstallDir(pAppInfo, TRUE);
!     if (!pszInstallDir)
!         return;
! 
!     // Remove the reg key we used to remember the app install dir
!     RegDeleteEntryAlt(UNINSTALL_TEMP_INFO_KEY, REGENTRY_KEY);
! 
!     // Try to remove the reg key used to store config info, but only
!     // if there are no app config info sub keys present.
!     if (!DoSubKeysExist(AFS_PRESERVED_CFG_INFO_KEY))
!         RegDeleteEntryAlt(AFS_PRESERVED_CFG_INFO_KEY, REGENTRY_KEY);
! 
!     // Remove the install dir
!     RemoveDirectory(pszInstallDir);
! 
!     // Attempt to remove the install root and common directories.  The are 
!     // shared and so no single app knows to delete them.
! 
!     // Strip off the app specific part of the install dir
!     psz = strrchr(pszInstallDir, '\\');
!     if (psz)
!         *psz = 0;
! 
!     sprintf(szDirPath, "%s\\%s", pszInstallDir, "Common");
!     RemoveDirectory(szDirPath);
! 
!     // Remove the Common directory from the system path
!     RemoveFromPath(szDirPath);
! 
!     // Remove all of the documentation dirs
!     sprintf(szDirPath, "%s\\%s", pszInstallDir, "Documentation");
!     RemoveDirectoryTree(szDirPath);
! 
!     // Ok, up to this point we have been removing files we know we
!     // created.  However, after this point we are into the path
!     // that the user chose for our install root.  The default for
!     // this is IBM/Afs, but they could have chosen anything,
!     // including a dir or dirs that have other products in them.
!     // We will check to see if it is IBM\AFS and if it is then we 
!     // will attempt to remove them.
!     
!     // Back up a level and look for AFS
!     psz = strrchr(pszInstallDir, '\\');
!     if (psz) {
!         if (stricmp(psz + 1, "AFS") == 0) {
!             RemoveDirectory(pszInstallDir);
!             *psz = 0;
!         }
!     }
! 
!     // Back up a level and look for IBM
!     psz = strrchr(pszInstallDir, '\\');
!     if (psz) {
!         if (stricmp(psz + 1, "IBM") == 0) {
!             RemoveDirectory(pszInstallDir);
!             *psz = 0;
!         }
!     }
! 
!     // Remove the root afs start menu entry
!     psz = GetStartMenuRoot();
!     if (psz) {
!         if (bSilentMode) {
!             // Remove everything under our branch
!             sprintf(szDirPath, "%s\\IBM WebSphere\\Performance Pack\\AFS", psz);
!             RemoveDirectoryTree(szDirPath);
!             
!             // Remove the IBM stuff only if the dirs are empty
!             sprintf(szDirPath, "%s\\IBM WebSphere\\Performance Pack", psz);
!             if (RemoveDirectory(szDirPath)) {
!                 sprintf(szDirPath, "%s\\IBM WebSphere", psz);
!                 RemoveDirectory(szDirPath);
!             }
!         } else {
!             sprintf(szDirPath, "%s\\IBM AFS", psz);
!             RemoveDirectoryTree(szDirPath);
!         }
!     }
! }
! 
! BOOLEAN _stdcall DllEntryPoint(HANDLE dll, DWORD reason, PVOID reserved)
! {
!     if (reason == DLL_PROCESS_ATTACH) {
!         hinst = (HINSTANCE)dll;
!         TaLocale_LoadCorrespondingModuleByName (hinst, "afs_setup_utils.dll");
!     }
! 
!     return TRUE;
! }
! 
! extern "C" int WINAPI Test (HINSTANCE hInst, HINSTANCE hPrev, LPSTR psz, int nCmdShow)
! {
!    ShowLicense ("TEST", "\\\\fury\\afssetup\\license\\ja_JP.rtf");
!    return 0;
! }
! 
! 
--- 8,2099 ----
   */
  
  /*
!  * INCLUDES _________________________________________________________________
!  *
!  */
! 
! extern "C" {
! #include <afs/param.h>
! #include <afs/stds.h>
! #include <afs/fileutil.h>
! }
! 
! #include <windows.h>
! #include <stdio.h>
! #include <time.h>
! #include <assert.h>
! #include <stdlib.h>
! #include <io.h>
! #include <string.h>
! #include <SYS\STAT.H>
! #include <shellapi.h>
! 
! #include <WINNT/afsreg.h>
! #include <WINNT/afssw.h>
! #include <WINNT/talocale.h>
! 
! #include "resource.h"
! #include "progress_dlg.h"
! #include "sutil.h"
! #include "forceremove.h"
! 
! 
! /*
!  * PROTOTYPES _________________________________________________________________
!  *
!  */
! static char *GetAppInstallDir(struct APPINFO *pApp, BOOL bRemembered);
! BOOL UninstallCredsTool();
! BOOL ServerSpecificUninstall();
! BOOL ClientSpecificUninstall();
! 
! 
! 
! /*
!  * DEFINITIONS _________________________________________________________________
!  *
!  */
! #define SUCALLCONV  WINAPI
! 
! #define UNINSTALL_TEMP_INFO_KEY     "HKEY_LOCAL_MACHINE\\Software\\AfsUninstallTempInfo"
! #define INSTALL_DIR_VALUE_NAME      "InstallDir"
! 
! #define AFS_PRESERVED_CFG_INFO_KEY  "HKEY_LOCAL_MACHINE\\Software\\AfsPreservedConfigInfo"
! 
! #define MS_SHARED_FILES_KEY         "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\SharedDLLs"
! 
! // Log file to use when running in silent mode
! #define UNINSTALL_ERROR_LOG_NAME    "\\AfsUninstallErrorLog.txt"
! #define INSTALL_ERROR_LOG_NAME      "\\AfsInstallErrorLog.txt"
! 
! #define TARGETDIR                   "<TARGETDIR>"
! #define WINDIR                      "<WINDIR>"
! #define WINSYSDIR                   "<WINSYSDIR>"
! 
! #define WIN9X_START_MENU_REG_KEY    "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"
! #define WIN9X_START_MENU_REG_VALUE  "Programs"
!     
! #define WINNT_START_MENU_REG_KEY    "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"
! #define WINNT_START_MENU_REG_VALUE  "Common Programs"
! 
! #define LOCALE_ID_LEN               4
! 
! struct REGVALUE {
!     char *pszKey;
!     char *pszValue;
! };
! 
! 
! typedef BOOL (APP_UNINSTALL_FUNC)();
! 
! 
! 
! struct APPINFO {
!     char *pszAppName;
! 
!     // Service Info
!     char *pszSvcName;
!     char *pszSvcKey;
!     char *pszSvcDependOn;
!     char *pszSvcDisplayName;
! 
!     char *pszNetworkProviderOrder;
! 
!     // Message to use to tell the user that we have to stop the service
!     int nServiceShutdownMsgID;
! 
!     // Message to use for the progress dialog that is shown while
!     // waiting for the service to stop.
!     int nServiceShutdownProgressMsgID;
! 
!     // Location in registry of a key we can use to know that the app is installed
!     char *pszAppKey;
! 
!     // Location in registry of this app's install dir
!     struct REGVALUE regInstallDir;
! 
!     // Path Info
!     char *pszLocalRoot;     // The root dir below the install dir
!     char *pszBinPath;       // Path to remove from the system path
! 
!     // Generated files and directories to delete.  These are both multistring lists.
!     char *pszDirsToDel;     // All files in these dirs will be deleted
!     char *pszFilesToDel;    // Use this if you want to delete files but leave the dir.  Wildcards can be used.
! 
!     // Registry values to remove
!     struct REGVALUE *pRegValues;
!     struct REGVALUE *pWinNTRegValues;   // Only remove these if running WinNT
!     struct REGVALUE *pWin9XRegValues;   // Only remove these if running Win9X
! 
!     // Start menu entries to delete
!     char *pszStartMenuEntries;
! 
!     // Registry keys to save if a user wants to preserve config info during uninstall
!     char *pszRegKeysToPreserve;
!     int nPreserveConfigInfoMsgID;
! 
!     // Uninstall func - used for things specific to this app
!     APP_UNINSTALL_FUNC *pUninstallFunc;
! };
! 
! 
! /*
!  * App info structure for the Server product
!  */
! struct APPINFO appServer = {
!     "AFS Server",
!     
!     AFSREG_SVR_SVC_NAME,
!     AFSREG_SVR_SVC_KEY,
!     0,  // No depend on
!     AFSREG_SVR_SVC_DISPLAYNAME_DATA,
! 
!     0,  // No network provider order
! 
!     IDS_MUST_STOP_SERVER,
!     IDS_WAITING_FOR_SERVER_TO_STOP,
! 
!     AFSREG_SVR_SW_VERSION_KEY,
!     
!     { AFSREG_SVR_SW_VERSION_KEY, AFSREG_SVR_SW_VERSION_DIR_VALUE },
! 
!     "\\Server",
!     "\\usr\\afs\\bin",
! 
!     // Dirs to delete
!     TARGETDIR"\\Server\\usr\\afs\\bin\\backup\0"
!     TARGETDIR"\\Server\\usr\\afs\\bin\0"
!     TARGETDIR"\\Server\\usr\\afs\\db\0"
!     TARGETDIR"\\Server\\usr\\afs\\logs\0"
!     TARGETDIR"\\Server\\usr\\afs\\etc\0"
!     TARGETDIR"\\Server\\usr\\afs\\local\0"
!     TARGETDIR"\\Server\\usr\\afs\0"
!     TARGETDIR"\\Server\\usr\0",
!     
!     // Files to delete
!     TARGETDIR"\\Common\\*.gid\0"
!     TARGETDIR"\\Common\\*.fts\0",
! 
!     0,  // No reg values
!     0,  // No NT only reg values
!     0,  // No 9x only reg values
! 
!     "Server\0",
! 
!     // Config info to preserve
!     AFSREG_SVR_SVC_KEY"\0", 
!     IDS_PRESERVE_SERVER_CONFIG_INFO,
! 
!     0   // No special uninstall function
! };
! 
! // Registry values to remove for the Client
! struct REGVALUE clientRegValues[] = {
!     { "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved", "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" },
!     { 0, 0 }    // This indicates there are no more entries
! };
! 
! struct REGVALUE clientWinNTRegValues[] = {
!     { "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\File Manager\\AddOns", "AFS Client FME" },
!     { "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\NetBT\\Paramet
! ers", "SMBDeviceEnabled" },
!     { 0, 0 }
! };
! 
! struct REGVALUE clientWin9XRegValues[] = {
!     { "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\NetworkProvider\\Order", "TransarcAFSDaemon" },
!     { 0, 0 }
! };
! 
! /*
!  * App info structure for the Client product
!  */
! struct APPINFO appClient = {
!     "AFS Client",
!     
!     AFSREG_CLT_SVC_NAME,
!     AFSREG_CLT_SVC_KEY,
!     "5250435353004E657462696F730000",
!     AFSREG_CLT_SVC_DISPLAYNAME_DATA,
! 
!     AFSREG_CLT_SVC_NAME,
! 
!     IDS_MUST_STOP_CLIENT,
!     IDS_WAITING_FOR_CLIENT_TO_STOP,
! 
!     AFSREG_CLT_SW_VERSION_KEY,
! 
!     { AFSREG_CLT_SW_VERSION_KEY, AFSREG_CLT_SW_VERSION_DIR_VALUE },
! 
!     "\\Client",
!     "\\Program",
! 
!     // No dirs to delete
!     0,
!     
!     // Files to delete
!     TARGETDIR"\\Common\\*.gid\0"
!     TARGETDIR"\\Common\\*.fts\0"
!     WINDIR"\\..\\AFSCache\0"
!     WINDIR"\\afsd.log\0"
!     WINDIR"\\afsd.ini\0"
!     WINDIR"\\afsdsbmt.ini\0"
!     WINDIR"\\afsdcell.ini\0"
!     WINDIR"\\afsd_init.log\0",
!     
!     clientRegValues,
!     clientWinNTRegValues,
!     clientWin9XRegValues,
! 
!     // Start menu entries to remove
!     "Client\0",
! 
!     // Config info to preserve
!     AFSREG_CLT_SVC_KEY"\0",
!     IDS_PRESERVE_CLIENT_CONFIG_INFO,
! 
!     ClientSpecificUninstall
! };
! 
! 
! /*
!  * App info structure for the Light Client product
!  */
! struct APPINFO appLightClient = {
!     "AFS Light",
!     
!     // No service info 
!     0,
!     0,
!     0,
!     0,
! 
!     AFSREG_CLT_SVC_NAME,
! 
!     // No service shutdown messages
!     0,
!     0,
! 
!     "HKEY_LOCAL_MACHINE\\SOFTWARE\\TransarcCorporation\\AFS Light Client",
! 
!     { AFSREG_CLT_SW_VERSION_KEY, AFSREG_CLT_SW_VERSION_DIR_VALUE },
! 
!     "\\Client",
!     "\\Program",
! 
!     // No dirs to delete
!     0,
!     
!     // Files to delete
!     TARGETDIR"\\Common\\*.gid\0"
!     TARGETDIR"\\Common\\*.fts\0",
! 
!     clientRegValues,
!     clientWinNTRegValues,
!     clientWin9XRegValues,
! 
!     // Start menu entries to remove
!     "Light\0",
! 
!     // Config info to preserve
!     AFSREG_CLT_SVC_KEY"\0",
!     IDS_PRESERVE_LIGHT_CLIENT_CONFIG_INFO,
! 
!     UninstallCredsTool
! };
! 
! 
! /*
!  * App info structure for the Control Center product
!  */
! struct APPINFO appControlCenter = {
!     "AFS Control Center",
!     
!     // No service info
!     0,
!     0,
!     0,
!     0,
! 
!     // No network provider order
!     0,
! 
!     // No service shutdown messages    
!     0,
!     0,
! 
!     "HKEY_LOCAL_MACHINE\\SOFTWARE\\TransarcCorporation\\AFS Control Center",
!     
!     { "HKEY_LOCAL_MACHINE\\SOFTWARE\\TransarcCorporation\\AFS Control Center\\CurrentVersion", "PathName" },
! 
!     "\\Control Center",
!     "",
! 
!     // No dirs to delete
!     0,
!     
!     // Files to delete
!     TARGETDIR"\\Common\\*.gid\0"
!     TARGETDIR"\\Common\\*.fts\0",
!     
!     0,  // No reg values
!     0,  // No NT only reg values
!     0,  // No 9x only reg values
! 
!     // Start menu entries to remove
!     "Control Center\0",
! 
!     // Config info to preserve
!     AFSREG_CLT_SVC_KEY"\0",
!     IDS_PRESERVE_CC_CONFIG_INFO,
! 
!     0   // No uninstall function
! };
! 
! 
! /*
!  * App info structure for the Sys Admin Doc files
!  */
! struct APPINFO appDocs = {
!     "AFS Supplemental Documentation",
! 
!     // No service info
!     0,
!     0,
!     0,
!     0,
! 
!     // No network provider order
!     0,
! 
!     // No service shutdown messages    
!     0,
!     0,
! 
!     "HKEY_LOCAL_MACHINE\\SOFTWARE\\TransarcCorporation\\AFS Supplemental Documentation",
!     
!     { "HKEY_LOCAL_MACHINE\\SOFTWARE\\TransarcCorporation\\AFS Supplemental Documentation\\CurrentVersion", "PathName" },
! 
!     "\\Documentation",
!     "",
! 
!     // No dirs to delete
!     0,
!     
!     // Files to delete
!     TARGETDIR"\\Common\\*.gid\0"
!     TARGETDIR"\\Common\\*.fts\0",
! 
!     0,  // No reg values
!     0,  // No NT only reg values
!     0,  // No 9x only reg values
! 
!     // Start menu entries to remove
!     "Documentation\\AFS for Windows Backup Command Reference.lnk\0Documentation\\AFS Command Reference Manual.lnk\0Documentation\\AFS System Administrator's Guide.lnk\0",
! 
!     0,  // No config info to preserve
! 
!     0   // No uninstall function
! };
! 
! 
! // Shared and in-use files
! struct FILEINFO {
!     char *pszName;
!     int nUsedBy;
! };
! 
! #define SERVER  1
! #define CLIENT  2
! #define LCLIENT 4
! #define CC      8
! #define DOCS    16
! 
! 
! struct FILEINFO fileInfo[] = {
!     { TARGETDIR"\\Common\\afsbosadmin.dll",             SERVER | CC },
!     { TARGETDIR"\\Common\\afscfgadmin.dll",             SERVER | CC },
!     { TARGETDIR"\\Common\\afsclientadmin.dll",          SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afskasadmin.dll",             SERVER | CC },
!     { TARGETDIR"\\Common\\afsptsadmin.dll",             SERVER | CC },
!     { TARGETDIR"\\Common\\afsvosadmin.dll",             SERVER | CC },
!     { TARGETDIR"\\Common\\afsadminutil.dll",            SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afsrpc.dll",                  SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afsauthent.dll",              SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\pthread.dll",                 SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\TaAfsAppLib.dll",             SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afsprocmgmt.dll",             SERVER | CLIENT | LCLIENT },
!     { TARGETDIR"\\Common\\afs_config.exe",              CLIENT | LCLIENT| CC },
!     { TARGETDIR"\\Common\\afseventmsg_????.dll",        SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afslegal_????.dll",           SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afsserver_????.dll",          SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afssvrcfg_????.dll",          SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\TaAfsAccountManager_????.dll",SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\TaAfsAppLib_????.dll",        SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\TaAfsServerManager_????.dll", SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afscreds_????.dll",           SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs_config_????.dll",         SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs_cpa_????.dll",            SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs_shl_ext_????.dll",        SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs-nt.hlp",                  SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs-nt.cnt",                  SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\taafssvrmgr.cnt",             SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\taafssvrmgr.hlp",             SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\taafsusrmgr.cnt",             SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\taafsusrmgr.hlp",             SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs-cc.cnt",                  SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs-cc.hlp",                  SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs-light.cnt",               SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\afs-light.hlp",               SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\taafscfg.cnt",                SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Common\\taafscfg.hlp",                SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Client\\PROGRAM\\afs_shl_ext.dll",    CLIENT | LCLIENT },
!     { TARGETDIR"\\Client\\PROGRAM\\libafsconf.dll",     CLIENT | LCLIENT },
!     { TARGETDIR"\\Client\\PROGRAM\\afslogon.dll",       CLIENT },
!     { TARGETDIR"\\Client\\PROGRAM\\afslog95.dll",       LCLIENT },
!     { TARGETDIR"\\Control Center\\TaAfsAdmSvr.exe",     CC },
!     { WINSYSDIR"\\afs_cpa.cpl",                         CLIENT | LCLIENT | CC },
!     { WINSYSDIR"\\afsserver.cpl",                       SERVER },
!     { TARGETDIR"\\Common\\afsdcell.ini",                CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Documentation\\Html\\banner.gif",     SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\books.gif",      SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\bot.gif",        SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\index.gif",      SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\index.htm",      SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\next.gif",       SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\prev.gif",       SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\toc.gif",        SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\top.gif",        SERVER | CLIENT | LCLIENT | CC | DOCS },
!     { TARGETDIR"\\Documentation\\Html\\ReleaseNotes\\relnotes.htm",
!                                                         SERVER | CLIENT | LCLIENT | CC },
!     { TARGETDIR"\\Documentation\\Html\\InstallGd\\afsnt35i.htm",
!                                                         SERVER | CLIENT | LCLIENT | CC },
!     { 0,                                                0 }     // End of list
! };
! 
! 
! /*
!  * VARIABLES _________________________________________________________________
!  *
!  */
! HINSTANCE hinst;
! 
! static HWND hDlg;
! static BOOL bPreserveConfigInfo;
! static BOOL bSilentMode;
! static char *pszInstallDir;
! 
! 
! /*
!  * FUNCTIONS _________________________________________________________________
!  *
!  */
! 
! static BOOL UpgradeClientIntParm(HKEY hKey, char *pszOldParm, char *pszNewParm)
! {
!     int nData;
!     LONG result = ERROR_SUCCESS;
! 
!     nData = GetPrivateProfileInt("AFS Client", pszOldParm, -1, "afsd.ini");
!     if (nData > -1)
!         result = RegSetValueEx(hKey, pszNewParm, 0, REG_DWORD, (BYTE *)&nData, sizeof(nData));
! 
!     return (result == ERROR_SUCCESS);
! }
! 
! static BOOL UpgradeClientStringParm(HKEY hKey, char *pszOldParm, char *pszNewParm)
! {
!     char szData[1024];
!     LONG result = ERROR_SUCCESS;
! 
!     GetPrivateProfileString("AFS Client", pszOldParm, "", szData, sizeof(szData), "afsd.ini");
!     if (szData[0])
!         result = RegSetValueEx(hKey, pszNewParm, 0, REG_SZ, (PBYTE)szData, strlen(szData) + 1);
! 
!     return (result == ERROR_SUCCESS);
! }
! 
! int SUCALLCONV Upgrade34ClientConfigInfo()
! {
!     HKEY hKey;
!     LONG result;
!     int nData;
!     
!     result = RegOpenKeyAlt(AFSREG_NULL_KEY, AFSREG_CLT_SVC_PARAM_KEY, KEY_WRITE, TRUE, &hKey, 0);
!     if (result != ERROR_SUCCESS)
!         return -1;
! 
!     UpgradeClientIntParm(hKey, "CacheSize", "CacheSize");
!     UpgradeClientIntParm(hKey, "Stats", "Stats");
!     UpgradeClientIntParm(hKey, "LogoffTokenTransfer", "LogoffTokenTransfer");
!     UpgradeClientIntParm(hKey, "LogoffTokenTransferTimeout", "LogoffTokenTransferTimeout");
!     UpgradeClientIntParm(hKey, "TrapOnPanic", "TrapOnPanic");
!     UpgradeClientIntParm(hKey, "TraceBufferSize", "TraceBufferSize");
!     UpgradeClientIntParm(hKey, "TraceOnShutdown", "TraceOnShutdown");
!     UpgradeClientIntParm(hKey, "ReportSessionStartups", "ReportSessionStartups");
!     
!     UpgradeClientStringParm(hKey, "MountRoot", "MountRoot");
!     UpgradeClientStringParm(hKey, "Cell", "Cell");
! 
!     /* BlockSize to ChunkSize requires convertion */
!     nData = GetPrivateProfileInt("AFS Client", "BlockSize", -1, "afsd.ini");
!     if (nData > -1) {
! 	DWORD chunkSize;
! 	for (chunkSize = 0; (1 << chunkSize) < nData; chunkSize++);
!         (void) RegSetValueEx(hKey, "ChunkSize", 0, REG_DWORD, (BYTE *)&chunkSize, sizeof(chunkSize));
!     }
! 
!     RegCloseKey(hKey);
! 
!     return 0;
! }
! 
! int SUCALLCONV Eradicate34Client()
! {
!     if (Client34Eradicate(TRUE) != ERROR_SUCCESS)
!         return -1;
! 
!     return 0;
! }
! 
! // This function was written a long time ago by Mike Comer for use by the 
! // original DFS Client for NT install program.
! int SUCALLCONV CheckIfAdmin(void)
! {
!     HANDLE                  token = INVALID_HANDLE_VALUE;
!     PVOID                   buffer = 0;
!     DWORD                   bufLength;
!     DWORD                   realBufLength;
!     TOKEN_PRIMARY_GROUP     *pgroup;
!     TOKEN_GROUPS            *groups;
!     int                     result = -1;
!     DWORD                   groupCount;
!     LONG                    status;
!     PSID                    AdministratorSID = NULL;
!     SID_IDENTIFIER_AUTHORITY    authority = SECURITY_NT_AUTHORITY;
! 
!     // allocate the SID for the Administrators group
!     if (!AllocateAndInitializeSid(&authority, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &AdministratorSID)) {
!         status = GetLastError();
!         goto getout;
!     }
! 
!     // open the process token
!     if (!OpenProcessToken(GetCurrentProcess(), TOKEN_READ, &token)) {
!         status = GetLastError();
!         token = INVALID_HANDLE_VALUE;
!         goto getout;
!     }
! 
!     // check primary group first
!     buffer = GlobalAlloc(GMEM_FIXED, sizeof(TOKEN_PRIMARY_GROUP));
!     if (!buffer) {
!         goto getout;
!     }
! 
!     bufLength = sizeof(TOKEN_PRIMARY_GROUP);
!     while(1) {
!         if (!GetTokenInformation(token, TokenPrimaryGroup, buffer, bufLength, &realBufLength)) {
!             if (realBufLength > bufLength) {
!                 // not enough space
!                 GlobalFree(buffer);
!                 bufLength = realBufLength;
!                 buffer = GlobalAlloc(GMEM_FIXED, realBufLength);
!                 if (!buffer) {
!                     goto getout;
!                 }
!                 continue;
!             }
! 
!             goto getout;
!         }
!         break;
!     }
! 
!     pgroup = (TOKEN_PRIMARY_GROUP *)buffer;
!     if (EqualSid(pgroup->PrimaryGroup, AdministratorSID)) {
!         result = 0;
!     } else {
!         // okay, try the secondary groups
!         while(1) {
!             if (!GetTokenInformation(token, TokenGroups, buffer, bufLength, &realBufLength)) {
!                 if (realBufLength > bufLength) {
!                     // not enough space
!                     GlobalFree(buffer);
!                     bufLength = realBufLength;
!                     buffer = GlobalAlloc(GMEM_FIXED, realBufLength);
!                     if (!buffer) {
!                         goto getout;
!                     }
!                     continue;
!                 }
! 
!                 // a real error
!                 goto getout;
!             }
!             break;
!         }
! 
!         // we have the list of groups here.  Process them:
!         groups = (TOKEN_GROUPS *)buffer;
!         for(groupCount = 0; groupCount < groups->GroupCount; groupCount++) {
!             if (EqualSid(groups->Groups[groupCount].Sid, AdministratorSID)) {
!                 result = 0;
!                 break;
!             }
!         }
!     }
! 
! getout:
! 
!     if (token != INVALID_HANDLE_VALUE) {
!         CloseHandle(token);
!     }
! 
!     if (buffer) {
!         GlobalFree(buffer);
!     }
! 
!     if (AdministratorSID) {
!         FreeSid(AdministratorSID);
!     }
! 
!     return result;
! }
! 
! static void SetSharedFileRefCount(char *pszFile, int nRefCount)
! {
!     LONG result;
!     HKEY hKey;
!     
!     result = RegOpenKeyAlt(AFSREG_NULL_KEY, MS_SHARED_FILES_KEY, KEY_WRITE, FALSE, &hKey, 0);
!     if (result != ERROR_SUCCESS)
!         return;
!     
!     if (nRefCount <= 0)
!         RegDeleteValue(hKey, pszFile);
!     else
!         RegSetValueEx(hKey, pszFile, 0, REG_DWORD, (BYTE *)&nRefCount, sizeof(int));    
!     
!     RegCloseKey(hKey);
! }
! 
! static char *GetTimeStamp()
! {
!     char szTime[64], szDate[64];
!     static char szTimeDate[128];
! 
!     _strtime(szTime);
!     _strdate(szDate);
! 
!     sprintf(szTimeDate, "[%s %s] ", szTime, szDate);
!     
!     return szTimeDate;
! }
! 
! int SUCALLCONV WriteToInstallErrorLog(char *pszMsg)
! {
!     static BOOL bWritten = FALSE;
!     FILE *fp;
! 
!     // On the first write, recreate the file    
!     fp = fopen(INSTALL_ERROR_LOG_NAME, bWritten ? "a" : "w");
!     if (!fp)
!         return -1;
!         
!     fprintf(fp, "%s%s\r\n", GetTimeStamp(), pszMsg);
!     
!     fclose(fp);
!     
!     bWritten = TRUE;
!     
!     return 0;
! }
! 
! static void WriteToUninstallErrorLog(char *pszMsg)
! {
!     static BOOL bWritten = FALSE;
!     FILE *fp;
! 
!     // On the first write, recreate the file    
!     fp = fopen(UNINSTALL_ERROR_LOG_NAME, bWritten ? "a" : "w");
!     if (!fp)
!         return;
!         
!     fprintf(fp, "%s%s\r\n", GetTimeStamp(), pszMsg);
!     
!     fclose(fp);
!     
!     bWritten = TRUE;
! }
! 
! static char *LoadResString(UINT uID)
! {
!     static char str[256];
!     GetString (str, uID);
!     return str;
! }
! 
! static void ShowError(UINT nResID, LONG nError)
! {
!     char szErr[256];
!     char szPrompt[256];
!     char szMsg[256];
!     char szTitle[256];
!     char *psz;
! 
!     psz = LoadResString(nResID);
!     if (psz)
!         strcpy(szErr, psz);
!     else
!         sprintf(szErr, "unknown error msg (Msg ID = %d)", nResID);
!     
!     psz = LoadResString(IDS_INSTALLATION_FAILURE);
!     strcpy(szPrompt, psz ? psz : "An error has occurred:  %s (Last Error = %ld).");
! 
!     sprintf(szMsg, szPrompt, szErr, nError);
! 
!     psz = LoadResString(IDS_TITLE);
!     strcpy(szTitle, psz ? psz : "AFS");
! 
!     if (bSilentMode)
!         WriteToUninstallErrorLog(szMsg);
!     else
!         MessageBox(hDlg, szMsg, szTitle, MB_OK);
! }
! 
! static int ShowMsg(UINT nResID, int nType)
! {
!     char szTitle[256];
!     char *psz;
! 
!     psz = LoadResString(IDS_TITLE);
!     strcpy(szTitle, psz ? psz : "AFS");
! 
!     return MessageBox(hDlg, LoadResString(nResID), szTitle, nType);
! }
! 
! static char *GetAppInstallDir(struct APPINFO *pApp, BOOL bRemembered)
! {
!     HKEY hKey;
!     LONG nResult;
!     DWORD dwType;
!     static char szInstallDir[256];
!     DWORD dwSize;
!     char *pszKey;
!     char *pszValue;
! 
!     pszKey = bRemembered ? UNINSTALL_TEMP_INFO_KEY : pApp->regInstallDir.pszKey;
!     pszValue = bRemembered ? INSTALL_DIR_VALUE_NAME : pApp->regInstallDir.pszValue;
! 
!     dwSize = sizeof(szInstallDir);
! 
!     nResult = RegOpenKeyAlt(AFSREG_NULL_KEY, pszKey, KEY_READ, FALSE, &hKey, 0);
!     if (nResult == ERROR_SUCCESS) {
!         nResult = RegQueryValueEx(hKey, pszValue, 0, &dwType, (PBYTE)szInstallDir, &dwSize);
!         RegCloseKey(hKey);
!     }
! 
!     if (nResult != ERROR_SUCCESS) {
!         ShowError(IDS_CANT_DETERMINE_APP_PATH, nResult);
!         return 0;
!     }
! 
!     FilepathNormalizeEx(szInstallDir, FPN_BACK_SLASHES);
! 
!     return szInstallDir;
! }
! 
! static BOOL DoesRegKeyExist(char *pszKey)
! {
!     HKEY hKey;
!     LONG nResult;
! 
!     nResult = RegOpenKeyAlt(AFSREG_NULL_KEY, pszKey, KEY_READ, FALSE, &hKey, 0);
!     if (nResult == ERROR_SUCCESS) {
!         RegCloseKey(hKey);
!         return TRUE;
!     }
! 
!     return FALSE;
! }
! 
! static BOOL IsAppInstalled(struct APPINFO *pApp)
! {
!     return DoesRegKeyExist(pApp->pszAppKey);
! }
! 
! static void BuildShortPath(char *pszShortPath, UINT nShortPathLen, char *pszInstallDir, char *pszPath)
! {
!     strncpy(pszShortPath, pszInstallDir, nShortPathLen);
!     strncat(pszShortPath, pszPath, nShortPathLen);
!     
!     GetShortPathName(pszShortPath, pszShortPath, nShortPathLen);
! }
! 
! static BOOL IsWin95()
! {
!     OSVERSIONINFO versionInformation;
! 
!     versionInformation.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
!     
!     GetVersionEx(&versionInformation);
!     
!     if ((versionInformation.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) &&
!         (versionInformation.dwMinorVersion == 0))
!         return TRUE;
!         
!     return FALSE;
! }
! 
! int IsWin98()
! {
!     OSVERSIONINFO versionInformation;
! 
!     versionInformation.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
!     
!     GetVersionEx(&versionInformation);
!     
!     if ((versionInformation.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) &&
!         (versionInformation.dwMinorVersion == 10))
!         return 0;
!         
!     return -1;
! }
! 
! static BOOL IsServiceInstalled(char *pszServiceKey)
! {
!     HKEY hKey;
! 
!     if (RegOpenKeyAlt(0, pszServiceKey, KEY_READ, FALSE, &hKey, 0) == ERROR_SUCCESS) {
!         RegCloseKey(hKey);
!         return TRUE;
!     }
! 
!     return FALSE;
! }
! 
! // If this fails in anyway we just return.  No error is displayed.
! static void MakeSureServiceDoesNotExist(char *pszName)
! {
!     SC_HANDLE hServer = 0, hSCM = 0;
!     SERVICE_STATUS status;
! 
!     hSCM = OpenSCManager(0, 0, SC_MANAGER_CREATE_SERVICE);
!     if (hSCM) {
!         hServer = OpenService(hSCM, pszName, SERVICE_ALL_ACCESS | DELETE);
!         if (hServer) {
!             if (QueryServiceStatus(hServer, &status)) {
!                 if (status.dwCurrentState != SERVICE_STOPPED) {
!                     if (!ControlService(hServer, SERVICE_CONTROL_STOP, &status)) {
!                         CloseServiceHandle(hServer);
!                         CloseServiceHandle(hSCM);
!                         return;
!                     }
!                 }
!             }
!             
!             // Try to delete even if status query fails
!             DeleteService(hServer);
!         }
!     }
! 
!     if (hServer)
!         CloseServiceHandle(hServer);
!     if (hSCM)
!         CloseServiceHandle(hSCM);
! }
! 
! static int InstallService(char *pszName, char *pszDependOn, char *pszDisplayName, char *pszServicePath, BOOL bInteractive)
! {
!     SC_HANDLE hServer = 0, hSCM;
!     BOOL bRestoreOldConfig = FALSE;
! 
!     hSCM = OpenSCManager(0, 0, SC_MANAGER_CREATE_SERVICE);
!     if (!hSCM) {
!         ShowError(IDS_SCM_OPEN_FAILED, GetLastError());
!         return -1;
!     }
! 
! /*  This code is not used, but it could be handy in the future so I am keeping it here.
! 
!     // If the service exists, then we (most probably) are in the middle of an upgrade or reinstall.
!     bRestoreOldConfig = IsServiceInstalled(pszName);
! 
!     if (bRestoreOldConfig) {
!         hServer = OpenService(hSCM, pszName, SERVICE_ALL_ACCESS);
!         if (!hServer || !ChangeServiceConfig(hServer, SERVICE_NO_CHANGE, SERVICE_AUTO_START, SERVICE_NO_CHANGE, 0, 0, 0, 0, 0, 0, 0)) {
!             ShowError(IDS_RESTORE_OF_PREVIOUS_CONFIG_FAILED, GetLastError());
!             bRestoreOldConfig = FALSE;
!             // Fall through to service creation below
!         }
!     } 
! */
!     
!     if (!bRestoreOldConfig) {
!         DWORD dwServiceType;
! 
!         // If the service already exists, the create call will fail.  This can
!         // happen if uninstall failed (which is not infrequent).  Making sure the
!         // service does not exist makes it easier for a user to install over top of
!         // a previously failed uninstall.
!         MakeSureServiceDoesNotExist(pszName);
! 
!         dwServiceType = SERVICE_WIN32_OWN_PROCESS;
!         if (bInteractive)
!             dwServiceType |= SERVICE_INTERACTIVE_PROCESS;
!     
!         hServer = CreateService(hSCM, pszName, pszDisplayName,
!             SERVICE_ALL_ACCESS, dwServiceType, SERVICE_AUTO_START, 
!             SERVICE_ERROR_NORMAL, pszServicePath, 0, 0, "RPCSS\0Netbios\0\0", 0, 0);
!     
!         if (!hServer)
!             ShowError(IDS_SERVICE_CREATE_FAILED, GetLastError());
!     }
! 
!     if (hServer)
!         CloseServiceHandle(hServer);
! 
!     CloseServiceHandle(hSCM);
! 
!     return 0;
! }
! 
! int SUCALLCONV InstallServerService(char *pszServicePath)
! {
!     return InstallService(appServer.pszSvcName, 0, appServer.pszSvcDisplayName, pszServicePath, TRUE);
! }
! 
! int SUCALLCONV InstallClientService(char *pszServicePath)
! {
!     return InstallService(appClient.pszSvcName, appClient.pszSvcDependOn, appClient.pszSvcDisplayName, pszServicePath, FALSE);
! }
! 
! static int UninstallService(struct APPINFO *pAppInfo)
! {
!     SC_HANDLE hServer, hSCM;
!     SERVICE_STATUS status;
!     BOOL bOk;
!     BOOL bServer = FALSE;
!     BOOL bShowingProgressDlg = FALSE;
! 
!     hSCM = OpenSCManager(0, 0, SC_MANAGER_CREATE_SERVICE);
!     if (!hSCM) {
!         ShowError(IDS_SCM_OPEN_FAILED, GetLastError());
!         return -1;
!     }
!     
!     hServer = OpenService(hSCM, pAppInfo->pszSvcName, SERVICE_ALL_ACCESS | DELETE);
!     if (!hServer) {
!         ShowError(IDS_SERVICE_OPEN_FAILED, GetLastError());
!         CloseServiceHandle(hSCM);
!         return -1;
!     }
! 
!     if (!QueryServiceStatus(hServer, &status)) {
!         ShowError(IDS_SERVICE_QUERY_FAILED, GetLastError());
!         CloseServiceHandle(hServer);
!         CloseServiceHandle(hSCM);
!         return -1;
!     }
! 
!     if (status.dwCurrentState != SERVICE_STOPPED) {
!         if (pAppInfo->nServiceShutdownMsgID) {
!             if (!bSilentMode && (ShowMsg(pAppInfo->nServiceShutdownMsgID, MB_YESNO | MB_ICONQUESTION) == IDNO)) {
!                 CloseServiceHandle(hServer);
!                 CloseServiceHandle(hSCM);
!                 return 1;
!             }
!         }
! 
!         if (!bSilentMode)
!             bShowingProgressDlg = ShowProgressDialog(LoadResString(pAppInfo->nServiceShutdownProgressMsgID));
! 
!         if (!ControlService(hServer, SERVICE_CONTROL_STOP, &status)) {
!             if (bShowingProgressDlg)
!                 HideProgressDialog();
!             ShowError(IDS_SERVICE_STOP_FAILED, GetLastError());
!             CloseServiceHandle(hServer);
!             CloseServiceHandle(hSCM);
!             return -1;
!         }
!     }
! 
!     // Wait for the service to stop
!     while (status.dwCurrentState != SERVICE_STOPPED) {
!         // I stopped waiting on dwWaitHint because it seemed the wait hint was too long.
!         // The service would be stopped but we'd still be asleep for a long time yet.
!         Sleep(5000);    //status.dwWaitHint);
! 
!         if (!QueryServiceStatus(hServer, &status)) {
!             if (bShowingProgressDlg)
!                 HideProgressDialog();
!             ShowError(IDS_SERVICE_QUERY_FAILED, GetLastError());
!             CloseServiceHandle(hServer);
!             CloseServiceHandle(hSCM);
!             return -1;
!         }
!     }
! 
!     // The service has been stopped
!     if (bShowingProgressDlg)
!         HideProgressDialog();
! 
!     // This code to disable the service may be of use some day so I am keeping it here.
!     // bOk = ChangeServiceConfig(hServer, SERVICE_NO_CHANGE, SERVICE_DISABLED, SERVICE_NO_CHANGE, 0, 0, 0, 0, 0, 0, 0); 
! 
!     bOk = DeleteService(hServer);
! 
!     if (!bOk)
!         ShowError(IDS_SERVICE_DELETE_FAILED, GetLastError());
! 
!     CloseServiceHandle(hServer);
!     CloseServiceHandle(hSCM);
! 
!     return (bOk ? 0 : -1);
! }
! 
! int SUCALLCONV AddToNetworkProviderOrder(char *pszWhatToAdd)
! {
!     return AddToProviderOrder(pszWhatToAdd) ? 0 : -1;
! }
! 
! static int RemoveFromNetworkProviderOrder(char *pszWhatToDel)
! {
!     return RemoveFromProviderOrder(pszWhatToDel) ? 0 : -1;
! }
! 
! int SUCALLCONV AddToPath(char *pszPath)
! {
!     return AddToSystemPath(pszPath) ? 0 : -1;
! }
! 
! static int RemoveFromPath(char *pszPath)
! {
!     return RemoveFromSystemPath(pszPath) ? 0 : -1;
! }
! 
! static void RemoveFiles(char *pszFileSpec)
! {
!     struct _finddata_t fileinfo;
!     long hSearch;
!     char szDel[MAX_PATH];
!     char szDir[MAX_PATH];
!     char *p;
! 
!     strcpy(szDir, pszFileSpec);
!     p = strrchr(szDir, '\\');
!     if (p)
!         *p = 0;
!     
!     hSearch = _findfirst(pszFileSpec, &fileinfo);
!     if (hSearch == -1)
!         return;
! 
!     while (1) {
!         if ((strcmp(fileinfo.name, ".") != 0) && (strcmp(fileinfo.name, "..") != 0)) {
!             sprintf(szDel, "%s\\%s", szDir, fileinfo.name);
!             DeleteFile(szDel);
!         }
! 
!         if (_findnext(hSearch, &fileinfo) == -1)
!             break;
!     }
! 
!     _findclose(hSearch);
! }
! 
! static void RemoveDir(char *pszDir)
! {
!     char szFileSpec[MAX_PATH];
! 
!     sprintf(szFileSpec, "%s\\*.*", pszDir);
! 
!     RemoveFiles(szFileSpec);
!     RemoveDirectory(pszDir);
! }
! 
! static void RemoveRegValues(struct REGVALUE *pRegValues)
! {
!     struct REGVALUE *pCurValue;
!     HKEY hKey;
!     LONG nResult;
! 
!     if (!pRegValues)
!         return;
! 
!     for (pCurValue = pRegValues; pCurValue->pszKey; pCurValue++) {
!         nResult = RegOpenKeyAlt(AFSREG_NULL_KEY, pCurValue->pszKey, KEY_ALL_ACCESS, FALSE, &hKey, 0);
! 
!         if (nResult == ERROR_SUCCESS) {
!             nResult = RegDeleteValue(hKey, pCurValue->pszValue);
!             RegCloseKey(hKey);
!         }
! 
!         if (nResult != ERROR_SUCCESS)
!             ShowError(IDS_REG_DELETE_VALUE_ERROR, nResult);
!     }
! }
! 
! static BOOL UninstallCredsTool()
! {
!     int nResult = WinExec("afscreds /uninstall", SW_HIDE);
! 
!     if (nResult <= 31) {
!         if (nResult != ERROR_FILE_NOT_FOUND)
!             ShowError(IDS_CANT_UNINSTALL_AFSCREDS, nResult);
!     }
! 
!     // Always return true.  We don't want the uninstall to completely fail just
!     // because the creds tool didn't uninstall.
!     return TRUE;
! }
! 
! 
! static char *GetTempDir()
! {
!     DWORD result;
!     static char szTempDir[MAX_PATH];
! 
!     result = GetTempPath(sizeof(szTempDir) - 1, szTempDir);
!     if (result == 0)
!         return "\\";
!         
!     return szTempDir;
! }
! 
! static char *GetRootInstallDir()
! {
!     char *psz;
!     static char szRootInstallDir[MAX_PATH] = "";
! 
!     if (szRootInstallDir[0] == 0) {
!         strcpy(szRootInstallDir, pszInstallDir);
!     
!         // Strip off the app specific part of the install dir
!         psz = strrchr(szRootInstallDir, '\\');
!         if (psz)
!             *psz = 0;
!     }
! 
!     return szRootInstallDir;
! }
! 
! static BOOL ClientSpecificUninstall()
! {
!     int nChoice;
! 
!     // This function needs to do two things.  First it needs to see if the server is
!     // installed, and if it is, ask the user if they really want to uninstall the
!     // client given that the server needs the client.  Second, if we are uninstalling
!     // the client, we need to uninstall the creds tool.
! 
!     if (!bSilentMode) {
!         if (IsAppInstalled(&appServer)) {
!             nChoice = ShowMsg(IDS_CLIENT_NEEDED_BY_SERVER, MB_ICONQUESTION | MB_YESNO);
!             if (nChoice == IDNO)
!                 return FALSE;       // Cancel the uninstall
!         }
!     }
!     
!     UninstallCredsTool();
! 
!     return TRUE;
! }
! 
! static struct APPINFO *GetApp()
! {
! #ifdef SERVER_UNINST
!     return &appServer;
! #elif CLIENT_UNINST
!     return &appClient;
! #elif CC_UNINST
!     return &appControlCenter;
! #elif LIGHT_CLIENT_UNINST
!     return &appLightClient;
! #elif DOCS_UNINST
!     return &appDocs;
! #else
!     return 0;
! #endif;
! }
! 
! static void RememberInstallDir(char *pszInstallDir)
! {
!     HKEY hKey;
! 
!     // We remember the install dir so that when the UninstUninitialize function is called
!     // by the InstallShield uninstaller, we can find out where we were installed to.  We
!     // have to do this because by the time that function is called, the registry values
!     // created at install time are already gone.  We need to be able to find out where we
!     // were installed so we can clean up anything IS couldn't uninstall.  If this fails in 
!     // any way then we don't care.  The only consequence is that some junk might be left on
!     // the users' system after an uninstall.
!     
!     LONG result = RegOpenKeyAlt(AFSREG_NULL_KEY, UNINSTALL_TEMP_INFO_KEY, KEY_WRITE, TRUE, &hKey, 0);
!     if (result != ERROR_SUCCESS)
!         return;
! 
!     RegSetValueEx(hKey, INSTALL_DIR_VALUE_NAME, 0, REG_SZ, (PBYTE)pszInstallDir, strlen(pszInstallDir) + 1);    
! 
!     RegCloseKey(hKey);
! }
! 
! int SUCALLCONV SetSilentMode()
! {
!     bSilentMode = TRUE;
! 
!     return 0;
! }
! 
! static char *GetWinDir()
! {
!     static char szWinDir[MAX_PATH] = "";
! 
!     if (!szWinDir[0]) 
!         GetWindowsDirectory(szWinDir, sizeof(szWinDir));
!     
!     return szWinDir;
! }
! 
! static char *GetWinSysDir()
! {
!     static char szWinSysDir[MAX_PATH] = "";
! 
!     if (!szWinSysDir[0])
!         GetSystemDirectory(szWinSysDir, sizeof(szWinSysDir));
!     
!     return szWinSysDir;
! } 
! 
! static char *GetLocaleID()
! {
!     static char szID[25] = "";
! 
!     if (szID[0] == 0) {
!         LCID dwID = GetSystemDefaultLCID();
!         
!          // Nuke the high word.  It contains a sort ID.
!         dwID &= 0x0000FFFF;
!         
!         // Convert locale ID to a string
!         itoa(dwID, szID, 10);
! 
!         // This thing should never be more than LOCALE_ID_LEN characters long.
!         szID[LOCALE_ID_LEN] = 0;
!     }
! 
!     return szID;
! }
! 
! static char *ExpandPath(char *pszFile)
! {
!     static char szPath[MAX_PATH];
!     char *psz;
! 
!     szPath[0] = 0;
! 
!     // Convert a path containing TARGETDIR, WINDIR, or WINSYSDIR to a 
!     // real path in the file system.  One of these MUST be the start of
!     // the file path passed in.  Also convert the string ???? to an
!     // actual locale number.
!     if (strncmp(pszFile, TARGETDIR, strlen(TARGETDIR)) == 0)
!         strcpy(szPath, GetRootInstallDir());
!     else if (strncmp(pszFile, WINDIR, strlen(WINDIR)) == 0)
!         strcpy(szPath, GetWinDir());
!     else if (strncmp(pszFile, WINSYSDIR, strlen(WINSYSDIR)) == 0)
!         strcpy(szPath, GetWinSysDir());
!     
!     if (szPath[0]) {    
!         psz = strchr(pszFile, '\\');
!         if (psz)
!             strcat(szPath, psz);
!     } else
!         strcpy(szPath, pszFile);
! 
!     // Is this a language dll?
!     psz = strstr(szPath, "????.");
!     
!     // If it is, replace ???? with the locale number
!     if (psz)
!         strncpy(psz, GetLocaleID(), LOCALE_ID_LEN);
! 
!     return szPath;
! }
! 
! static BOOL FileNeededByOtherApp(struct APPINFO *pApp, struct FILEINFO *pFileInfo)
! {
!     // If the file is used by the server, the app being uninstalled is not the server, and
!     // the server is installed, then this file is used by another app.
!     if (!IsWinNT()) {
!         if ((pFileInfo->nUsedBy & LCLIENT) && (pApp != &appLightClient) && IsAppInstalled(&appLightClient))
!             return TRUE;
!         return FALSE;
!     }
! 
!     if ((pFileInfo->nUsedBy & SERVER) && (pApp != &appServer) && IsAppInstalled(&appServer))
!         return TRUE;
! 
!     if ((pFileInfo->nUsedBy & CLIENT) && (pApp != &appClient) && IsAppInstalled(&appClient))
!         return TRUE;
! 
!     if ((pFileInfo->nUsedBy & CC) && (pApp != &appControlCenter) && IsAppInstalled(&appControlCenter))
!         return TRUE;
!     
!     return FALSE;
! }
! 
! static void DeleteInUseFiles(struct APPINFO *pAppInfo, struct FILEINFO *pFileInfo)
! {
!     char szSrcPath[MAX_PATH];
!     char szDestPath[MAX_PATH];
!     char szTempDir[MAX_PATH];
!     int ii;
! 
!     // If some app's file has been loaded before the app is uninstalled, then
!     // when an uninstall is attempted, the application and all of the dlls that
!     // its uses will be in use and IS will not be able to delete them.  Normally this
!     // is not a problem because IS will tell the user to reboot to finish the uninstall.
!     // However, we must support the ability to perform a silent uninstall followed
!     // immediatly by an install of the same product to the same directories.  If we let
!     // IS handle the uninstall of these files, this is not possible.  The reason is that
!     // when IS fails to remove these in use files, it marks them for deletion after the
!     // next reboot, which is fine.  Unfortunately, it leaves them in the dirs they were
!     // installed to.  So if we don't immediately reboot and perform an install to the
!     // same dirs, once a reboot is performed, those files get deleted and we have a 
!     // broken installation.
! 
!     // What we will do to fix all of this, is when the client is uninstalled, but
!     // before IS does anything, we will move the in use files and associated dlls
!     // into the temp dir and mark them for delete after a reboot.  Then an install
!     // that follows will succeed.
! 
!     // Delete the files that may be in use.  If they are we actually move
!     // them to the temp dir and mark them for deletion after the next reboot.
!     for (ii = 0; pFileInfo[ii].pszName != 0; ii++) {
!         // Get the source path
!         strcpy(szSrcPath, ExpandPath(pFileInfo[ii].pszName));
! 
!         // Only delete the file if it is not used by some other app
!         if (FileNeededByOtherApp(pAppInfo, &pFileInfo[ii]))
!             continue;
! 
!         // If the file doesn't exist then go on to the next file.
!         if (_access(szSrcPath, 0) != 0)
!             continue;
!             
!         // See if we can do a regular delete of the file
!         if (DeleteFile(szSrcPath)) {
!             SetSharedFileRefCount(szSrcPath, 0);
!             continue;
!         }
! 
!         // Get a temp dir that is on the same drive as the src path.
!         // We can't move an in use file to a different drive.
!         strcpy(szTempDir, GetTempDir());
!         if (szTempDir[0] != szSrcPath[0]) {
!             // Get the drive, colon, and slash of the src path
!             strncpy(szTempDir, szSrcPath, 3);
!             szTempDir[3] = 0;
!         }
!         
!         // Get the dest path - we will rename the file during the move
!         GetTempFileName(szTempDir, "AFS", 0, szDestPath);
! 
!         // Move from source to dest, marking the file for deletion after a reboot
!         if (IsWin95()) {
!             if (MoveFile(szSrcPath, szDestPath)) {            
!                 WritePrivateProfileString("rename", szSrcPath, szDestPath, "wininit.ini");
!                 SetSharedFileRefCount(szSrcPath, 0);
!             }
!         } else {    // WinNT or Win98
!             if (MoveFileEx(szSrcPath, szDestPath, MOVEFILE_REPLACE_EXISTING)) {
!                 SetFileAttributes(szDestPath, FILE_ATTRIBUTE_NORMAL);
!                 MoveFileEx(szDestPath, 0, MOVEFILE_DELAY_UNTIL_REBOOT);
!                 SetSharedFileRefCount(szSrcPath, 0);
!             }
!         }
!     }
! }
! 
! // Delete a directory and all its files and subdirectories - Yee haaa!
! static void RemoveDirectoryTree(char *pszDir)
! {
!     HANDLE hFind;
!     WIN32_FIND_DATA findFileData;
!     char szSpec[MAX_PATH];
!     char szSubFileOrDir[MAX_PATH];
!     BOOL bContinue;
! 
!     sprintf(szSpec, "%s\\*.*", pszDir);
!     
!     // First delete the contents of the dir
!     hFind = FindFirstFile(szSpec, &findFileData);
!     bContinue = (hFind != INVALID_HANDLE_VALUE);
!     
!     while (bContinue) {
!         if ((strcmp(findFileData.cFileName, ".") != 0) && (strcmp(findFileData.cFileName, "..") != 0)) {
!             sprintf(szSubFileOrDir, "%s\\%s", pszDir, findFileData.cFileName);
!             
!             if (findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
!                 RemoveDirectoryTree(szSubFileOrDir);
!             else
!                 DeleteFile(szSubFileOrDir);
!         }
! 
!         bContinue = FindNextFile(hFind, &findFileData);
!     }
! 
!     FindClose(hFind);
!         
!     // Now remove the dir
!     RemoveDirectory(pszDir);
! } 
! 
! static char *GetStartMenuRoot()
! {
!     HKEY hKey;
!     LONG nResult;
!     DWORD dwType;
!     DWORD dwSize;
!     char *pszKey;
!     char *pszValue;
! 
!     static char szStartMenuRoot[MAX_PATH] = "";
! 
!     if (szStartMenuRoot[0] == 0) {
!         dwSize = sizeof(szStartMenuRoot);
!     
!         if (IsWinNT()) {
!             pszKey = WINNT_START_MENU_REG_KEY;
!             pszValue = WINNT_START_MENU_REG_VALUE;
!         } else {
!             pszKey = WIN9X_START_MENU_REG_KEY;
!             pszValue = WIN9X_START_MENU_REG_VALUE;
!         }
!         
!         nResult = RegOpenKeyAlt(AFSREG_NULL_KEY, pszKey, KEY_READ, FALSE, &hKey, 0);
!         if (nResult == ERROR_SUCCESS) {
!             nResult = RegQueryValueEx(hKey, pszValue, 0, &dwType, (PBYTE)szStartMenuRoot, &dwSize);
!             RegCloseKey(hKey);
!         }
! 
!         if (nResult != ERROR_SUCCESS)
!             return 0;
!     }
! 
!     FilepathNormalizeEx(szStartMenuRoot, FPN_BACK_SLASHES);
! 
!     return szStartMenuRoot;
! }
! 
! static char *GetAfsStartMenuRoot()
! {
!     static char szAfsStartMenuRoot[MAX_PATH] = "";
!     char *pszStartMenuRoot;
!     
!     if (szAfsStartMenuRoot[0] == 0) {    
!         pszStartMenuRoot = GetStartMenuRoot();
!         if (!pszStartMenuRoot)
!             return 0;
! 
!         if (bSilentMode)
!             sprintf(szAfsStartMenuRoot, "%s\\IBM WebSphere\\Performance Pack\\AFS", pszStartMenuRoot );
!         else
!             sprintf(szAfsStartMenuRoot, "%s\\IBM AFS", pszStartMenuRoot );
!     }
! 
!     return szAfsStartMenuRoot;
! }
! 
! static BOOL IsADir(char *pszName)
! {
!     struct _stat statbuf;
! 
!     if (_stat(pszName, &statbuf) < 0)
!         return FALSE;
! 
!     return statbuf.st_mode & _S_IFDIR;
! }
! 
! static void DeleteStartMenuEntries(char *pszEntries)
! {
!     char szStartMenuPath[MAX_PATH];
!     char *pszAfsStartMenuRoot;
!     char *pszCurEntry;
! 
!     pszAfsStartMenuRoot = GetAfsStartMenuRoot();
! 
!     if (!pszAfsStartMenuRoot)
!         return;
!         
!     for (pszCurEntry = pszEntries; *pszCurEntry; pszCurEntry += strlen(pszCurEntry) + 1) {
!         sprintf(szStartMenuPath, "%s\\%s", pszAfsStartMenuRoot, pszCurEntry);
!         if (IsADir(szStartMenuPath))
!             RemoveDirectoryTree(szStartMenuPath);
!         else
!             DeleteFile(szStartMenuPath);
!     }
! }
! 
! static void RefreshStartMenu()
! {
!     char *pszAfsStartMenuRoot;
!     char szTemp[MAX_PATH];
!     
!     pszAfsStartMenuRoot = GetAfsStartMenuRoot();
!     if (!pszAfsStartMenuRoot)
!         return;
! 
!     sprintf(szTemp, "%s - Refresh Attempt", pszAfsStartMenuRoot);
!         
!     // Deleting items from below the root level of the start menu does not 
!     // cause it to refresh.  In order that users can see changes without
!     // rebooting we will temporarily rename our root most entry, which 
!     // does cause a refresh of the start menu.
!     MoveFileEx(pszAfsStartMenuRoot, szTemp, MOVEFILE_REPLACE_EXISTING);
!     MoveFileEx(szTemp, pszAfsStartMenuRoot, MOVEFILE_REPLACE_EXISTING);
! }
! 
! static BOOL PreserveConfigInfo(struct APPINFO *pApp)
! {
!     char *pszRegKey;
!     char szDestKey[256];
!     LONG result;
! 
!     bPreserveConfigInfo = TRUE;
! 
!     // If not in silent mode, ask user if they want to preserve the cfg info
!     if (!bSilentMode) {
!         int nChoice = ShowMsg(pApp->nPreserveConfigInfoMsgID, MB_ICONQUESTION | MB_YESNOCANCEL);
!         if (nChoice == IDCANCEL)
!             return FALSE;                   // Cancel the uninstall
!         else if (nChoice == IDNO) {     
!             bPreserveConfigInfo = FALSE;    // User doesn't want to preserve the config info
!             return TRUE;
!         }
!     }
! 
!     // Copy each reg key (and all of its subkeys and values) to another place in the registry.
!     for (pszRegKey = pApp->pszRegKeysToPreserve; *pszRegKey; pszRegKey += strlen(pszRegKey) + 1) {
!         if (!DoesRegKeyExist(pszRegKey))
!             continue;
! 
!         // Create the destination path for the copy
!         sprintf(szDestKey, "%s\\%s\\%s", AFS_PRESERVED_CFG_INFO_KEY, pApp->pszAppName, pszRegKey);
! 
!         // Try to copy it
!         result = RegDupKeyAlt(pszRegKey, szDestKey);
! 
!         if ((result != ERROR_SUCCESS) && (result != ERROR_FILE_NOT_FOUND)) {
!             // If the copy failed, then delete any copies that succeeded
!             sprintf(szDestKey, "%s\\%s", AFS_PRESERVED_CFG_INFO_KEY, pApp->pszAppName);
!             RegDeleteEntryAlt(szDestKey, REGENTRY_KEY);
!      		goto done;
!         }
!     }
! 
! 	// Remember the integrated login setting if this app supports that and it was turned on
! 	if (pApp->pszNetworkProviderOrder) {
! 		// Was integerated login turned on?
! 		BOOL bOn, bOk;
! 		bOk = InNetworkProviderOrder(pApp->pszNetworkProviderOrder, &bOn);
! 		if (bOk && bOn) {
! 			HKEY hKey;
! 			sprintf(szDestKey, "%s\\%s\\IntegratedLogin", AFS_PRESERVED_CFG_INFO_KEY, pApp->pszAppName);
! 			result = RegOpenKeyAlt(AFSREG_NULL_KEY, szDestKey, KEY_WRITE, TRUE, &hKey, 0);
! 			// The existance of the key is a flag indicating that integrated login was turned on
! 			RegCloseKey(hKey);
! 		}
! 	}
! 	
! done:
! 	if ((result == ERROR_SUCCESS) || bSilentMode)
! 	    return TRUE;    // Continue with uninstall
! 
!     // Report the error and ask the user if they want to continue the uninstall
!     return (ShowMsg(IDS_SAVE_OF_CONFIG_INFO_FAILED, MB_ICONEXCLAMATION | MB_YESNO) == IDYES);			
! }
! 
! int SUCALLCONV RestoreConfigInfo(int nApp)
! {
!     char *pszRegKey;
!     char szSrcKey[256];
!     struct APPINFO *pApp = 0;
!     BOOL bError = FALSE;
!     LONG result;
! 
!     switch (nApp) {
!         case SERVER:    pApp = &appServer;          break;
!         case CLIENT:    pApp = &appClient;          break;
!         case LCLIENT:   pApp = &appLightClient;     break;
!         case CC:        pApp = &appControlCenter;   break;
!     }
!     
!     if (!pApp)
!         return -1;
!         
!     // Copy each reg key (and all of its subkeys and values) back to its original place in the registry.
!     for (pszRegKey = pApp->pszRegKeysToPreserve; *pszRegKey; pszRegKey += strlen(pszRegKey) + 1) {
!         // Create the source path for the copy
!         sprintf(szSrcKey, "%s\\%s\\%s", AFS_PRESERVED_CFG_INFO_KEY, pApp->pszAppName, pszRegKey);
! 
!         if (!DoesRegKeyExist(szSrcKey))
!             continue;
! 
!         // Try to restore as many of the keys as possible.  Report any errors at the end.
! 
!         // Try to copy it
!         result = RegDupKeyAlt(szSrcKey, pszRegKey);
!         if ((result != ERROR_SUCCESS) && (result != ERROR_FILE_NOT_FOUND))
!             bError = TRUE;
!     }
! 
! 	// Restore integrated login if this app was using it
! 	if (pApp->pszNetworkProviderOrder) {
! 		// Check if integrated login was turned on.  The IntegratedLogin key is a flag
! 		// telling us that it was on.  If the key does not exist, integrated login was
! 		// not on.
! 		sprintf(szSrcKey, "%s\\%s\\IntegratedLogin", AFS_PRESERVED_CFG_INFO_KEY, pApp->pszAppName);
! 		if (DoesRegKeyExist(szSrcKey)) {
! 			if (!AddToProviderOrder(pApp->pszNetworkProviderOrder))
! 				bError = TRUE;
! 		}
! 	}
! 
!     // Remove our saved copies of the config info
!     sprintf(szSrcKey, "%s\\%s", AFS_PRESERVED_CFG_INFO_KEY, pApp->pszAppName);
!     RegDeleteEntryAlt(szSrcKey, REGENTRY_KEY);
!             
!     if (bError)
!         ShowError(IDS_RESTORE_OF_PREVIOUS_CONFIG_FAILED, 0);
! 
!     return TRUE;
! }
! 
! static BOOL DoSubKeysExist(char *pszKey)
! {
!     LONG result;
!     HKEY hKey;
!     char *pszSubKeys = 0;
!     BOOL bExist;
!     
!     result = RegOpenKeyAlt(AFSREG_NULL_KEY, pszKey, KEY_READ, FALSE, &hKey, 0);
!     if (result != ERROR_SUCCESS)
!         return FALSE;
!         
!     result = RegEnumKeyAlt(hKey,  &pszSubKeys);
!     RegCloseKey(hKey);
!     
!     if (result != ERROR_SUCCESS)
!         return FALSE;
!    
!     if (pszSubKeys) {
!         bExist = TRUE;
!         free(pszSubKeys);
!     } else
!         bExist = FALSE;    
! 
!     return bExist;
! }
! 
! /*
!  * The following definitions are taken from richedit.h:
!  *
!  */
! 
! #define EM_SETBKGNDCOLOR		(WM_USER + 67) // from Richedit.h
! #define EM_STREAMIN				(WM_USER + 73) // from Richedit.h
! #define SF_RTF			        0x0002
! 
! typedef DWORD (CALLBACK *EDITSTREAMCALLBACK)(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb);
! 
! typedef struct _editstream {
! 	DWORD dwCookie;		/* user value passed to callback as first parameter */
! 	DWORD dwError;		/* last error */
! 	EDITSTREAMCALLBACK pfnCallback;
! } EDITSTREAM;
! 
! /*
!  *
!  */
! 
! DWORD CALLBACK License_StreamText (DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
! {
!    LPTSTR psz = (LPTSTR)dwCookie;
!    LONG cchAvail = lstrlen(psz);
!    if ((*pcb = min(cchAvail, cb)) != 0) {
!       memcpy (pbBuff, psz, *pcb);
!       memmove (psz, &psz[*pcb], cchAvail - *pcb + 1);
!    }
!    return 0;
! }
! 
! 
! void License_OnInitDialog (HWND hDlg, LPTSTR pszFile)
! {
!     // Open the license file and shove its text in our RichEdit control
!     //
!     HANDLE hFile;
!     if ((hFile = CreateFile (pszFile, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) != INVALID_HANDLE_VALUE) {
! 
!         size_t cbText;
!         if ((cbText = GetFileSize (hFile, NULL)) != 0) {
! 
!             LPTSTR abText = (LPTSTR)GlobalAlloc (GMEM_FIXED, cbText + 3);
! 
!             DWORD cbRead;
!             if (ReadFile (hFile, abText, cbText, &cbRead, NULL)) {
!                 abText[ cbRead ] = 0;
! 
!                 EDITSTREAM Stream;
!                 memset (&Stream, 0x00, sizeof(Stream));
!                 Stream.dwCookie = (DWORD)abText;
!                 Stream.pfnCallback = License_StreamText;
! 
!                 SendDlgItemMessage (hDlg, IDC_TEXT, EM_STREAMIN, SF_RTF, (LPARAM)&Stream);
!             }
! 
!             GlobalFree (abText);
!         }
! 
!         CloseHandle (hFile);
!     }
! 
!     // Make the control's background be gray
!     //
!     SendDlgItemMessage (hDlg, IDC_TEXT, EM_SETBKGNDCOLOR, FALSE, (LPARAM)GetSysColor(COLOR_BTNFACE));
! }
! 
! BOOL CALLBACK License_DlgProc (HWND hDlg, UINT msg, WPARAM wp, LPARAM lp)
! {
!     switch (msg) {
!         case WM_INITDIALOG:
!             SetWindowLong (hDlg, DWL_USER, lp);
!             License_OnInitDialog (hDlg, (LPTSTR)lp);
!             break;
! 
!         case WM_COMMAND:
!             switch (LOWORD(wp)) {
!                 case IDCANCEL:
!                 case IDOK:
!                     EndDialog (hDlg, LOWORD(wp));
!                     break;
! 
!                 case IDC_PRINT:
!                     TCHAR szDir[ MAX_PATH ];
!                     GetCurrentDirectory (MAX_PATH, szDir);
!                     ShellExecute (hDlg, TEXT("print"), (LPTSTR)GetWindowLong (hDlg, DWL_USER), NULL, szDir, SW_HIDE);
!                     break;
!             }
!             break;
!     }
!     return FALSE;
! }
! 
! BOOL FindAfsInstallationPathByComponent (LPTSTR pszInstallationPath, LPTSTR pszComponent)
! {
!     *pszInstallationPath = 0;
! 
!     TCHAR szRegPath[ MAX_PATH ];
!     wsprintf (szRegPath, TEXT("Software\\TransarcCorporation\\%s\\CurrentVersion"), pszComponent);
! 
!     HKEY hk;
!     if (RegOpenKey (HKEY_LOCAL_MACHINE, szRegPath, &hk) == 0) {
!         DWORD dwType = REG_SZ;
!         DWORD dwSize = MAX_PATH;
! 
!         if (RegQueryValueEx (hk, TEXT("PathName"), NULL, &dwType, (PBYTE)pszInstallationPath, &dwSize) == 0) {
!             *(LPTSTR)FindBaseFileName (pszInstallationPath) = TEXT('\0');
! 
!             if (pszInstallationPath[0] && (pszInstallationPath[ lstrlen(pszInstallationPath)-1 ] == TEXT('\\')))
!             pszInstallationPath[ lstrlen(pszInstallationPath)-1 ] = TEXT('\0');
!         }
! 
!         RegCloseKey (hk);
!     }
! 
!     return !!*pszInstallationPath;
! }
! 
! BOOL FindAfsInstallationPath (LPTSTR pszInstallationPath)
! {
!    if (FindAfsInstallationPathByComponent (pszInstallationPath, TEXT("AFS Client")))
!       return TRUE;
!    if (FindAfsInstallationPathByComponent (pszInstallationPath, TEXT("AFS Control Center")))
!       return TRUE;
!    if (FindAfsInstallationPathByComponent (pszInstallationPath, TEXT("AFS Server")))
!       return TRUE;
!    if (FindAfsInstallationPathByComponent (pszInstallationPath, TEXT("AFS Supplemental Documentation")))
!       return TRUE;
!    return FALSE;
! }
! 
! HINSTANCE LoadRichTextControl (void)
! {
!     HINSTANCE hInst;
!     if ((hInst = LoadLibrary ("riched20.dll")) != NULL)
!         return hInst;
!     if ((hInst = LoadLibrary ("riched32.dll")) != NULL)
!         return hInst;
!     if ((hInst = LoadLibrary ("riched.dll")) != NULL)
!         return hInst;
!     if ((hInst = LoadLibrary ("richedit.dll")) != NULL)
!         return hInst;
!     return NULL;
! }
! 
! int SUCALLCONV ShowLicense (char *pszTarget, char *pszSource)
! {
!     // If the license already lives on this user's machine, don't show
!     // it again. This only has to be done if the user has never
!     // accepted the license agreement before (it's part of the setup
!     // program, so it gets installed if they've accepted it).
!     //
!     // We were handed a relative path of the form:
!     //    Documentation/html/license.rtf
!     //
!     // We'll need to find the AFS installation directory, in order to
!     // find that Documentation subtree.
!     //
!     BOOL fShowLicense = TRUE;
! 
!     TCHAR szInstallationPath[ MAX_PATH ];
!     if (FindAfsInstallationPath (szInstallationPath)) {
!         TCHAR szLicensePath[ MAX_PATH ];
!         wsprintf (szLicensePath, TEXT("%s\\%s"), szInstallationPath, pszTarget);
! 
!         if (GetFileAttributes (szLicensePath) != (DWORD)-1) {
!             fShowLicense = FALSE;
!         }
!     }
! 
!     // Before we can show the license file, we have to prepare the RichEdit
!     // control. That means loading the appropriate library and calling its
!     // initialization functions.
!     //
!     HINSTANCE hRichEdit;
!     if ((hRichEdit = LoadRichTextControl()) != NULL) {
! 
!         // If we must show the license, do so now. This is a modal dialog,
!         // so we'll know whether or not the user accepts the license.
!         //
!         if (ModalDialogParam (IDD_LICENSE, GetActiveWindow(), License_DlgProc, (LPARAM)pszSource) == IDCANCEL) {
!             // The user rejected the license; fail setup
!             return FALSE;
!         }
! 
!     	FreeLibrary (hRichEdit);
!     }
! 
!     // The user accepted the license, so we can continue with Setup.
!     // The license file is installed as part of Setup.
!     return TRUE;
! }
! 
! int SUCALLCONV UninstInitialize(HWND hIS, HINSTANCE hIS5, long Reserved)
! {
!     char szPath[MAX_PATH];
!     struct APPINFO *pAppInfo;
!     char *pszFile = 0;
!     char *pszSubDir = 0;
! 
!     hDlg = hIS;
! 
!     bSilentMode = !IsWindowVisible(hIS);
! 
!     // Which app are we uninstalling?
!     pAppInfo = GetApp();
!     if (!pAppInfo) {
!         ShowError(IDS_CANT_DETERMINE_PRODUCT, 0);
!         return -1;
!     }
! 
!     // Get the app's install dir
!     pszInstallDir = GetAppInstallDir(pAppInfo, FALSE);
!     if (!pszInstallDir)
!         return -1;
! 
!     // If this app has a custom uninstall func, call it here
!     if (pAppInfo->pUninstallFunc)
!         if (!pAppInfo->pUninstallFunc())
!             return -1;
! 
!     if (pAppInfo->pszRegKeysToPreserve)
!         if (!PreserveConfigInfo(pAppInfo))
!             return -1;
! 
!     // Unconfigure the service, if there is one for this app
!     if (pAppInfo->pszSvcKey) {
!         if (IsServiceInstalled(pAppInfo->pszSvcKey))
!             if (UninstallService(pAppInfo) == 1)
!                 return -1;
!     }
! 
!     RememberInstallDir(pszInstallDir);
! 
!     DeleteInUseFiles(pAppInfo, fileInfo);
! 
!     // Remove the app's bin path from the system path
!     if (pAppInfo->pszBinPath) {
!         BuildShortPath(szPath, sizeof(szPath), pszInstallDir, pAppInfo->pszBinPath);
!         RemoveFromPath(szPath);
!     }
! 
!     // Remove entry from NetworkProvider\Order key in registry
!     if (pAppInfo->pszNetworkProviderOrder)
!         RemoveFromNetworkProviderOrder(pAppInfo->pszNetworkProviderOrder);
! 
!     // Remove any generated subdirectories
!     if (!bPreserveConfigInfo && pAppInfo->pszDirsToDel) {
!         for (pszSubDir = pAppInfo->pszDirsToDel; *pszSubDir; pszSubDir += strlen(pszSubDir) + 1)
!             RemoveDir(ExpandPath(pszSubDir));
!     }
! 
!     // Remove any generated files
!     if (!bPreserveConfigInfo && pAppInfo->pszFilesToDel) {
!         for (pszFile = pAppInfo->pszFilesToDel; *pszFile; pszFile += strlen(pszFile) + 1)
!             RemoveFiles(ExpandPath(pszFile));
!     }
! 
!     // Remove any registry values that IS can't handle
!     RemoveRegValues(pAppInfo->pRegValues);
!     if (IsWinNT())
!         RemoveRegValues(pAppInfo->pWinNTRegValues);
!     else    
!         RemoveRegValues(pAppInfo->pWin9XRegValues);
! 
!     // Remove the start menu entries for this app
!     if (pAppInfo->pszStartMenuEntries) {
!         DeleteStartMenuEntries(pAppInfo->pszStartMenuEntries);
!         RefreshStartMenu();
!     }
! 
!     // Remove the install dir
!     RemoveDirectory(pszInstallDir);
! 
!     return 0;
! }
! 
! void SUCALLCONV UninstUnInitialize(HWND hIS, HINSTANCE hIS5, long Reserved)
! {
!     char *pszInstallDir;
!     char szDirPath[MAX_PATH];
!     char *psz;
!     struct APPINFO *pAppInfo;
! 
!     // If we just uninstalled the last AFS app, then do some cleanup.
!     if (IsAppInstalled(&appServer) || IsAppInstalled(&appClient) ||
!         IsAppInstalled(&appControlCenter) || IsAppInstalled(&appLightClient) ||
!         IsAppInstalled(&appDocs))
!     {
!         return;
!     }
! 
!     bSilentMode = !IsWindowVisible(hIS);
!     
!     // Which app did we just uninstall?
!     pAppInfo = GetApp();
!     if (!pAppInfo) {
!         ShowError(IDS_CANT_DETERMINE_PRODUCT, 0);
!         return;
!     }
! 
!     // Get the app's install dir
!     pszInstallDir = GetAppInstallDir(pAppInfo, TRUE);
!     if (!pszInstallDir)
!         return;
! 
!     // Remove the reg key we used to remember the app install dir
!     RegDeleteEntryAlt(UNINSTALL_TEMP_INFO_KEY, REGENTRY_KEY);
! 
!     // Try to remove the reg key used to store config info, but only
!     // if there are no app config info sub keys present.
!     if (!DoSubKeysExist(AFS_PRESERVED_CFG_INFO_KEY))
!         RegDeleteEntryAlt(AFS_PRESERVED_CFG_INFO_KEY, REGENTRY_KEY);
! 
!     // Remove the install dir
!     RemoveDirectory(pszInstallDir);
! 
!     // Attempt to remove the install root and common directories.  The are 
!     // shared and so no single app knows to delete them.
! 
!     // Strip off the app specific part of the install dir
!     psz = strrchr(pszInstallDir, '\\');
!     if (psz)
!         *psz = 0;
! 
!     sprintf(szDirPath, "%s\\%s", pszInstallDir, "Common");
!     RemoveDirectory(szDirPath);
! 
!     // Remove the Common directory from the system path
!     RemoveFromPath(szDirPath);
! 
!     // Remove all of the documentation dirs
!     sprintf(szDirPath, "%s\\%s", pszInstallDir, "Documentation");
!     RemoveDirectoryTree(szDirPath);
! 
!     // Ok, up to this point we have been removing files we know we
!     // created.  However, after this point we are into the path
!     // that the user chose for our install root.  The default for
!     // this is IBM/Afs, but they could have chosen anything,
!     // including a dir or dirs that have other products in them.
!     // We will check to see if it is IBM\AFS and if it is then we 
!     // will attempt to remove them.
!     
!     // Back up a level and look for AFS
!     psz = strrchr(pszInstallDir, '\\');
!     if (psz) {
!         if (stricmp(psz + 1, "AFS") == 0) {
!             RemoveDirectory(pszInstallDir);
!             *psz = 0;
!         }
!     }
! 
!     // Back up a level and look for IBM
!     psz = strrchr(pszInstallDir, '\\');
!     if (psz) {
!         if (stricmp(psz + 1, "IBM") == 0) {
!             RemoveDirectory(pszInstallDir);
!             *psz = 0;
!         }
!     }
! 
!     // Remove the root afs start menu entry
!     psz = GetStartMenuRoot();
!     if (psz) {
!         if (bSilentMode) {
!             // Remove everything under our branch
!             sprintf(szDirPath, "%s\\IBM WebSphere\\Performance Pack\\AFS", psz);
!             RemoveDirectoryTree(szDirPath);
!             
!             // Remove the IBM stuff only if the dirs are empty
!             sprintf(szDirPath, "%s\\IBM WebSphere\\Performance Pack", psz);
!             if (RemoveDirectory(szDirPath)) {
!                 sprintf(szDirPath, "%s\\IBM WebSphere", psz);
!                 RemoveDirectory(szDirPath);
!             }
!         } else {
!             sprintf(szDirPath, "%s\\IBM AFS", psz);
!             RemoveDirectoryTree(szDirPath);
!         }
!     }
! }
! 
! BOOLEAN _stdcall DllEntryPoint(HANDLE dll, DWORD reason, PVOID reserved)
! {
!     if (reason == DLL_PROCESS_ATTACH) {
!         hinst = (HINSTANCE)dll;
!         TaLocale_LoadCorrespondingModuleByName (hinst, "afs_setup_utils.dll");
!     }
! 
!     return TRUE;
! }
! 
! extern "C" int WINAPI Test (HINSTANCE hInst, HINSTANCE hPrev, LPSTR psz, int nCmdShow)
! {
!    ShowLicense ("TEST", "\\\\fury\\afssetup\\license\\ja_JP.rtf");
!    return 0;
! }
! 
! 
Index: openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.cpp
diff -c /dev/null openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.cpp:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:25 2001
--- openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.cpp	Thu Aug 23 01:31:50 2001
***************
*** 0 ****
--- 1,409 ----
+ // GetWebDll.cpp : Defines the initialization routines for the DLL.
+ //
+ 
+ #include "stdafx.h"
+ #include "GetWebDll.h"
+ #include "getwebdllfun.h"
+ 
+ #ifdef _DEBUG
+ #define new DEBUG_NEW
+ #undef THIS_FILE
+ static char THIS_FILE[] = __FILE__;
+ #endif
+ 
+ //
+ //	Note!
+ //
+ //		If this DLL is dynamically linked against the MFC
+ //		DLLs, any functions exported from this DLL which
+ //		call into MFC must have the AFX_MANAGE_STATE macro
+ //		added at the very beginning of the function.
+ //
+ //		For example:
+ //
+ //		extern "C" BOOL PASCAL EXPORT ExportedFunction()
+ //		{
+ //			AFX_MANAGE_STATE(AfxGetStaticModuleState());
+ //			// normal function body here
+ //		}
+ //
+ //		It is very important that this macro appear in each
+ //		function, prior to any calls into MFC.  This means that
+ //		it must appear as the first statement within the 
+ //		function, even before any object variable declarations
+ //		as their constructors may generate calls into the MFC
+ //		DLL.
+ //
+ //		Please see MFC Technical Notes 33 and 58 for additional
+ //		details.
+ //
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ // CGetWebDllApp
+ 
+ BEGIN_MESSAGE_MAP(CGetWebDllApp, CWinApp)
+ 	//{{AFX_MSG_MAP(CGetWebDllApp)
+ 		// NOTE - the ClassWizard will add and remove mapping macros here.
+ 		//    DO NOT EDIT what you see in these blocks of generated code!
+ 	//}}AFX_MSG_MAP
+ END_MESSAGE_MAP()
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ // CGetWebDllApp construction
+ 
+ CGetWebDllApp::CGetWebDllApp()
+ {
+ 	// TODO: add construction code here,
+ 	// Place all significant initialization in InitInstance
+ }
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ // The one and only CGetWebDllApp object
+ 
+ CGetWebDllApp theApp;
+ 
+ 
+ LPCTSTR pszURL = NULL;
+ BOOL    bStripMode = FALSE;
+ BOOL    bProgressMode = FALSE;
+ DWORD   dwAccessType = PRE_CONFIG_INTERNET_ACCESS;
+ 
+ DWORD dwHttpRequestFlags =
+ 	INTERNET_FLAG_EXISTING_CONNECT | INTERNET_FLAG_NO_AUTO_REDIRECT;
+ //
+ //GET /updateCellServDB.jsp?type=bunk HTTP/1.1
+ //Accept: */*
+ //Accept -Language: en -us
+ //Accept -Encoding: gzip , deflate
+ //User-Agent: ufilerNativeClient/1.0 (1.0; Windows NT)
+ //Host: 192.168.0.1
+ //Connection: Keep -Alive
+ 
+ const TCHAR szVersion[] =
+ 	_T("HTTP/1.1");
+ 
+ const TCHAR szHeaders[] =
+ 	_T("\
+ Accept: */*\r\n\
+ Accept -Language: en -us\r\n\
+ Accept -Encoding: gzip , deflate\r\n\
+ User-Agent: ufilerNativeClient/1.0 (1.0; Windows NT)\r\n\
+ Host: 192.168.0.1\r\n\
+ Connection: Keep -Alive\r\n");
+ 
+ CTearSession::CTearSession(LPCTSTR pszAppName, int nMethod)
+ 	: CInternetSession(pszAppName, 1, nMethod)
+ {
+ }
+ 
+ void CTearSession::OnStatusCallback(DWORD /* dwContext */, DWORD dwInternetStatus,
+ 	LPVOID /* lpvStatusInfomration */, DWORD /* dwStatusInformationLen */)
+ {
+ 	if (!bProgressMode)
+ 		return;
+ 
+ 	if (dwInternetStatus != INTERNET_STATUS_CONNECTED_TO_SERVER)
+ 		AfxMessageBox("Connection Not Made",MB_ICONERROR | MB_OK);
+ 	return;
+ }
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ // CTearException -- used if something goes wrong for us
+ 
+ // TEAR will throw its own exception type to handle problems it might
+ // encounter while fulfilling the user's request.
+ 
+ IMPLEMENT_DYNCREATE(CTearException, CException)
+ 
+ CTearException::CTearException(int nCode)
+ 	: m_nErrorCode(nCode)
+ {
+ }
+ 
+ void ThrowTearException(int nCode)
+ {
+ 	CTearException* pEx = new CTearException(nCode);
+ 	throw pEx;
+ }
+ 
+ // StripTags() rips through a buffer and removes HTML tags from it.
+ // The function uses a static variable to remember its state in case
+ // a HTML tag spans a buffer boundary.
+ 
+ void StripTags(LPTSTR pszBuffer)
+ {
+ 	static BOOL bInTag = FALSE;
+ 	LPTSTR pszSource = pszBuffer;
+ 	LPTSTR pszDest = pszBuffer;
+ 
+ 	while (*pszSource != '\0')
+ 	{
+ 		if (bInTag)
+ 		{
+ 			if (*pszSource == '>')
+ 				bInTag = FALSE;
+ 			pszSource++;
+ 		}
+ 		else
+ 		{
+ 			if (*pszSource == '<')
+ 				bInTag = TRUE;
+ 			else
+ 			{
+ 				*pszDest = *pszSource;
+ 				pszDest++;
+ 			}
+ 			pszSource++;
+ 		}
+ 	}
+ 	*pszDest = '\0';
+ }
+ 
+ 
+ extern "C" 
+ __declspec(dllexport) INT GetWebPage(LPSTR lpErrMsg,LPSTR lpFile,LPSTR lpCmdLine)
+ {
+ 	CString emsg;
+ //	emsg.Format("p1=[%s],p2=[%s]",lpFile,lpCmdLine);
+ //	AfxMessageBox(emsg,MB_ICONERROR | MB_OK);
+ 	if ((strlen(lpCmdLine)==0) || (strlen(lpFile)==0))
+ 	{
+ 		emsg="Parameter Error";
+ 		return 1;
+ 	}
+ 
+ 	int nRetCode = 0;
+ 
+ 	CTearSession session(_T("TEAR - MFC Sample App"), dwAccessType);
+ 	CHttpConnection* pServer = NULL;
+ 	CHttpFile* pFile = NULL;
+ 	char *szParm=strstr(lpCmdLine,"?");
+ 	try
+ 	{
+ 		// check to see if this is a reasonable URL
+ 		CFile ofile(lpFile,CFile::modeCreate|CFile::modeWrite);
+ 
+ 		CString strServerName;
+ 		CString strObject;
+ 		INTERNET_PORT nPort;
+ 		DWORD dwServiceType;
+ 
+ 		if (!AfxParseURL(lpCmdLine, dwServiceType, strServerName, strObject, nPort) ||
+ 			dwServiceType != INTERNET_SERVICE_HTTP)
+ 		{
+ 			emsg="Error: can only use URLs beginning with http://";
+ 			ThrowTearException(1);
+ 		}
+ 
+ 		if (bProgressMode)
+ 		{
+ 			VERIFY(session.EnableStatusCallback(TRUE));
+ 		}
+ 
+ 		pServer = session.GetHttpConnection(strServerName, nPort);
+ 		pFile = pServer->OpenRequest(
+ 			CHttpConnection::HTTP_VERB_GET,
+ 			strObject,		//updateCellServDB.jsp
+ 			NULL,			// URL of document
+ 			1,				// context
+ 			NULL,
+ 			szVersion,
+ 			dwHttpRequestFlags);
+ 		pFile->AddRequestHeaders(szHeaders);
+ 		pFile->SendRequest();
+ 
+ 		DWORD dwRet;
+ 		pFile->QueryInfoStatusCode(dwRet);
+ 
+ 		// if access was denied, prompt the user for the password
+ 
+ 		if (dwRet == HTTP_STATUS_DENIED)
+ 		{
+ 			DWORD dwPrompt;
+ 			dwPrompt = pFile->ErrorDlg(NULL, ERROR_INTERNET_INCORRECT_PASSWORD,
+ 				FLAGS_ERROR_UI_FLAGS_GENERATE_DATA | FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS, NULL);
+ 
+ 			// if the user cancelled the dialog, bail out
+ 
+ 			if (dwPrompt != ERROR_INTERNET_FORCE_RETRY)
+ 			{
+ 				emsg="Access denied: Invalid password";
+ 				ThrowTearException(1);
+ 			}
+ 
+ 			pFile->SendRequest();
+ 			pFile->QueryInfoStatusCode(dwRet);
+ 		}
+ 
+ 		CString strNewLocation;
+ 		pFile->QueryInfo(HTTP_QUERY_RAW_HEADERS_CRLF, strNewLocation);
+ 
+ 		// were we redirected?
+ 		// these response status codes come from WININET.H
+ 
+ 		if (dwRet == HTTP_STATUS_MOVED ||
+ 			dwRet == HTTP_STATUS_REDIRECT ||
+ 			dwRet == HTTP_STATUS_REDIRECT_METHOD)
+ 		{
+ 			CString strNewLocation;
+ 			pFile->QueryInfo(HTTP_QUERY_RAW_HEADERS_CRLF, strNewLocation);
+ 
+ 			int nPlace = strNewLocation.Find(_T("Location: "));
+ 			if (nPlace == -1)
+ 			{
+ 				emsg="Error: Site redirects with no new location";
+ 				ThrowTearException(2);
+ 			}
+ 
+ 			strNewLocation = strNewLocation.Mid(nPlace + 10);
+ 			nPlace = strNewLocation.Find('\n');
+ 			if (nPlace > 0)
+ 				strNewLocation = strNewLocation.Left(nPlace);
+ 
+ 			// close up the redirected site
+ 
+ 			pFile->Close();
+ 			delete pFile;
+ 			pServer->Close();
+ 			delete pServer;
+ 
+ 			if (bProgressMode)
+ 			{
+ 				emsg.Format("Caution: redirected to %s",(LPCTSTR) strNewLocation);
+ 			}
+ 
+ 			// figure out what the old place was
+ 			if (!AfxParseURL(strNewLocation, dwServiceType, strServerName, strObject, nPort))
+ 			{
+ 				emsg="Error: the redirected URL could not be parsed.";
+ 				ThrowTearException(2);
+ 			}
+ 
+ 			if (dwServiceType != INTERNET_SERVICE_HTTP)
+ 			{
+ 				emsg="Error: the redirected URL does not reference a HTTP resource.";
+ 				ThrowTearException(2);
+ 			}
+ 
+ 			// try again at the new location
+ 			pServer = session.GetHttpConnection(strServerName, nPort);
+ 			pFile = pServer->OpenRequest(CHttpConnection::HTTP_VERB_GET,
+ 				strObject, NULL, 1, NULL, NULL, dwHttpRequestFlags);
+ 			pFile->AddRequestHeaders(szHeaders);
+ 			pFile->SendRequest();
+ 
+ 			pFile->QueryInfoStatusCode(dwRet);
+ 			if (dwRet != HTTP_STATUS_OK)
+ 			{
+ 				emsg.Format("Error: Got status code %d",dwRet);
+ 				ThrowTearException(2);
+ 			}
+ 		}
+ 
+ 
+ 		TCHAR sz[1024];
+ 		while (pFile->ReadString(sz, 1023))
+ 		{
+ 			if (bStripMode)
+ 				StripTags(sz);
+ 			ofile.Write(sz,strlen(sz));
+ 		}
+ 
+ 		pFile->Close();
+ 		pServer->Close();
+ 		ofile.Close();
+ 	}
+ 	catch (CInternetException* pEx)
+ 	{
+ 		// catch errors from WinINet
+ 
+ 		TCHAR szErr[1024];
+ 		pEx->GetErrorMessage(szErr, 1024);
+ 
+ 		CString emsg;
+ 		emsg.Format("Error: (%s)",szErr);
+ 		nRetCode = 2;
+ 		pEx->Delete();
+ 	}
+ 	catch (CFileException* pEx)
+ 	{
+ 		TCHAR szErr[1024];
+ 		pEx->GetErrorMessage(szErr, 1024);
+ 
+ 		emsg.Format("File Error: (%s)",szErr);
+ 		nRetCode = 2;
+ 		pEx->Delete();
+ 	}
+ 	catch (CTearException* pEx)
+ 	{
+ 		// catch things wrong with parameters, etc
+ 
+ 		nRetCode = pEx->m_nErrorCode;
+ 		pEx->Delete();
+ 	}
+ 
+ 	if (pFile != NULL)
+ 		delete pFile;
+ 	if (pServer != NULL)
+ 		delete pServer;
+ 	session.Close();
+ 	int len=strlen(lpErrMsg);
+ 	strncpy(lpErrMsg,emsg,len);
+ 	lpErrMsg[len]=0;
+ 	return nRetCode;
+ }
+ 
+ extern "C" 
+ __declspec(dllexport) INT GetUserLogon(LPSTR lpUserName)
+ {
+ 	int nRetCode = 1;
+ 	ULONG nSize=strlen(lpUserName);
+ 	if (!GetUserName(lpUserName,&nSize)) nRetCode=0;
+ 	return nRetCode;
+ }
+ 
+ extern "C" 
+ __declspec(dllexport) INT BrowseFile(HWND hwndOwner,LPSTR lpstrTitle,LPSTR lpFileName,INT size)
+ {
+ 	char *xptr;
+ //	char msg[256];
+ 	char *ptr=strrchr(lpFileName,'\\');
+ 	int nFileOffset=0;
+ 	int nFileExtension=0;
+ 	if (ptr)
+ 		nFileOffset=ptr-lpFileName+1;
+ 	else {
+ 		ptr=strrchr(lpFileName,':');
+ 		if (ptr)
+ 			nFileOffset=ptr-lpFileName;
+ 	}
+ 	if (ptr==NULL)
+ 		ptr=lpFileName;
+ 	if (xptr=strrchr(ptr,'.'))
+ 		nFileExtension=nFileOffset+(xptr-ptr);
+ //	sprintf(msg,"Title: [%s] filename=[%s], %i,%i,%i",lpstrTitle,lpFileName,nFileOffset,nFileExtension,size);
+ //	AfxMessageBox(msg,MB_OK);
+ 	OPENFILENAME data={
+ 		sizeof(OPENFILENAME)	//lStructSize
+ 		,hwndOwner				//hwndOwner
+ 		,NULL					//
+ 		,"*.*"					//lpstrFilter
+ 		,NULL					//lpstrCustomFilter
+ 		,NULL					//nMaxCustFilter
+ 		,0						//nFilterIndex
+ 		,lpFileName			//lpstrFile
+ 		,size					//nMaxFile - at least 256 characters
+ 		,NULL					//lpstrFileTitle
+ 		,0						//nMaxFileTitle
+ 		,NULL					//lpstrInitialDir
+ 		,lpstrTitle				//lpstrTitle
+ 		,OFN_HIDEREADONLY|OFN_PATHMUSTEXIST		//Flags
+ 		,nFileOffset			//nFileOffset
+ 		,nFileExtension			//nFileExtension
+ 		,NULL					//lpstrDefExt
+ 		,NULL					//lCustData
+ 		,NULL					//lpfnHook
+ 		,NULL					//lpTemplateName
+ 	};
+ 	return GetOpenFileName(&data);
+ }
\ No newline at end of file
Index: openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.def
diff -c /dev/null openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.def:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:25 2001
--- openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.def	Thu Aug 23 01:31:50 2001
***************
*** 0 ****
--- 1,7 ----
+ ; GetWebDll.def : Declares the module parameters for the DLL.
+ 
+ LIBRARY      "GetWebDll"
+ DESCRIPTION  'GetWebDll Windows Dynamic Link Library'
+ 
+ EXPORTS
+     ; Explicit exports can go here
Index: openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.dep
diff -c /dev/null openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.dep:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:26 2001
--- openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.dep	Thu Aug 23 01:31:50 2001
***************
*** 0 ****
--- 1,11 ----
+ # Microsoft Developer Studio Generated Dependency File, included by GetWebDll.mak
+ 
+ .\GetWebDll.cpp : \
+ 	".\GetWebDll.h"\
+ 	".\GetWebDllFun.h"\
+ 	
+ 
+ .\StdAfx.cpp : \
+ 	".\StdAfx.h"\
+ 	"c:\program files\microsoft visual studio\vc98\include\basetsd.h"\
+ 	
Index: openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.h
diff -c /dev/null openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.h:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:26 2001
--- openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.h	Thu Aug 23 01:31:50 2001
***************
*** 0 ****
--- 1,67 ----
+ // GetWebDll.h : main header file for the GETWEBDLL DLL
+ //
+ 
+ #if !defined(AFX_GETWEBDLL_H__470FBE70_389E_11D5_A375_00105A6BCA62__INCLUDED_)
+ #define AFX_GETWEBDLL_H__470FBE70_389E_11D5_A375_00105A6BCA62__INCLUDED_
+ 
+ #if _MSC_VER > 1000
+ #pragma once
+ #endif // _MSC_VER > 1000
+ 
+ #ifndef __AFXWIN_H__
+ 	#error include 'stdafx.h' before including this file for PCH
+ #endif
+ 
+ #include "resource.h"		// main symbols
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ // CGetWebDllApp
+ // See GetWebDll.cpp for the implementation of this class
+ //
+ 
+ class CGetWebDllApp : public CWinApp
+ {
+ public:
+ 	CGetWebDllApp();
+ 
+ // Overrides
+ 	// ClassWizard generated virtual function overrides
+ 	//{{AFX_VIRTUAL(CGetWebDllApp)
+ 	//}}AFX_VIRTUAL
+ 
+ 	//{{AFX_MSG(CGetWebDllApp)
+ 		// NOTE - the ClassWizard will add and remove member functions here.
+ 		//    DO NOT EDIT what you see in these blocks of generated code !
+ 	//}}AFX_MSG
+ 	DECLARE_MESSAGE_MAP()
+ };
+ 
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ 
+ //{{AFX_INSERT_LOCATION}}
+ // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+ 
+ class CTearSession : public CInternetSession
+ {
+ public:
+ 	CTearSession(LPCTSTR pszAppName, int nMethod);
+ 	virtual void OnStatusCallback(DWORD dwContext, DWORD dwInternetStatus,
+ 		LPVOID lpvStatusInfomration, DWORD dwStatusInformationLen);
+ };
+ 
+ 
+ class CTearException : public CException
+ {
+ 	DECLARE_DYNCREATE(CTearException)
+ 
+ public:
+ 	CTearException(int nCode = 0);
+ 	~CTearException() { }
+ 
+ 	int m_nErrorCode;
+ };
+ 
+ #endif // !defined(AFX_GETWEBDLL_H__470FBE70_389E_11D5_A375_00105A6BCA62__INCLUDED_)
+ 
+ 
Index: openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.rc
diff -c /dev/null openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.rc:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:26 2001
--- openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDll.rc	Thu Aug 23 01:31:50 2001
***************
*** 0 ****
--- 1,122 ----
+ // Microsoft Visual C++ generated resource script.
+ //
+ #include "resource.h"
+ 
+ #define APSTUDIO_READONLY_SYMBOLS
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // Generated from the TEXTINCLUDE 2 resource.
+ //
+ #include "afxres.h"
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ #undef APSTUDIO_READONLY_SYMBOLS
+ 
+ #ifdef APSTUDIO_INVOKED
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // TEXTINCLUDE
+ //
+ 
+ 1 TEXTINCLUDE DISCARDABLE 
+ BEGIN
+     "resource.h\0"
+ END
+ 
+ 2 TEXTINCLUDE DISCARDABLE 
+ BEGIN
+     "#include ""afxres.h""\r\n"
+     "\0"
+ END
+ 
+ 3 TEXTINCLUDE DISCARDABLE 
+ BEGIN
+     "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
+     "#define _AFX_NO_OLE_RESOURCES\r\n"
+     "#define _AFX_NO_TRACKER_RESOURCES\r\n"
+     "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
+ 	"\r\n"
+ 	"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
+ 	"#ifdef _WIN32\r\n"
+ 	"LANGUAGE 9, 1\r\n"
+ 	"#pragma code_page(1252)\r\n"
+ 	"#endif //_WIN32\r\n"
+ 	"#include ""afxres.rc""  	// Standard components\r\n"
+ 	"#endif\r\n"
+     "\0"
+ END
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ #endif    // APSTUDIO_INVOKED
+ 
+ 
+ 
+ 
+ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+ #ifdef _WIN32
+ LANGUAGE 9, 1
+ #pragma code_page(1252)
+ #endif //_WIN32
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // Version
+ //
+ 
+ VS_VERSION_INFO     VERSIONINFO
+   FILEVERSION       1,0,0,1
+   PRODUCTVERSION    1,0,0,1
+  FILEFLAGSMASK 0x3fL
+ #ifdef _DEBUG
+  FILEFLAGS 0x1L
+ #else
+  FILEFLAGS 0x0L
+ #endif
+  FILEOS 0x4L
+  FILETYPE 0x2L
+  FILESUBTYPE 0x0L
+ BEGIN
+ 	BLOCK "StringFileInfo"
+ 	BEGIN
+         BLOCK "040904B0"
+ 		BEGIN 
+ 			VALUE "CompanyName",     "\0"
+ 			VALUE "FileDescription", "GetWebDll DLL\0"
+ 			VALUE "FileVersion",     "1, 0, 0, 1\0"
+ 			VALUE "InternalName",    "GetWebDll\0"
+ 			VALUE "LegalCopyright",  "Copyright (C) 2001\0"
+ 			VALUE "LegalTrademarks", "\0"
+ 			VALUE "OriginalFilename","GetWebDll.DLL\0"
+ 			VALUE "ProductName",     "GetWebDll Dynamic Link Library\0"
+ 			VALUE "ProductVersion",  "1, 0, 0, 1\0"
+ 		END
+ 	END
+ 	BLOCK "VarFileInfo" 
+ 	BEGIN 
+ 		VALUE "Translation", 0x409, 1200
+     END
+ END
+ 
+ #endif
+ 
+ #ifndef APSTUDIO_INVOKED
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // Generated from the TEXTINCLUDE 3 resource.
+ //
+ #define _AFX_NO_SPLITTER_RESOURCES
+ #define _AFX_NO_OLE_RESOURCES
+ #define _AFX_NO_TRACKER_RESOURCES
+ #define _AFX_NO_PROPERTY_RESOURCES
+ 
+ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+ #ifdef _WIN32
+ LANGUAGE 9, 1
+ #pragma code_page(1252)
+ #endif //_WIN32
+ #include "afxres.rc"  	// Standard components
+ #endif
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ #endif    // not APSTUDIO_INVOKED
+ 
Index: openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDllFun.h
diff -c /dev/null openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDllFun.h:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:26 2001
--- openafs/src/WINNT/afs_setup_utils/GetWebDll/GetWebDllFun.h	Thu Aug 23 01:31:50 2001
***************
*** 0 ****
--- 1,14 ----
+ #ifdef __cplusplus
+ extern "C" {
+ #endif  /* __cplusplus */
+ 
+ __declspec(dllexport) INT GetWebPage(LPSTR lpErrMsg,LPSTR lpFile,LPSTR lpCmdLine);
+ 
+ __declspec(dllexport) INT GetUserLogon(LPSTR lpUserName);
+ 
+ __declspec(dllexport) INT BrowseFile(HWND hwndOwner,LPSTR lpstrTitle,LPSTR lpFileFullName,INT fullsize);
+ 
+ #ifdef __cplusplus
+ }
+ #endif
+ 
Index: openafs/src/WINNT/afs_setup_utils/GetWebDll/Resource.h
diff -c /dev/null openafs/src/WINNT/afs_setup_utils/GetWebDll/Resource.h:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:26 2001
--- openafs/src/WINNT/afs_setup_utils/GetWebDll/Resource.h	Thu Aug 23 01:31:50 2001
***************
*** 0 ****
--- 1,16 ----
+ //{{NO_DEPENDENCIES}}
+ // Microsoft Visual C++ generated include file.
+ // Used by GETWEBDLL.RC
+ //
+ 
+ // Next default values for new objects
+ // 
+ #ifdef APSTUDIO_INVOKED
+ #ifndef APSTUDIO_READONLY_SYMBOLS
+ 
+ #define _APS_NEXT_RESOURCE_VALUE	18000
+ #define _APS_NEXT_CONTROL_VALUE		18000
+ #define _APS_NEXT_SYMED_VALUE		18000
+ #define _APS_NEXT_COMMAND_VALUE		32771
+ #endif
+ #endif
Index: openafs/src/WINNT/afs_setup_utils/GetWebDll/StdAfx.h
diff -c /dev/null openafs/src/WINNT/afs_setup_utils/GetWebDll/StdAfx.h:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:26 2001
--- openafs/src/WINNT/afs_setup_utils/GetWebDll/StdAfx.h	Thu Aug 23 01:31:50 2001
***************
*** 0 ****
--- 1,44 ----
+ // stdafx.h : include file for standard system include files,
+ //  or project specific include files that are used frequently, but
+ //      are changed infrequently
+ //
+ 
+ #if !defined(AFX_STDAFX_H__470FBE72_389E_11D5_A375_00105A6BCA62__INCLUDED_)
+ #define AFX_STDAFX_H__470FBE72_389E_11D5_A375_00105A6BCA62__INCLUDED_
+ 
+ #if _MSC_VER > 1000
+ #pragma once
+ #endif // _MSC_VER > 1000
+ 
+ #define VC_EXTRALEAN		// Exclude rarely-used stuff from Windows headers
+ 
+ #include <afxwin.h>         // MFC core and standard components
+ #include <afxext.h>         // MFC extensions
+ 
+ #ifndef _AFX_NO_OLE_SUPPORT
+ #include <afxole.h>         // MFC OLE classes
+ #include <afxodlgs.h>       // MFC OLE dialog classes
+ #include <afxdisp.h>        // MFC Automation classes
+ #endif // _AFX_NO_OLE_SUPPORT
+ 
+ 
+ #ifndef _AFX_NO_DB_SUPPORT
+ #include <afxdb.h>			// MFC ODBC database classes
+ #endif // _AFX_NO_DB_SUPPORT
+ 
+ #ifndef _AFX_NO_DAO_SUPPORT
+ #include <afxdao.h>			// MFC DAO database classes
+ #endif // _AFX_NO_DAO_SUPPORT
+ 
+ #include <afxdtctl.h>		// MFC support for Internet Explorer 4 Common Controls
+ #ifndef _AFX_NO_AFXCMN_SUPPORT
+ #include <afxcmn.h>			// MFC support for Windows Common Controls
+ #endif // _AFX_NO_AFXCMN_SUPPORT
+ 
+ 
+ //{{AFX_INSERT_LOCATION}}
+ // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+ 
+ #include <afxinet.h>
+ 
+ #endif // !defined(AFX_STDAFX_H__470FBE72_389E_11D5_A375_00105A6BCA62__INCLUDED_)
Index: openafs/src/WINNT/afs_setup_utils/GetWebDll/ntmakefile
diff -c /dev/null openafs/src/WINNT/afs_setup_utils/GetWebDll/ntmakefile:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:26 2001
--- openafs/src/WINNT/afs_setup_utils/GetWebDll/ntmakefile	Thu Aug 23 01:31:50 2001
***************
*** 0 ****
--- 1,115 ----
+ # Microsoft Developer Studio Generated NMAKE File, Based on GetWebDll.dsp
+ !IF "$(OS)" == "Windows_NT"
+ NULL=
+ !ELSE 
+ NULL=nul
+ !ENDIF 
+ 
+ OUTDIR=.
+ INTDIR=.
+ # Begin Custom Macros
+ OutDir=.
+ # End Custom Macros
+ 
+ ALL : "$(OUTDIR)\GetWebDll.dll"
+ 
+ 
+ CLEAN :
+ 	-@erase "$(INTDIR)\GetWebDll.pch"
+ 	-@erase "$(INTDIR)\GetWebDll.res"
+ 	-@erase "$(INTDIR)\*.obj"
+ 	-@erase "$(INTDIR)\vc60.idb"
+ 	-@erase "$(OUTDIR)\GetWebDll.dll"
+ 	-@erase "$(OUTDIR)\GetWebDll.exp"
+ 	-@erase "$(OUTDIR)\GetWebDll.lib"
+ 	-@erase "$(OUTDIR)\GetWebDll.sbl"
+ 	-@erase "$(OUTDIR)\GetWebDll.pjt"
+ 
+ "$(OUTDIR)" :
+     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+ 
+ CPP=cl.exe
+ CPP_PROJ=/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_MBCS" /D "_USRDLL" /Fp"$(INTDIR)\GetWebDll.pch" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
+ 
+ .c{$(INTDIR)}.obj::
+    $(CPP) @<<
+    $(CPP_PROJ) $< 
+ <<
+ 
+ .cpp{$(INTDIR)}.obj::
+    $(CPP) @<<
+    $(CPP_PROJ) $< 
+ <<
+ 
+ .cxx{$(INTDIR)}.obj::
+    $(CPP) @<<
+    $(CPP_PROJ) $< 
+ <<
+ 
+ .c{$(INTDIR)}.sbr::
+    $(CPP) @<<
+    $(CPP_PROJ) $< 
+ <<
+ 
+ .cpp{$(INTDIR)}.sbr::
+    $(CPP) @<<
+    $(CPP_PROJ) $< 
+ <<
+ 
+ .cxx{$(INTDIR)}.sbr::
+    $(CPP) @<<
+    $(CPP_PROJ) $< 
+ <<
+ 
+ MTL=midl.exe
+ MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
+ RSC=rc.exe
+ RSC_PROJ=/l 0x409 /fo"$(INTDIR)\GetWebDll.res" /d "NDEBUG" 
+ BSC32=bscmake.exe
+ BSC32_FLAGS=/nologo /o"$(OUTDIR)\GetWebDll.bsc" 
+ BSC32_SBRS= \
+ 	
+ LINK32=link.exe
+ LINK32_FLAGS=/nologo /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)\GetWebDll.pdb" /machine:I386 /def:".\GetWebDll.def" /out:"$(OUTDIR)\GetWebDll.dll" /implib:"$(OUTDIR)\GetWebDll.lib" 
+ DEF_FILE= \
+ 	".\GetWebDll.def"
+ LINK32_OBJS= \
+ 	"$(INTDIR)\GetWebDll.obj" \
+ 	"$(INTDIR)\StdAfx.obj" \
+ 	"$(INTDIR)\GetWebDll.res"
+ 
+ "$(OUTDIR)\GetWebDll.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+     $(LINK32) @<<
+   $(LINK32_FLAGS) $(LINK32_OBJS)
+ <<
+ 
+ 
+ !IF "$(NO_EXTERNAL_DEPS)" != "1"
+ !IF EXISTS("GetWebDll.dep")
+ !INCLUDE "GetWebDll.dep"
+ !ELSE 
+ !MESSAGE Warning: cannot find "GetWebDll.dep"
+ !ENDIF 
+ !ENDIF 
+ 
+ 
+ SOURCE=.\GetWebDll.cpp
+ 
+ "$(INTDIR)\GetWebDll.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\GetWebDll.pch"
+ 
+ 
+ SOURCE=.\GetWebDll.rc
+ 
+ "$(INTDIR)\GetWebDll.res" : $(SOURCE) "$(INTDIR)"
+ 	$(RSC) $(RSC_PROJ) $(SOURCE)
+ 
+ 
+ SOURCE=.\StdAfx.cpp
+ 
+ CPP_SWITCHES=/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_MBCS" /D "_USRDLL" /Fp"$(INTDIR)\GetWebDll.pch" /Yc"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
+ 
+ "$(INTDIR)\StdAfx.obj"	"$(INTDIR)\GetWebDll.pch" : $(SOURCE) "$(INTDIR)"
+ 	$(CPP) @<<
+   $(CPP_SWITCHES) $(SOURCE)
+ <<
+ 
Index: openafs/src/WINNT/afs_setup_utils/_isuser/_IsUser.RC
diff -c /dev/null openafs/src/WINNT/afs_setup_utils/_isuser/_IsUser.RC:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:26 2001
--- openafs/src/WINNT/afs_setup_utils/_isuser/_IsUser.RC	Thu Aug 23 01:31:51 2001
***************
*** 0 ****
--- 1,188 ----
+ //Microsoft Developer Studio generated resource script.
+ //
+ #include "resource.h"
+ 
+ #define APSTUDIO_READONLY_SYMBOLS
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // Generated from the TEXTINCLUDE 2 resource.
+ //
+ #define APSTUDIO_HIDDEN_SYMBOLS
+ #include "windows.h"
+ #undef APSTUDIO_HIDDEN_SYMBOLS
+ #include "sdrc.h"
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ #undef APSTUDIO_READONLY_SYMBOLS
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ // English (U.S.) resources
+ 
+ #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+ #ifdef _WIN32
+ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+ #pragma code_page(1252)
+ #endif //_WIN32
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // Dialog
+ //
+ 
+ DLG_DRIVEPATH DIALOGEX 0, 0, 332, 218
+ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+ CAPTION "Select Local Drive Mapping"
+ FONT 8, "MS Sans Serif"
+ BEGIN
+     LTEXT           "",52,0,0,332,36
+     LTEXT           "Enable Assignment, choose drive letter and define AFS mount point path.",
+                     901,17,41,289,19,SS_NOPREFIX
+     LTEXT           "Map local drive letter to AFS mount point.",50,10,3,220,
+                     8,0,WS_EX_TRANSPARENT
+     LTEXT           "AFS service can map drive letters to AFS mount points.\nBoth Letters and mounts points can be configured!",
+                     51,17,12,273,22,0,WS_EX_TRANSPARENT
+     CONTROL         "",1301,"Static",SS_ETCHEDHORZ | WS_GROUP,0,36,332,1
+     DEFPUSHBUTTON   "&Next >",SD_PBUT_CONTINUE,215,196,50,14
+     PUSHBUTTON      "Cancel",SD_PBUT_CANCEL,272,196,50,14
+     PUSHBUTTON      "< &Back",SD_PBUT_BACK,166,196,50,14
+     CONTROL         "",SD_STA_IMAGE_2,"Static",SS_BLACKFRAME,54,185,268,1
+     LTEXT           "",7,10,182,40,10,NOT WS_VISIBLE
+     COMBOBOX        IDC_HOMEDRIVELIST,17,151,41,76,CBS_DROPDOWNLIST | 
+                     WS_VSCROLL | WS_GROUP | WS_TABSTOP
+     GROUPBOX        "Root Drive Assignment",IDC_STATIC,2,62,323,52,WS_GROUP
+     EDITTEXT        IDC_HOMEPATH,66,151,258,12,ES_AUTOHSCROLL | 
+                     ES_OEMCONVERT | WS_GROUP
+     LTEXT           "Drive",IDC_STATIC,17,139,17,8
+     LTEXT           "Path",IDC_STATIC,66,139,15,8
+     COMBOBOX        IDC_ROOTDRIVELIST,17,94,40,76,CBS_DROPDOWNLIST | 
+                     WS_VSCROLL | WS_GROUP | WS_TABSTOP
+     GROUPBOX        "Home Drive Assignment",IDC_STATIC,5,117,323,56,WS_GROUP
+     EDITTEXT        IDC_ROOTPATH,66,94,254,12,ES_AUTOHSCROLL | ES_OEMCONVERT | 
+                     WS_GROUP
+     LTEXT           "Drive",IDC_STATIC,17,84,17,8
+     LTEXT           "Path",IDC_STATIC,66,84,15,8
+     LTEXT           "@10550,10551;1;0;;0,128,128   ",1200,0,0,332,36,NOT 
+                     WS_VISIBLE,WS_EX_TRANSPARENT
+     PUSHBUTTON      "C",3,21,200,25,12,NOT WS_VISIBLE | WS_GROUP | NOT 
+                     WS_TABSTOP
+     CONTROL         "Enable Assigment",IDC_ENABLEROOT,"Button",
+                     BS_AUTOCHECKBOX | WS_TABSTOP,5,72,71,10
+     CONTROL         "Enable Assigment",IDC_ENABLEHOME,"Button",
+                     BS_AUTOCHECKBOX | WS_TABSTOP,9,128,71,10
+ END
+ 
+ DLG_CELLSERVDB DIALOGEX 0, 0, 336, 228
+ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
+ CAPTION "Select AFS Cell Data Base (afsdcell.ini)"
+ FONT 8, "MS Sans Serif"
+ BEGIN
+     LTEXT           "",52,0,0,336,36
+     LTEXT           "Select the data base from one of the following source locations.",
+                     901,17,41,289,15,SS_NOPREFIX
+     LTEXT           "Choose Source location:",50,10,3,220,8,0,
+                     WS_EX_TRANSPARENT
+     LTEXT           "AFS Cell Data Base contains the list of available AFS cells and their IP addresses.",
+                     51,17,15,275,19,0,WS_EX_TRANSPARENT
+     CONTROL         "",1301,"Static",SS_ETCHEDHORZ | WS_GROUP,0,36,336,1
+     DEFPUSHBUTTON   "&Next >",SD_PBUT_CONTINUE,215,196,50,14
+     PUSHBUTTON      "Cancel",SD_PBUT_CANCEL,272,196,50,14
+     PUSHBUTTON      "< &Back",SD_PBUT_BACK,166,196,50,14
+     CONTROL         "",SD_STA_IMAGE_2,"Static",SS_BLACKFRAME,54,185,268,1
+     LTEXT           "",7,10,182,40,10,NOT WS_VISIBLE
+     LTEXT           "@10550,10551;1;0;;0,128,128   ",1200,0,0,336,36,NOT 
+                     WS_VISIBLE,WS_EX_TRANSPARENT
+     PUSHBUTTON      "C",3,21,200,25,12,NOT WS_VISIBLE | WS_GROUP | NOT 
+                     WS_TABSTOP
+     PUSHBUTTON      "B&rowse...",IDC_BROWSE,262,160,46,14
+     GROUPBOX        "Download from Web Address",IDC_STATIC,108,115,205,31
+     GROUPBOX        "Select File",IDC_STATIC,108,150,205,31
+     EDITTEXT        IDC_WEB,115,126,180,12,ES_AUTOHSCROLL | ES_OEMCONVERT | 
+                     WS_GROUP
+     GROUPBOX        "Packaged Installation File",IDC_STATIC,108,87,205,23,
+                     WS_GROUP
+     LTEXT           "General.org",IDC_INSTALL,114,96,187,10
+     GROUPBOX        "",IDC_STATIC,90,58,15,124,NOT WS_VISIBLE | WS_GROUP
+     CONTROL         "",IDC_CHECK_INSTALL,"Button",BS_AUTORADIOBUTTON | 
+                     WS_GROUP,94,96,8,10
+     CONTROL         "",IDC_CHECK_WEB,"Button",BS_AUTORADIOBUTTON | WS_GROUP,
+                     94,125,8,10
+     CONTROL         "",IDC_CHECK_BROWSEFILE,"Button",BS_AUTORADIOBUTTON | 
+                     WS_GROUP,94,160,8,10
+     CONTROL         "",IDC_CHECK_PREVIOUSFILE,"Button",BS_AUTORADIOBUTTON | 
+                     WS_GROUP,94,70,8,10
+     LTEXT           "",IDC_PREVIOUSFILE,114,71,189,8
+     GROUPBOX        "Previous Installation",IDC_STATIC,108,58,205,26,
+                     WS_GROUP
+     EDITTEXT        IDC_BROWSEFILE,113,161,142,12,ES_AUTOHSCROLL
+ END
+ 
+ 
+ #ifdef APSTUDIO_INVOKED
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // TEXTINCLUDE
+ //
+ 
+ 1 TEXTINCLUDE DISCARDABLE 
+ BEGIN
+     "resource.h\0"
+ END
+ 
+ 2 TEXTINCLUDE DISCARDABLE 
+ BEGIN
+     "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
+     "#include ""windows.h""\r\n"
+     "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+     "#include ""sdrc.h""\r\n"
+     "\0"
+ END
+ 
+ 3 TEXTINCLUDE DISCARDABLE 
+ BEGIN
+     "\r\n"
+     "\0"
+ END
+ 
+ #endif    // APSTUDIO_INVOKED
+ 
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // Icon
+ //
+ 
+ // Icon with lowest ID value placed first to ensure application icon
+ // remains consistent on all systems.
+ //10000                   ICON    DISCARDABLE     "icon1.ico"
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // DESIGNINFO
+ //
+ 
+ #ifdef APSTUDIO_INVOKED
+ GUIDELINES DESIGNINFO DISCARDABLE 
+ BEGIN
+     DLG_CELLSERVDB, DIALOG
+     BEGIN
+         RIGHTMARGIN, 332
+         BOTTOMMARGIN, 218
+     END
+ END
+ #endif    // APSTUDIO_INVOKED
+ 
+ #endif    // English (U.S.) resources
+ /////////////////////////////////////////////////////////////////////////////
+ 
+ 
+ 
+ #ifndef APSTUDIO_INVOKED
+ /////////////////////////////////////////////////////////////////////////////
+ //
+ // Generated from the TEXTINCLUDE 3 resource.
+ //
+ 
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ #endif    // not APSTUDIO_INVOKED
+ 
Index: openafs/src/WINNT/afs_setup_utils/_isuser/_IsUser.dep
diff -c /dev/null openafs/src/WINNT/afs_setup_utils/_isuser/_IsUser.dep:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:26 2001
--- openafs/src/WINNT/afs_setup_utils/_isuser/_IsUser.dep	Thu Aug 23 01:31:51 2001
***************
*** 0 ****
--- 1,9 ----
+ # Microsoft Developer Studio Generated Dependency File, included by _IsUser.mak
+ 
+ .\_isuser.c : \
+ 	"c:\program files\microsoft visual studio\vc98\include\basetsd.h"\
+ 	
+ 
+ .\_Isuser.RC : \
+ 	".\SDRC.H"\
+ 	
Index: openafs/src/WINNT/afs_setup_utils/_isuser/_isuser.c
diff -c /dev/null openafs/src/WINNT/afs_setup_utils/_isuser/_isuser.c:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:26 2001
--- openafs/src/WINNT/afs_setup_utils/_isuser/_isuser.c	Thu Aug 23 01:31:51 2001
***************
*** 0 ****
--- 1,21 ----
+ 
+ ////////////////////////////////////////////////////////////////////////////////
+ //                                                                            
+ //  IIIIIII SSSSSS                                                            
+ //    II    SS                          InstallShield (R)                     
+ //    II    SSSSSS      (c) 1996-2000, InstallShield Software Corporation     
+ //    II        SS      (c) 1990-1996, InstallShield Corporation              
+ //  IIIIIII SSSSSS                     All Rights Reserved.                   
+ //                                                                            
+ //                                                                            
+ ////////////////////////////////////////////////////////////////////////////////
+ 
+ #define NOCOMM
+ #include <windows.h>
+ 
+ 
+ BOOL WINAPI DllMain( PVOID hmod, ULONG ulReason, PCONTEXT pctx )
+ {
+         return TRUE;
+ }
+ 
Index: openafs/src/WINNT/afs_setup_utils/_isuser/ntmakefile
diff -c /dev/null openafs/src/WINNT/afs_setup_utils/_isuser/ntmakefile:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:26 2001
--- openafs/src/WINNT/afs_setup_utils/_isuser/ntmakefile	Thu Aug 23 01:31:51 2001
***************
*** 0 ****
--- 1,100 ----
+ # Microsoft Developer Studio Generated NMAKE File, Based on _IsUser.dsp
+ !IF "$(OS)" == "Windows_NT"
+ NULL=
+ !ELSE 
+ NULL=nul
+ !ENDIF 
+ 
+ OUTDIR=.
+ INTDIR=.
+ # Begin Custom Macros
+ OutDir=.
+ # End Custom Macros
+ 
+ ALL : "$(OUTDIR)\_IsUser.dll"
+ 
+ 
+ CLEAN :
+ 	-@erase "$(INTDIR)\_isuser.obj"
+ 	-@erase "$(INTDIR)\_Isuser.res"
+ 	-@erase "$(INTDIR)\vc60.idb"
+ 	-@erase "$(OUTDIR)\_IsUser.dll"
+ 	-@erase "$(OUTDIR)\_IsUser.exp"
+ 	-@erase "$(OUTDIR)\_IsUser.lib"
+ 	-@erase "$(OUTDIR)\*.pch"
+ 
+ "$(OUTDIR)" :
+     if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+ 
+ CPP=cl.exe
+ CPP_PROJ=/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "_ISUSER_EXPORTS" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
+ 
+ .c{$(INTDIR)}.obj::
+    $(CPP) @<<
+    $(CPP_PROJ) $< 
+ <<
+ 
+ .cpp{$(INTDIR)}.obj::
+    $(CPP) @<<
+    $(CPP_PROJ) $< 
+ <<
+ 
+ .cxx{$(INTDIR)}.obj::
+    $(CPP) @<<
+    $(CPP_PROJ) $< 
+ <<
+ 
+ .c{$(INTDIR)}.sbr::
+    $(CPP) @<<
+    $(CPP_PROJ) $< 
+ <<
+ 
+ .cpp{$(INTDIR)}.sbr::
+    $(CPP) @<<
+    $(CPP_PROJ) $< 
+ <<
+ 
+ .cxx{$(INTDIR)}.sbr::
+    $(CPP) @<<
+    $(CPP_PROJ) $< 
+ <<
+ 
+ MTL=midl.exe
+ MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
+ RSC=rc.exe
+ RSC_PROJ=/l 0x409 /fo"$(INTDIR)\_Isuser.res" /d "NDEBUG" 
+ BSC32=bscmake.exe
+ BSC32_FLAGS=/nologo /o"$(OUTDIR)\_IsUser.bsc" 
+ BSC32_SBRS= \
+ 	
+ LINK32=link.exe
+ LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\_IsUser.pdb" /machine:I386 /out:"$(OUTDIR)\_IsUser.dll" /implib:"$(OUTDIR)\_IsUser.lib" 
+ LINK32_OBJS= \
+ 	"$(INTDIR)\_isuser.obj" \
+ 	"$(INTDIR)\_Isuser.res"
+ 
+ "$(OUTDIR)\_IsUser.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+     $(LINK32) @<<
+   $(LINK32_FLAGS) $(LINK32_OBJS)
+ <<
+ 
+ 
+ !IF "$(NO_EXTERNAL_DEPS)" != "1"
+ !IF EXISTS("_IsUser.dep")
+ !INCLUDE "_IsUser.dep"
+ !ELSE 
+ !MESSAGE Warning: cannot find "_IsUser.dep"
+ !ENDIF 
+ !ENDIF 
+ 
+ 
+ SOURCE=.\_isuser.c
+ 
+ "$(INTDIR)\_isuser.obj" : $(SOURCE) "$(INTDIR)"
+ 
+ 
+ SOURCE=.\_Isuser.RC
+ 
+ "$(INTDIR)\_Isuser.res" : $(SOURCE) "$(INTDIR)"
+ 	$(RSC) $(RSC_PROJ) $(SOURCE)
+ 
Index: openafs/src/WINNT/afs_setup_utils/_isuser/resource.h
diff -c /dev/null openafs/src/WINNT/afs_setup_utils/_isuser/resource.h:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:26 2001
--- openafs/src/WINNT/afs_setup_utils/_isuser/resource.h	Thu Aug 23 01:31:51 2001
***************
*** 0 ****
--- 1,38 ----
+ //{{NO_DEPENDENCIES}}
+ // Microsoft Developer Studio generated include file.
+ // Used by _IsUser.RC
+ //
+ #define IDC_HOMEPATH                    301
+ #define IDC_ROOTPATH                    302
+ #define IDC_HOMEDRIVELIST               1007
+ #define IDC_ROOTDRIVELIST               1008
+ #define IDC_ENABLEROOT                  1010
+ #define IDC_ENABLEHOME                  1011
+ #define IDC_INSTALL                     1011
+ #define IDC_WEB                         1016
+ #define IDC_CHECK_INSTALL               1018
+ #define IDC_CHECK_WEB                   1019
+ #define IDC_CHECK_FILE                  1020
+ #define IDC_CHECK_BROWSEFILE            1020
+ #define IDC_CHECK_DEFAULT               1021
+ #define IDC_CHECK_PREVIOUSFILE          1021
+ #define IDC_PREVIOUSFILE                1024
+ #define IDC_BROWSE                      1025
+ #define IDC_BROWSEFILE                  1026
+ #define DLG_TEMPLATE                    13029
+ #define DLG_DRIVEPATH                   13030
+ #define DLG_CELLSERVDB                  13031
+ #define IDC_PATH                        13032
+ #define IDC_STATIC                      -1
+ 
+ // Next default values for new objects
+ // 
+ #ifdef APSTUDIO_INVOKED
+ #ifndef APSTUDIO_READONLY_SYMBOLS
+ #define _APS_NO_MFC                     1
+ #define _APS_NEXT_RESOURCE_VALUE        104
+ #define _APS_NEXT_COMMAND_VALUE         40001
+ #define _APS_NEXT_CONTROL_VALUE         1028
+ #define _APS_NEXT_SYMED_VALUE           101
+ #endif
+ #endif
Index: openafs/src/WINNT/install/InstallShield5/Default.rge
diff -c openafs/src/WINNT/install/InstallShield5/Default.rge:1.2 openafs/src/WINNT/install/InstallShield5/Default.rge:removed
*** openafs/src/WINNT/install/InstallShield5/Default.rge:1.2	Sat Jun 23 13:26:08 2001
--- openafs/src/WINNT/install/InstallShield5/Default.rge	Thu Aug 23 01:47:33 2001
***************
*** 1,277 ****
- [Client]
- ---Comment---=
- ---FileGroup---=
- HKLM0=Software\TransarcCorporation\AFS Client\CurrentVersion
- HKLM1=Software\TransarcCorporation\AFS Client
- HKLM2=Software\TransarcCorporation\AFS Client\1.0 4.01
- HKLM3=SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon
- HKCR0=CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}
- HKLM4=SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
- HKCR1=CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32
- HKLM5=SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider
- HKCR2=*\shellex\ContextMenuHandlers\AFS Client Shell Extension
- HKCR3=FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension
- HKLM6=SYSTEM\CurrentControlSet\Services\NetBT\Parameters
- 
- [Client:HKCR:*\shellex\ContextMenuHandlers\AFS Client Shell Extension]
- ---Comment---=
- (Default)=S,{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}
- 
- [Client:HKCR:CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32]
- ---Comment---=
- (Default)=S,<TARGETDIR>\Client\Program\afs_shl_ext.dll
- ThreadingModel=S,Apartment
- 
- [Client:HKLM:SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]
- Cell=S,
- ---Comment---=
- (Default)=S,
- 
- [Client:HKLM:SYSTEM\CurrentControlSet\Services\NetBT\Parameters]
- SMBDeviceEnabled=N,0
- 
- [Server:HKLM:System\CurrentControlSet\Services\EventLog\Application\AFS Service]
- (Default)=S,
- ---Comment---=
- EventMessageFile=S,<EVENT_MSG_DLL>
- TypesSupported=N,7
- 
- [Server]
- ---Comment---=
- ---FileGroup---=
- HKLM0=Software\TransarcCorporation\AFS Server\CurrentVersion
- HKLM1=System\CurrentControlSet\Services\EventLog\Application\AFS Service
- HKLM2=Software\TransarcCorporation\AFS Server
- HKLM3=Software\TransarcCorporation\AFS Server\1.0 4.01
- 
- [WinNT_Client_NoUninstall:HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\File Manager\AddOns]
- ---Comment---=
- (Default)=S,
- AFS Client FME=S,<TARGETDIR>\Client\Program\afs_fme.dll
- 
- [Control_Center]
- ---Comment---=
- ---FileGroup---=
- HKLM0=Software\TransarcCorporation\AFS Control Center\CurrentVersion
- HKLM1=Software\TransarcCorporation\AFS Control Center
- HKLM2=Software\TransarcCorporation\AFS Control Center\1.0 4.01
- 
- [Client:HKLM:Software\TransarcCorporation\AFS Client\1.0 4.01]
- PatchLevel=N,401
- BetaLevel=N,1
- Revision=N,0
- ---Comment---=
- (Default)=S,
- MajorVersion=N,1
- Title=S,<CLIENT_TITLE>
- InstallDateString=S,<INSTALL_DATE>
- PathName=S,<TARGETDIR>\Client
- Software Type=S,File System
- MinorVersion=N,0
- ReleaseType=S,<RELEASE_TYPE>
- VersionString=S,1.0 4.01
- Description=S,<CLIENT_DESC>
- 
- [Client_NoUninstall]
- ---Comment---=
- ---FileGroup---=
- HKLM0=SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved
- 
- [Client:HKLM:SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon]
- (Default)=S,
- ---Comment---=
- 
- [Light_Client:HKLM:SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]
- ---Comment---=
- (Default)=S,
- Gateway=S,
- 
- [Control_Center:HKLM:Software\TransarcCorporation\AFS Control Center\1.0 4.01]
- PatchLevel=N,401
- BetaLevel=N,1
- Revision=N,0
- ---Comment---=
- (Default)=S,
- MajorVersion=N,1
- InstallDateString=S,<INSTALL_DATE>
- PathName=S,<TARGETDIR>\Control Center
- Software Type=S,File System
- MinorVersion=N,0
- ReleaseType=S,<RELEASE_TYPE>
- VersionString=S,1.0 4.01
- Description=S,AFS Control Center for Windows NT
- 
- [Client_NoUninstall:HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved]
- {DC515C27-6CAC-11D1-BAE7-00C04FD140D2}=S,AFS Client Shell Extension
- (Default)=S,
- ---Comment---=
- 
- [Control_Center:HKLM:Software\TransarcCorporation\AFS Control Center]
- ---Comment---=
- (Default)=S,
- 
- [Control_Center:HKLM:Software\TransarcCorporation\AFS Control Center\CurrentVersion]
- PatchLevel=N,401
- BetaLevel=N,1
- Revision=N,0
- ---Comment---=
- (Default)=S,
- MajorVersion=N,1
- InstallDateString=S,<INSTALL_DATE>
- PathName=S,<TARGETDIR>\Control Center
- Software Type=S,File System
- MinorVersion=N,0
- ReleaseType=S,<RELEASE_TYPE>
- VersionString=S,1.0 4.01
- Description=S,AFS Control Center for Windows NT
- 
- [Light_Client]
- ---Comment---=
- ---FileGroup---=
- HKLM0=SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
- 
- [Full_Client:HKLM:SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]
- ---Comment---=
- (Default)=S,
- IsGateway=N,0
- 
- [Server:HKLM:Software\TransarcCorporation\AFS Server]
- ---Comment---=
- (Default)=S,
- 
- [Docs]
- ---Comment---=
- ---FileGroup---=
- HKLM0=Software\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion
- HKLM1=Software\TransarcCorporation\AFS Supplemental Documentation
- HKLM2=Software\TransarcCorporation\AFS Supplemental Documentation\1.0 4.01
- 
- [Data]
- Set0=Server
- Set1=Client
- Set2=Control_Center
- Set3=Client_NoUninstall
- Set4=WinNT_Client_NoUninstall
- Set5=Light_Client
- Set6=Full_Client
- Set7=Docs
- 
- [Client:HKLM:Software\TransarcCorporation\AFS Client\CurrentVersion]
- PatchLevel=N,401
- BetaLevel=N,1
- Revision=N,0
- ---Comment---=
- (Default)=S,
- MajorVersion=N,1
- Title=S,<CLIENT_TITLE>
- InstallDateString=S,<INSTALL_DATE>
- PathName=S,<TARGETDIR>\Client
- Software Type=S,File System
- MinorVersion=N,0
- ReleaseType=S,<RELEASE_TYPE>
- VersionString=S,1.0 4.01
- Description=S,<CLIENT_DESC>
- 
- [Full_Client]
- ---Comment---=
- ---FileGroup---=
- HKLM0=SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
- 
- [Docs:HKLM:Software\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion]
- PatchLevel=N,401
- BetaLevel=N,1
- Revision=N,0
- ---Comment---=
- (Default)=S,
- MajorVersion=N,1
- InstallDateString=S,<INSTALL_DATE>
- PathName=S,<TARGETDIR>\Documentation
- Software Type=S,File System
- MinorVersion=N,0
- ReleaseType=S,<RELEASE_TYPE>
- VersionString=S,1.0 4.01
- Description=S,AFS System Administration Documentation
- 
- [Server:HKLM:Software\TransarcCorporation\AFS Server\1.0 4.01]
- PatchLevel=N,401
- BetaLevel=N,1
- Revision=N,0
- ---Comment---=
- (Default)=S,
- MajorVersion=N,1
- InstallDateString=S,<INSTALL_DATE>
- PathName=S,<TARGETDIR>\Server
- Software Type=S,File System
- MinorVersion=N,0
- ReleaseType=S,<RELEASE_TYPE>
- VersionString=S,1.0 4.01
- Description=S,AFS Server for Windows NT
- 
- [Client:HKLM:SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]
- (Default)=S,
- ---Comment---=
- Class=N,2
- Name=S,TransarcAFSDaemon
- ProviderPath=S,<LOGON_DLL>
- AuthentProviderPath=S,<LOGON_DLL>
- 
- [WinNT_Client_NoUninstall:HKLM:SOFTWARE\Microsoft\Windows NT\Current Version\File Manager\AddOns]
- (Default)=S,
- ---Comment---=
- AFS Client FME=S,<TARGETDIR>\Client\Program\afs_fme.dll
- 
- [Client:HKLM:Software\TransarcCorporation\AFS Client]
- ---Comment---=
- (Default)=S,
- 
- [WinNT_Client_NoUninstall]
- ---Comment---=
- ---FileGroup---=
- HKLM0=SOFTWARE\Microsoft\Windows NT\CurrentVersion\File Manager\AddOns
- 
- [Docs:HKLM:Software\TransarcCorporation\AFS Supplemental Documentation\1.0 4.01]
- PatchLevel=N,401
- BetaLevel=N,1
- Revision=N,0
- ---Comment---=
- (Default)=S,
- MajorVersion=N,1
- InstallDateString=S,<INSTALL_DATE>
- PathName=S,<TARGETDIR>\Documentation
- Software Type=S,File System
- MinorVersion=N,0
- ReleaseType=S,<RELEASE_TYPE>
- VersionString=S,1.0 4.01
- Description=S,AFS System Administration Documentation
- 
- [General]
- Type=REGISTRYDATA
- Version=1.00.000
- 
- [Client:HKCR:FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension]
- ---Comment---=
- (Default)=S,{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}
- 
- [Server:HKLM:Software\TransarcCorporation\AFS Server\CurrentVersion]
- PatchLevel=N,401
- BetaLevel=N,1
- Revision=N,0
- ---Comment---=
- (Default)=S,
- MajorVersion=N,1
- InstallDateString=S,<INSTALL_DATE>
- PathName=S,<TARGETDIR>\Server
- Software Type=S,File System
- MinorVersion=N,0
- ReleaseType=S,<RELEASE_TYPE>
- VersionString=S,1.0 4.01
- Description=S,AFS Server for Windows NT
- 
- [Client:HKCR:CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}]
- ---Comment---=
- (Default)=S,AFS Client Shell Extension
- 
- [Docs:HKLM:Software\TransarcCorporation\AFS Supplemental Documentation]
- ---Comment---=
- (Default)=S,
- 
--- 0 ----
Index: openafs/src/WINNT/install/InstallShield5/Default.shl
diff -c openafs/src/WINNT/install/InstallShield5/Default.shl:1.1 openafs/src/WINNT/install/InstallShield5/Default.shl:1.1.8.1
*** openafs/src/WINNT/install/InstallShield5/Default.shl:1.1	Fri Nov  3 21:21:24 2000
--- openafs/src/WINNT/install/InstallShield5/Default.shl	Thu Aug 23 01:31:51 2001
***************
*** 271,276 ****
--- 271,281 ----
  Entry103=CLIENT_GROUP_NAME
  Entry104=CCENTER_GROUP_NAME
  Entry105=LIGHT_GROUP_NAME
+ Entry106=CELLNAME_DEFAULT
+ Entry107=WELCOME_MESSAGE
+ Entry108=CELLSERVDB_WEB
+ Entry109=CELLSERVDB_INSTALL
+ Entry110=CELLSERVDB_CONFIGNAME
  
  [CONFIGURING_AFS_CREDS]
  Comment=
***************
*** 431,434 ****
--- 436,454 ----
  
  [LIGHT_GROUP_NAME]
  Comment=
+ 
+ [CELLNAME_DEFAULT]
+ Comment=Default Cell name
+ 
+ [WELCOME_MESSAGE]
+ Comment=Display in Welcome Box
+ 
+ [CELLSERVDB_WEB]
+ Comment=Web address to load cellservdb
+ 
+ [CELLSERVDB_INSTALL]
+ Comment=Source file for installable Cellservdb
+ 
+ [CELLSERVDB_CONFIGNAME]
+ Comment=Cellservdb file name
  
Index: openafs/src/WINNT/install/InstallShield5/Default.txt
diff -c /dev/null openafs/src/WINNT/install/InstallShield5/Default.txt:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:33 2001
--- openafs/src/WINNT/install/InstallShield5/Default.txt	Thu Aug 23 01:31:51 2001
***************
*** 0 ****
--- 1,272 ----
+ [Client:HKLM:SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]
+ Cell=S,CELLNAME_DEFAULT
+ (Default)=S,
+ ---Comment---=
+ 
+ [Client:HKCR:CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32]
+ (Default)=S,<TARGETDIR>\Client\Program\afs_shl_ext.dll
+ ---Comment---=
+ ThreadingModel=S,Apartment
+ 
+ [Client:HKCR:*\shellex\ContextMenuHandlers\AFS Client Shell Extension]
+ (Default)=S,{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}
+ ---Comment---=
+ 
+ [WinNT_Client_NoUninstall:HKLM:SOFTWARE\Microsoft\Windows NT\CurrentVersion\File Manager\AddOns]
+ (Default)=S,
+ ---Comment---=
+ AFS Client FME=S,<TARGETDIR>\Client\Program\afs_fme.dll
+ 
+ [Server]
+ ---Comment---=
+ ---FileGroup---=
+ HKLM0=Software\TransarcCorporation\AFS Server\CurrentVersion
+ HKLM1=System\CurrentControlSet\Services\EventLog\Application\AFS Service
+ HKLM2=Software\TransarcCorporation\AFS Server
+ HKLM3=Software\TransarcCorporation\AFS Server\%1.%2 %3.%4
+ 
+ [Server:HKLM:System\CurrentControlSet\Services\EventLog\Application\AFS Service]
+ ---Comment---=
+ (Default)=S,
+ EventMessageFile=S,<EVENT_MSG_DLL>
+ TypesSupported=N,7
+ 
+ [Control_Center]
+ ---Comment---=
+ ---FileGroup---=
+ HKLM0=Software\TransarcCorporation\AFS Control Center\CurrentVersion
+ HKLM1=Software\TransarcCorporation\AFS Control Center
+ HKLM2=Software\TransarcCorporation\AFS Control Center\%1.%2 %3.%4
+ 
+ [Light_Client:HKLM:SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]
+ (Default)=S,
+ ---Comment---=
+ Gateway=S,
+ 
+ [Client:HKLM:SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon]
+ ---Comment---=
+ (Default)=S,
+ 
+ [Client_NoUninstall]
+ ---Comment---=
+ ---FileGroup---=
+ HKLM0=SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved
+ 
+ [Control_Center:HKLM:Software\TransarcCorporation\AFS Control Center]
+ (Default)=S,
+ ---Comment---=
+ 
+ [Client_NoUninstall:HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved]
+ ---Comment---=
+ (Default)=S,
+ {DC515C27-6CAC-11D1-BAE7-00C04FD140D2}=S,AFS Client Shell Extension
+ 
+ [Server:HKLM:Software\TransarcCorporation\AFS Server\%1.%2 %3.%4]
+ Revision=N,0
+ PatchLevel=N,%3%4
+ (Default)=S,
+ ---Comment---=
+ MajorVersion=N,%1
+ InstallDateString=S,<INSTALL_DATE>
+ PathName=S,<TARGETDIR>\Server
+ BetaLevel=N,1
+ Software Type=S,File System
+ MinorVersion=N,%2
+ ReleaseType=S,<RELEASE_TYPE>
+ VersionString=S,%5
+ Description=S,AFS Server for Windows NT
+ 
+ [Light_Client]
+ ---Comment---=
+ ---FileGroup---=
+ HKLM0=SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
+ 
+ [Control_Center:HKLM:Software\TransarcCorporation\AFS Control Center\CurrentVersion]
+ Revision=N,0
+ PatchLevel=N,%3%4
+ (Default)=S,
+ ---Comment---=
+ MajorVersion=N,%1
+ InstallDateString=S,<INSTALL_DATE>
+ PathName=S,<TARGETDIR>\Control Center
+ BetaLevel=N,1
+ Software Type=S,File System
+ MinorVersion=N,%2
+ ReleaseType=S,<RELEASE_TYPE>
+ VersionString=S,%5
+ Description=S,AFS Control Center for Windows NT
+ 
+ [Docs:HKLM:Software\TransarcCorporation\AFS Supplemental Documentation\%1.%2 %3.%4]
+ Revision=N,0
+ PatchLevel=N,%3%4
+ (Default)=S,
+ ---Comment---=
+ MajorVersion=N,%1
+ InstallDateString=S,<INSTALL_DATE>
+ PathName=S,<TARGETDIR>\Documentation
+ BetaLevel=N,1
+ Software Type=S,File System
+ MinorVersion=N,%2
+ ReleaseType=S,<RELEASE_TYPE>
+ VersionString=S,%5
+ Description=S,AFS System Administration Documentation
+ 
+ [Full_Client:HKLM:SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]
+ (Default)=S,
+ ---Comment---=
+ IsGateway=N,0
+ 
+ [Docs]
+ ---Comment---=
+ ---FileGroup---=
+ HKLM0=Software\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion
+ HKLM1=Software\TransarcCorporation\AFS Supplemental Documentation
+ HKLM2=Software\TransarcCorporation\AFS Supplemental Documentation\%1.%2 %3.%4
+ 
+ [Server:HKLM:Software\TransarcCorporation\AFS Server]
+ (Default)=S,
+ ---Comment---=
+ 
+ [Client]
+ ---Comment---=
+ ---FileGroup---=
+ HKLM0=Software\TransarcCorporation\AFS Client\CurrentVersion
+ HKLM1=Software\TransarcCorporation\AFS Client
+ HKLM2=Software\TransarcCorporation\AFS Client\%1.%2 %3.%4
+ HKCR0=CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}
+ HKLM3=SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon
+ HKCR1=CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32
+ HKLM4=SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
+ HKCR2=*\shellex\ContextMenuHandlers\AFS Client Shell Extension
+ HKLM5=SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider
+ HKCR3=FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension
+ 
+ [Data]
+ Set0=Server
+ Set1=Client
+ Set2=Control_Center
+ Set3=Client_NoUninstall
+ Set4=WinNT_Client_NoUninstall
+ Set5=Light_Client
+ Set6=Full_Client
+ Set7=Docs
+ 
+ [Docs:HKLM:Software\TransarcCorporation\AFS Supplemental Documentation\CurrentVersion]
+ Revision=N,0
+ PatchLevel=N,%3%4
+ (Default)=S,
+ ---Comment---=
+ MajorVersion=N,%1
+ InstallDateString=S,<INSTALL_DATE>
+ PathName=S,<TARGETDIR>\Documentation
+ BetaLevel=N,1
+ Software Type=S,File System
+ MinorVersion=N,%2
+ ReleaseType=S,<RELEASE_TYPE>
+ VersionString=S,%5
+ Description=S,AFS System Administration Documentation
+ 
+ [Full_Client]
+ ---Comment---=
+ ---FileGroup---=
+ HKLM0=SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
+ 
+ [Client:HKLM:Software\TransarcCorporation\AFS Client\CurrentVersion]
+ Revision=N,0
+ PatchLevel=N,%3%4
+ (Default)=S,
+ ---Comment---=
+ Title=S,<CLIENT_TITLE>
+ MajorVersion=N,%1
+ InstallDateString=S,<INSTALL_DATE>
+ PathName=S,<TARGETDIR>\Client
+ BetaLevel=N,1
+ Software Type=S,File System
+ MinorVersion=N,%2
+ ReleaseType=S,<RELEASE_TYPE>
+ VersionString=S,%5
+ Description=S,<CLIENT_DESC>
+ 
+ [Client:HKLM:Software\TransarcCorporation\AFS Client]
+ (Default)=S,
+ ---Comment---=
+ 
+ [WinNT_Client_NoUninstall:HKLM:SOFTWARE\Microsoft\Windows NT\Current Version\File Manager\AddOns]
+ ---Comment---=
+ (Default)=S,
+ AFS Client FME=S,<TARGETDIR>\Client\Program\afs_fme.dll
+ 
+ [Client:HKLM:SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]
+ ---Comment---=
+ (Default)=S,
+ Class=N,2
+ Name=S,TransarcAFSDaemon
+ ProviderPath=S,<LOGON_DLL>
+ AuthentProviderPath=S,<LOGON_DLL>
+ 
+ [WinNT_Client_NoUninstall]
+ ---Comment---=
+ ---FileGroup---=
+ HKLM0=SOFTWARE\Microsoft\Windows NT\CurrentVersion\File Manager\AddOns
+ 
+ [Client:HKCR:FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension]
+ (Default)=S,{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}
+ ---Comment---=
+ 
+ [General]
+ Type=REGISTRYDATA
+ Version=1.00.000
+ 
+ [Client:HKLM:Software\TransarcCorporation\AFS Client\%1.%2 %3.%4]
+ Revision=N,0
+ PatchLevel=N,%3%4
+ (Default)=S,
+ ---Comment---=
+ Title=S,<CLIENT_TITLE>
+ MajorVersion=N,%1
+ InstallDateString=S,<INSTALL_DATE>
+ PathName=S,<TARGETDIR>\Client
+ BetaLevel=N,1
+ Software Type=S,File System
+ MinorVersion=N,%2
+ ReleaseType=S,<RELEASE_TYPE>
+ VersionString=S,%5
+ Description=S,<CLIENT_DESC>
+ 
+ [Server:HKLM:Software\TransarcCorporation\AFS Server\CurrentVersion]
+ Revision=N,0
+ PatchLevel=N,%3%4
+ (Default)=S,
+ ---Comment---=
+ MajorVersion=N,%1
+ InstallDateString=S,<INSTALL_DATE>
+ PathName=S,<TARGETDIR>\Server
+ BetaLevel=N,1
+ Software Type=S,File System
+ MinorVersion=N,%2
+ ReleaseType=S,<RELEASE_TYPE>
+ VersionString=S,%5
+ Description=S,AFS Server for Windows NT
+ 
+ [Control_Center:HKLM:Software\TransarcCorporation\AFS Control Center\%1.%2 %3.%4]
+ Revision=N,0
+ PatchLevel=N,%3%4
+ (Default)=S,
+ ---Comment---=
+ MajorVersion=N,%1
+ InstallDateString=S,<INSTALL_DATE>
+ PathName=S,<TARGETDIR>\Control Center
+ BetaLevel=N,1
+ Software Type=S,File System
+ MinorVersion=N,%2
+ ReleaseType=S,<RELEASE_TYPE>
+ VersionString=S,%5
+ Description=S,AFS Control Center for Windows NT
+ 
+ [Docs:HKLM:Software\TransarcCorporation\AFS Supplemental Documentation]
+ (Default)=S,
+ ---Comment---=
+ 
+ [Client:HKCR:CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}]
+ (Default)=S,AFS Client Shell Extension
+ ---Comment---=
Index: openafs/src/WINNT/install/InstallShield5/GatherFiles.bat
diff -c openafs/src/WINNT/install/InstallShield5/GatherFiles.bat:1.2 openafs/src/WINNT/install/InstallShield5/GatherFiles.bat:1.2.4.1
*** openafs/src/WINNT/install/InstallShield5/GatherFiles.bat:1.2	Sat Nov  4 05:03:03 2000
--- openafs/src/WINNT/install/InstallShield5/GatherFiles.bat	Thu Aug 23 01:31:51 2001
***************
*** 23,28 ****
--- 23,31 ----
  
  copy "Setup Files\Uncompressed Files\Language Independent\OS Independent\setup.bmp" .
  
+ 
+ copy "Setup Files\Uncompressed Files\Language Independent\OS Independent\_isuser.dll" .
+ 
  copy "Shell Objects\Default.shl" .\Default.shell
  
  copy "String Tables\Default.shl" .
Index: openafs/src/WINNT/install/InstallShield5/HowToSetTheVersion.txt
diff -c openafs/src/WINNT/install/InstallShield5/HowToSetTheVersion.txt:1.2 openafs/src/WINNT/install/InstallShield5/HowToSetTheVersion.txt:1.2.4.1
*** openafs/src/WINNT/install/InstallShield5/HowToSetTheVersion.txt:1.2	Sat Nov  4 05:03:03 2000
--- openafs/src/WINNT/install/InstallShield5/HowToSetTheVersion.txt	Thu Aug 23 01:31:51 2001
***************
*** 1,127 ****
  Copyright 2000, International Business Machines Corporation and others.
  All Rights Reserved.
- 
  This software has been released under the terms of the IBM Public
  License.  For details, see the LICENSE file in the top-level source
  directory or online at http://www.openafs.org/dl/license10.html
- 
  HOW TO SET THE AFS FOR WINDOWS VERSION INFORMATION
- 
- 
- DECIDE WHAT THE VERSION INFO SHOULD BE
- 
- First decide what the version information should be.  There are
- the following values that will need to be set:
- 
- MajorVersion
- MinorVersion
- PatchLevel
- BetaLevel
- ReleaseType
- Title (called VersionString in the registry)
- 
- MajorVersion is the first number in a dotted version scheme.  For 
- example, if the version is 3.5, then MajorVersion is set to 3.
- 
- MinorVersion is the second number in a dotted version scheme.  For
- example, if the version is 3.5, then MinorVersion is set to 5.
- 
- PatchLevel is an integer number representing the patch level.  If
- the patch level is 4, then PatchLevel is set to 400.  If the patch 
- level is 3.32, then PatchLevel is set to 332.  The reason patch
- numbers aren't just 1, 2, etc., is that they are currently set to
- the cml configuration number of the build used to produce the patch.
- We may later switch to just making the patch level a single digit,
- in which case the PatchLevel value must be set to something big
- enough so that in a comparison with the old patch levels, it will
- evaluate as bigger.  So if you want a patch level of 4, use a 
- PatchLevel setting of 400.  If this is not a patch release, then
- set PatchLevel to 0.
- 
- BetaLevel is an integer number representing the beta level.  This is
- just a way to have multiple beta releases.  So if this is the first
- beta release, set BetaLevel to 1.  If this is not a beta release,
- then set BetaLevel to 0.
- 
- ReleaseType is kind of redundant; it is set to the string "GA" if 
- this is a non-beta release and "Beta" if this is a beta release.
- 
- Title is the product version as a full string.  So if this is
- release 3.5 3.22, then Title is set to "3.5 3.22".  If this is
- 3.6 Beta 2, then Title is set to "3.6 Beta 2".
- 
- Title is used when showing the version to the user, like, for
- example, in the afs creds tool.
- 
- ************************* NOTE ******************************
- You MUST set all of these values correctly and in a consistent
- manner from one release to the next so that the installer can
- properly determine whether to perform upgrades, downgrades, or
- reinstalls.
- 
- Look at the function CompareVersions in file setup.rul to see
- how these values are used to make version info decisions.
- 
- 
- SET THE VERSION IN THE INSTALLSHIELD FILES
- 
- You will need to edit the following InstallShield files:
- 
- value.shl:
- 
- This file contains all of the strings used by the program.  Set
- all of the following identifiers to the new version number:
- 
- TITLE_MAIN
- UNINST_DISPLAY_NAME_CC
- UNINST_DISPLAY_NAME_CLIENT
- UNINST_DISPLAY_NAME_DOCS
- UNINST_DISPLAY_NAME_LIGHT_CLIENT
- UNINST_DISPLAY_NAME_SERVER
- 
- These identifiers below correspond to the version information
- discussed in the first section above.
- 
- PRODUCT_VERSION_MAJOR
- PRODUCT_VERSION_MINOR
- PRODUCT_VERSION_PATCH_LEVEL
- PRODUCT_VERSION_BETA_LEVEL
- PRODUCT_VERSION_RELEASE_TYPE
- PRODUCT_VERSION_TITLE
- 
- Default.rge:
- 
- This file contains information that will be written to the registry
- at install time.
- 
- Change all occurances of the following to the proper verison info:
- 
- MajorVersion (set to same value as PRODUCT_VERSION_MAJOR in value.shl)
- MinorVersion (set to same value as PRODUCT_VERSION_MINOR in value.shl)
- PatchLevel (set to same value as PRODUCT_VERSION_PATCH_LEVEL in value.shl)
- BetaLevel (set to same value as PRODUCT_VERSION_BETA_LEVEL in value.shl)
- ReleaseType (set to same value as PRODUCT_RELEASE_TYPE in value.shl)
- VersionString (set to same value as PRODUCT_VERSION_TITLE in value.shl)
- 
- Finally, change any string matching the form below to have the new verison
- info:
- 
- HKLMn=Software\TransarcCorporation\Product Name\Version
- 
- For example, one such string may be:
- 
- HKLM2=Software\TransarcCorporation\AFS Control Center\3.5 3.32
  
! To update the verison info to 3.6 patch 3, the string would change
! to:
  
! HKLM2=Software\TransarcCorporation\AFS Control Center\3.6 3
  
- That's it!  Build and test the thing, making sure that the version info
- in the registry is correct for each app, and that upgrades of previous
- versions, downgrades to previous versions from this version, and reinstalls
- of this version work correctly.
  
- If you're the poor sucker who had to do this, then I offer you my sympathy!
  
  
--- 1,30 ----
  Copyright 2000, International Business Machines Corporation and others.
  All Rights Reserved.
  This software has been released under the terms of the IBM Public
  License.  For details, see the LICENSE file in the top-level source
  directory or online at http://www.openafs.org/dl/license10.html
  HOW TO SET THE AFS FOR WINDOWS VERSION INFORMATION
  
! Set AFSPRODUCT_VERSION in the following files:
! src\config\NTMakefile.i386_win95 
! src\config\NTMakefile.i386_nt40
! 
! The format of this variable should be
! x.y.z.p or x.y.z p
! 
! x= major verson (1-9)
! y= minor verson (1-9)
! z.p= patch level z=(1-9) p=(1-99 or a-z)
! 
! For example:
! AFSPRODUCT_VERSION=1.1.1 a
! AFSPRODUCT_VERSION=1.1.1.1
! AFSPRODUCT_VERSION=1.1.101
! AFSPRODUCT_VERSION=1.1.1a
  
! These examples represent different forms of the same version.
! However the version will be displayed to the user as they are shown!
  
  
  
  
Index: openafs/src/WINNT/install/InstallShield5/NTMakefile
diff -c openafs/src/WINNT/install/InstallShield5/NTMakefile:1.3 openafs/src/WINNT/install/InstallShield5/NTMakefile:1.3.2.1
*** openafs/src/WINNT/install/InstallShield5/NTMakefile:1.3	Sat Jun 23 13:26:08 2001
--- openafs/src/WINNT/install/InstallShield5/NTMakefile	Thu Aug 23 01:31:51 2001
***************
*** 8,37 ****
  !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME)
  !INCLUDE ..\..\..\config\NTMakefile.version
  
! ############################################################################
  
! CELLSERVDB = $(DESTDIR)\root.client\usr\vice\etc\afsdcell.ini
  
! $(CELLSERVDB): afsdcell.ini
!     copy $** $@
  
! prep: $(CELLSERVDB) AFS_component_version_number.txt
      CreateISDirTree.bat
      ScatterFiles.bat
      CreateGeneratedFiles.bat
      CompileScript.bat
  
  build:
!     BuildSetup.bat
      xcopy/s/e/y "Media\Transarc AFS\Disk Images\disk1\*.*" $(DESTDIR)\WinInstall
!     copy AFS_component_version_number.txt $(DESTDIR)\WinInstall\Version.txt
      $(DEL) /q "Media\Transarc AFS\Disk Images\disk1\*.*"
! !IF ((EXIST("$(ISWEB)")) &&("$(ISWEB)"!=""))
  !	IF (!EXIST($(DESTDIR)\Wininstall\PackageWeb))
  		$(MKDIR) $(DESTDIR)\Wininstall\PackageWeb
  !	ENDIF
! 	$(DEL) /q $(DESTDIR)\Wininstall\PackageWeb\*.*
! 	$(ISWEB)\Pftwwiz.exe $(AFSROOT)\src\winnt\install\InstallShield5\PackageWeb.pfw -s -a 
! !ENDIF
  
  install: prep build
--- 8,68 ----
  !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME)
  !INCLUDE ..\..\..\config\NTMakefile.version
  
! #  Install comments
! #             Don't use '=' in the following strings!
! #             WELCOMEMESSAGE=Display during installation process
! #             AFSBUILDCOMMENTS=Displayed in properity page for install file
! #             CELLSERVDB_CONFIGNAME = name of configuration file (ThisCell)
  
! CELLSERVDB_CONFIGNAME=afsdcell.ini
! WELCOMEMESSAGE=Default Configuration Information:\nBuild:*DatE* *TimE* Ver:$(AFSPRODUCT_VERSION)\nCellname:$(CELLNAME_DEFAULT)\nCellSrvDB:$(CELLSERVDB_INSTALL)
! AFSBUILDCOMMENTS=Build:*DatE* *TimE* CellServDB:$(CELLSERVDB_INSTALL)
  
! ############################################################################
  
! prep: AFS_component_version_number.txt
!     $(DESTDIR)\bin\util_cr.exe } "$(AFSPRODUCT_VERSION)" ".\lang\en_US\valuee.shl"
!     $(DESTDIR)\bin\util_cr.exe } "$(AFSPRODUCT_VERSION)" "default.txt" "default.rge"
!     $(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\lang\en_US\value.shl" "[DATA] CELLSERVDB_CONFIGNAME=$(CELLSERVDB_CONFIGNAME)"
!     $(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\lang\en_US\value.shl" "[DATA] CELLNAME_DEFAULT=$(CELLNAME_DEFAULT)"
!     $(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\lang\en_US\value.shl" "[DATA] CELLSERVDB_INSTALL=$(CELLSERVDB_INSTALL)"
!     $(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\lang\en_US\value.shl" "[DATA] CELLSERVDB_WEB=$(CELLSERVDB_WEB)"
! !IF "$(WELCOMEMESSAGE)" != ""
!       $(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\lang\en_US\value.shl" "[DATA] WELCOME_MESSAGE=$(WELCOMEMESSAGE)"
! !ENDIF
! !     IF ((EXIST("$(ISWEB)")) &&("$(ISWEB)"!=""))
!       $(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\packageweb.pfw" "[Options] Version=$(AFSPRODUCT_VERSION)"
!       $(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\packageweb.pfw" "[Options] Comments=$(AFSBUILDCOMMENTS)"
!       $(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\packageweb.pfw" "[Options] ApplicationName=AFSforWindows"
!       $(DESTDIR)\bin\util_cr.exe @ "$(AFSROOT)\src\WINNT\install\InstallShield5\packageweb.pfw" "[Options] Company=Open AFS"
!       
! !     ENDIF
      CreateISDirTree.bat
      ScatterFiles.bat
      CreateGeneratedFiles.bat
      CompileScript.bat
+     $(COPY) $(DESTDIR)\WinInstall\Config\wininet.dll ".\Setup Files\Compressed Files\0009-English\Intel 32\."
+     $(COPY) $(DESTDIR)\WinInstall\Config\shlwapi.dll ".\Setup Files\Compressed Files\0009-English\Intel 32\."
+     $(COPY) ..\..\afs_setup_utils\_isuser\_isuser.dll ".\Setup Files\Compressed Files\0009-English\Intel 32\."
+     $(COPY) ..\..\afs_setup_utils\getwebdll\getwebdll.dll ".\Setup Files\Compressed Files\0009-English\Intel 32\."
+     $(COPY) $(DESTDIR)\WinInstall\Config\$(CELLSERVDB_INSTALL) ".\Setup Files\Compressed Files\0009-English\Intel 32\$(CELLSERVDB_CONFIGNAME)"
+     $(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\root.client\usr\vice\etc\$(CELLSERVDB_CONFIGNAME)"
+     $(DESTDIR)\bin\util_cr.exe ~ ".\Setup Files\Compressed Files\0009-English\Intel 32\_ISUSER.DLL"
+     $(DESTDIR)\bin\util_cr.exe ~ ".\Setup Files\Compressed Files\0009-English\Intel 32\shlwapi.DLL"
+     $(DESTDIR)\bin\util_cr.exe ~ ".\Setup Files\Compressed Files\0009-English\Intel 32\wininet.DLL"
+     $(DESTDIR)\bin\util_cr.exe ~ ".\Setup Files\Compressed Files\0009-English\Intel 32\GETWEBDLL.DLL"
  
  build:
!     BuildSetup.bat
      xcopy/s/e/y "Media\Transarc AFS\Disk Images\disk1\*.*" $(DESTDIR)\WinInstall
!     copy AFS_component_version_number.txt $(DESTDIR)\WinInstall\Version.txt
      $(DEL) /q "Media\Transarc AFS\Disk Images\disk1\*.*"
! !IF ((EXIST("$(ISWEB)")) &&("$(ISWEB)"!=""))
  !	IF (!EXIST($(DESTDIR)\Wininstall\PackageWeb))
  		$(MKDIR) $(DESTDIR)\Wininstall\PackageWeb
  !	ENDIF
! 	$(DEL) /q $(DESTDIR)\Wininstall\PackageWeb\*.*
! 	$(ISWEB)\Pftwwiz.exe $(AFSROOT)\src\winnt\install\InstallShield5\PackageWeb.pfw -s -a 
! !ENDIF
  
  install: prep build
Index: openafs/src/WINNT/install/InstallShield5/ScatterFiles.bat
diff -c openafs/src/WINNT/install/InstallShield5/ScatterFiles.bat:1.2 openafs/src/WINNT/install/InstallShield5/ScatterFiles.bat:1.2.4.1
*** openafs/src/WINNT/install/InstallShield5/ScatterFiles.bat:1.2	Sat Nov  4 05:03:04 2000
--- openafs/src/WINNT/install/InstallShield5/ScatterFiles.bat	Thu Aug 23 01:31:51 2001
***************
*** 24,29 ****
--- 24,30 ----
  
  rem Only copy this file when NOT doing a WSPP build
  if not defined AFSBLD_IS_WSPP copy setup.bmp "Setup Files\Uncompressed Files\Language Independent\OS Independent"
+ if not defined AFSBLD_IS_WSPP copy _isuser.dll "Setup Files\Uncompressed Files\Language Independent\OS Independent"
  
  copy %AFSROOT%\DEST\root.server\usr\afs\bin\InstallUtils.dll "Setup Files\Compressed Files\Language Independent\OS Independent"
  copy %AFSROOT%\DEST\root.server\usr\afs\bin\afs_setup_utils_*.dll "Setup Files\Compressed Files\Language Independent\OS Independent"
Index: openafs/src/WINNT/install/InstallShield5/setup.rul
diff -c openafs/src/WINNT/install/InstallShield5/setup.rul:1.2 openafs/src/WINNT/install/InstallShield5/setup.rul:1.2.2.1
*** openafs/src/WINNT/install/InstallShield5/setup.rul:1.2	Sat Jun 23 13:26:08 2001
--- openafs/src/WINNT/install/InstallShield5/setup.rul	Thu Aug 23 01:31:51 2001
***************
*** 1,14 ****
! ////////////////////////////////////////////////////////////////////////////////
! //
! // Copyright (C) 1998  OpenAFS
! // All rights reserved.
! //
  //
! //    File Name:  Setup.rul
  //
! //  Description:  InstallShield script
  //
- ////////////////////////////////////////////////////////////////////////////////
  
  
  // Include header files
--- 1,12 ----
! 
  //
! //	Copyright 2000, International Business Machines Corporation and others.
! //	All Rights Reserved.
  //
! //	This software has been released under the terms of the IBM Public
! //	License.  For details, see the LICENSE file in the top-level source
! //	directory or online at http://www.openafs.org/dl/license10.html
  //
  
  
  // Include header files
***************
*** 321,326 ****
--- 319,1064 ----
  	BOOL 		bPreinstallReplace;
  
  
+ ////////////////////////////////////////////////////////////////////////////////
+ //
+ //   Function Name: Template
+ //
+ //     Description: This dialog will show a dialog template which can be
+ //                  used for creating any user-defined dialog with the
+ //                  Windows 95 look and feel.
+ //        Comments:
+ //
+ ////////////////////////////////////////////////////////////////////////////////
+ 
+ number nvSection,nFileIsLocked;
+ STRING szTemp;
+ 
+ #define IDC_HOMEPATH                    301
+ #define IDC_ROOTPATH                    302
+ #define IDC_HOMEDRIVELIST               1007
+ #define IDC_ROOTDRIVELIST               1008
+ #define IDC_ENABLEROOT                  1010
+ #define IDC_ENABLEHOME                  1011
+ #define IDC_INSTALL              		1011
+ #define IDC_WEB                         1016
+ #define IDC_CHECK_INSTALL               1018
+ #define IDC_CHECK_WEB                   1019
+ #define IDC_CHECK_BROWSEFILE            1020
+ #define IDC_CHECK_PREVIOUSFILE          1021
+ #define IDC_PREVIOUSFILE                1024
+ #define IDC_BROWSE                      1025
+ #define IDC_BROWSEFILE                  1026
+ #define DLG_TEMPLATE                    13029
+ #define DLG_DRIVEPATH                   13030
+ #define DLG_CELLSERVDB                  13031
+ #define IDC_PATH                        13032
+ 
+ prototype Logit(STRING);
+ function Logit(szMsg)
+ HWND handle;
+ begin
+ 	return;
+ 	OpenFileMode(FILE_MODE_APPEND);
+  	if (OpenFile (handle, "y:\\dest", "silent.log") < 0) then
+ 	    CreateFile(handle,"y:\\dest", "silent.log");
+      endif;
+  	WriteLine(handle,szMsg);
+     CloseFile(handle);
+ end;
+ 
+ prototype Logitn(STRING,NUMBER);
+ function Logitn(szMsg,i)
+ HWND handle;
+ STRING sz;
+ begin
+     Sprintf(sz,szMsg,i);
+ 	Logit(sz);
+ end;
+ prototype INT GetWebDll.BrowseFile(NUMBER,BYREF STRING,BYREF STRING,NUMBER);
+ prototype INT GetWebDll.GetWebPage(BYREF STRING,BYREF STRING,BYREF STRING);
+ prototype INT GetWebDll.GetUserLogon(BYREF STRING);
+ prototype SetCellServDB(STRING,BYREF NUMBER,BYREF STRING,BYREF STRING,BYREF STRING,BYREF STRING);
+ prototype FormErrorMessage(NUMBER,BYREF STRING);
+ prototype SetHomeRoot( STRING,BYREF STRING,BYREF STRING,BYREF STRING,BYREF STRING );
+ prototype BOOL getWebCellSrvDB(STRING,STRING);
+ 
+ prototype BOOL GetDefaultDrive(BYREF NUMBER);
+ function GetDefaultDrive(listAv)
+ 	NUMBER listAc;
+ 	NUMBER I,nResult;
+ 	STRING item,iitem;
+ begin
+    listAc = ListCreate (STRINGLIST);
+ 	Enable (STATUS);
+ 	SetStatusWindow (50, "Scaning for available Drives...");
+    	nResult=GetValidDrivesList (listAc, -1,-1);
+ 	SetStatusWindow (100, "Completed.");
+ 	Delay (2);
+ 	if (nResult<0) then
+ 	    SetStatusWindow(0, "");
+ 		MessageBox ("Scan Drive Error" , SEVERE);
+ 		abort;
+ 	endif;
+     SetStatusWindow(0, "");
+    listAv = ListCreate (STRINGLIST);
+    ListAddString(listAv,"None:",AFTER);
+    ListGetFirstString(listAc, iitem);
+ 	for I=67 to 90
+ 		Sprintf(item,"%c",I);
+ 		nResult=ListFindString(listAc,item);
+ 		if nResult==END_OF_LIST then
+ 			ListAddString(listAv,item+":",AFTER);
+ 		endif;
+ 		ListGetNextString(listAc,iitem);   	
+    endfor;
+     ListDestroy(listAc);
+ 	return TRUE;
+ end;
+ 
+ function FormErrorMessage(nResult,szResult)
+ begin
+ 	switch(nResult)
+ 	case COPY_ERR_CREATEDIR:
+ 		szResult=TARGETDIR+ "could not be created. Make sure that you have access rights to the target drive.";
+ 	case COPY_ERR_MEMORY:
+ 		szResult="The function was unable to allocate the memory required to complete the copy file process. Terminate as many running applications as possible to free memory.";
+ 	case COPY_ERR_NODISKSPACE:
+ 		szResult="The function could not find enough disk space on "+TARGETDIR+" to copy the files. Free disk space on the target drive.";
+ 	case COPY_ERR_OPENINPUT:
+ 		szResult="The function was unable to open the input file in "+SRCDIR+". Make sure the source file is a valid filename and that both the source file and target directory exist.";
+ 	case COPY_ERR_OPENOUTPUT:
+ 		szResult="The function was unable to copy the requested file.";
+ 	case COPY_ERR_TARGETREADONLY:
+ 		szResult="The file in "+TARGETDIR+" is read-only. Remove the read-only attribute from the target file and try again.";
+ 	default:
+ 		szResult="Unknown error";
+ 	endswitch;
+ end;
+ 
+ function getWebCellSrvDB(szDefaultWeb,szDestFile)
+ 	NUMBER nResult;
+ 	STRING szFile,szErrMsg,szURL;
+ begin
+ 	szErrMsg="                                                                 ";
+ 	Enable (STATUS);
+ 	SetStatusWindow (50, "Now Downloading CellServDB file...");
+ 	nResult=GetWebPage(szErrMsg,szDestFile,szDefaultWeb);
+ 	SetStatusWindow (100, "Downloading completed.");
+ 	Delay (2);
+ 	if (nResult!=0) then
+ 	    SetStatusWindow(0, "");
+ 		MessageBox (szErrMsg, INFORMATION);
+ 		return FALSE;
+ 	endif;
+     // setup default status
+     SetStatusWindow(0, "");
+    return TRUE;
+ end;
+ 
+ // Transfer file to CELLSERVDB
+ prototype BOOL InstallCellServDB(NUMBER,STRING,STRING);
+ function InstallCellServDB(DefaultItem,szDefaultWeb,szDefaultBrowse)
+ STRING szFile,svErrorMessage;
+ begin
+ 	switch (DefaultItem)
+ 	case IDC_CHECK_WEB:
+ 		nResult=getWebCellSrvDB(szDefaultWeb,TARGETDIR^@CELLSERVDB_CONFIGNAME);
+ 	case IDC_CHECK_BROWSEFILE:
+ 		// open file and copy to area
+ 		ParsePath(szFile,szDefaultBrowse,PATH);
+ 		SRCDIR=szFile;
+ 		ParsePath(szFile,szDefaultBrowse,FILENAME);
+ 		nResult=CopyFile ( szFile ,@CELLSERVDB_CONFIGNAME );
+ 		if nResult < 0 then
+ 		    if nResult = -1 then
+ 		        MessageBox ( "CopyFile failed with error code -1!", WARNING );
+ 		    else
+ 		        FormErrorMessage(nResult,svErrorMessage);
+ 		        SprintfBox ( WARNING, "",
+ 		            "CopyFile failed!\n\nError code: %ld\nMessage text: %s",
+ 		            nResult, svErrorMessage );
+ 		    endif;
+ 		    nResult=FALSE;
+ 		 else
+ 		 	nResult=TRUE;
+ 		 endif;
+ 	case IDC_CHECK_INSTALL:	//need to delete because install will never overwrite
+ 		SRCDIR=SUPPORTDIR;
+ 		nResult=CopyFile (@CELLSERVDB_CONFIGNAME,@CELLSERVDB_CONFIGNAME );
+ 		if nResult < 0 then
+ 		    if nResult = -1 then
+ 		        MessageBox ( "CopyFile failed with error code -1!", WARNING );
+ 		    else
+ 		        FormErrorMessage(nResult,svErrorMessage);
+ 		        SprintfBox ( WARNING, "",
+ 		            "CopyFile failed!\n\nError code: %ld\nMessage text: %s",
+ 			            nResult, svErrorMessage );
+ 			    endif;
+ 			nResult=FALSE;
+ 		else
+ 			nResult=TRUE;
+ 		endif;
+ 	case IDC_CHECK_PREVIOUSFILE:
+ 		nResult=TRUE;// work is done, it will use previous file
+ 	default:
+ 		nResult=TRUE;
+ 		;
+ 	endswitch;
+ 	return nResult;
+ end;
+ 
+ // Return TRUE if silent mode active
+ prototype BOOL SilentSetCellServDB(STRING,NUMBER,NUMBER,NUMBER,BYREF STRING,BYREF STRING);
+ function SilentSetCellServDB(szDlg,option,nResult,DefaultItem,szDefaultWeb,szDefaultBrowse)
+ STRING svSection,szTemp;
+ NUMBER nTemp;
+ begin
+ 	switch (option)
+ 	case 0:		//READ function
+ 		if (MODE!=SILENTMODE) then
+ 			return FALSE;
+ 		endif;
+ 		SdMakeName( svSection, szDlg, "", nvSection );
+         SilentReadData( svSection, "Result", DATA_NUMBER,szTemp,nResult);
+         if (nResult!=NEXT) then
+         	return TRUE;
+         endif;
+    	    SilentReadData( svSection, "DefaultItem", DATA_NUMBER,szTemp,DefaultItem);
+        	SilentReadData( svSection, "szDefaultWeb", DATA_STRING, szDefaultWeb,nTemp);
+        	SilentReadData( svSection, "szDefaultBrowse", DATA_STRING,szDefaultBrowse,nTemp );
+        	if (InstallCellServDB(DefaultItem,szDefaultWeb,szDefaultBrowse)==FALSE) then
+ 	       	nResult=CANCEL;
+ 		else
+ 			nResult=NEXT;
+        	endif;
+ 		return TRUE;
+ 	default:	//write
+ 		SdMakeName( svSection, szDlg, "", nvSection );
+         SilentWriteData( svSection, "Result", DATA_NUMBER,szTemp, nResult );
+         SilentWriteData( svSection, "DefaultItem", DATA_NUMBER,szTemp, DefaultItem );
+         SilentWriteData( svSection, "szDefaultWeb", DATA_STRING, szDefaultWeb,nTemp );
+         SilentWriteData( svSection, "szDefaultBrowse", DATA_STRING, szDefaultBrowse,nTemp );
+ 		return TRUE;		
+     endswitch;
+ end;
+ 
+ function SetCellServDB( szTitle,DefaultItem,szPreviousInstall,szDefaultWeb,szDefaultBrowse,szDefaultInstall)
+ STRING  szDlg, szTemp,szResult[256],svErrorMessage,szFile,svSection;
+ NUMBER  bDone, nId, nMessage, nTemp,AvailableDrives,nResult;
+ INT     hwndDlg,hwndItem;
+ 
+ begin
+         szDlg = "DLG_CELLSERVDB";
+         // record data produced by this dialog
+ 		if SilentSetCellServDB(szDlg,0,nResult,DefaultItem,szDefaultWeb,szDefaultBrowse) then
+ 			return nResult;
+ 		endif;
+ 
+         // ensure general initialization is complete
+         if (!bSdInit) then
+            SdInit();
+         endif;
+ 
+         if (EzDefineDialog( szDlg, "", "",
+                             DLG_CELLSERVDB ) = DLG_ERR) then
+            return -1;
+         endif;
+ 
+         // Loop in dialog until the user selects a standard button
+        	Disable(LOGGING);
+ 		VarSave(SRCTARGETDIR);
+ 		TARGETDIR=WINDIR;
+ 		doagain:
+         bDone = FALSE;
+ 
+         while (!bDone)
+ 
+            nId = WaitOnDialog( szDlg );
+            hwndDlg = CmdGetHwndDlg( szDlg );
+ 
+            switch(nId)
+ 
+            case DLG_INIT:
+                 // Initialize List Control
+                 // set file
+                 CtrlSetState (szDlg, DefaultItem,BUTTON_CHECKED);
+ 				if !Is(FILE_EXISTS,szPreviousInstall) then
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_CHECK_PREVIOUSFILE );
+ 					EnableWindow( hwndItem, FALSE);
+ 				endif;
+ 				hwndItem = GetDlgItem( hwndDlg, IDC_PREVIOUSFILE );
+ 				EnableWindow( hwndItem, DefaultItem==IDC_CHECK_PREVIOUSFILE);
+ 				hwndItem = GetDlgItem( hwndDlg, IDC_BROWSEFILE );
+ 				EnableWindow( hwndItem, DefaultItem==IDC_CHECK_BROWSEFILE);
+ 				hwndItem = GetDlgItem( hwndDlg, IDC_BROWSE );
+ 				EnableWindow( hwndItem, DefaultItem==IDC_CHECK_BROWSEFILE);
+ 				hwndItem = GetDlgItem( hwndDlg, IDC_WEB );
+ 				EnableWindow( hwndItem, DefaultItem==IDC_CHECK_WEB);
+ 				hwndItem = GetDlgItem( hwndDlg, IDC_INSTALL );
+ 				EnableWindow( hwndItem, DefaultItem==IDC_CHECK_INSTALL);
+ 				CtrlSetText (szDlg, IDC_PREVIOUSFILE, szPreviousInstall);
+ 				CtrlSetText (szDlg, IDC_BROWSEFILE, szDefaultBrowse);
+ 				CtrlSetText (szDlg, IDC_WEB, szDefaultWeb);
+ 				CtrlSetText (szDlg, IDC_INSTALL, szDefaultInstall);
+ 
+                 SdGeneralInit( szDlg, hwndDlg, STYLE_NORMAL, szSdProduct );
+ 			
+                 //This function sets the caption for old style dialogs or
+                 //sets the text in the top banner area of win2k style dialogs
+ //                SdSetDlgTitle(szDlg, hwndDlg, szTitle); //Version 6.0 only
+ 
+            case OK:
+                 nId    = NEXT;
+                 bDone  = TRUE;
+ 
+            case BACK:
+                 nId    = BACK;
+                 bDone  = TRUE;
+ 
+            case DLG_ERR:
+                 SdError( -1, "DLG_CELLSERVDB" );
+                 nId    = -1;
+                 bDone  = TRUE;
+ 
+            case DLG_CLOSE:
+                 SdCloseDlg( hwndDlg, nId, bDone );
+ 
+ 		   case IDC_BROWSE:
+ 				szResult=szDefaultBrowse;
+ 				szTitle="Select file to be used for CellServDB";
+ 				nResult=BrowseFile(hwndDlg,szTitle,szResult,256);
+ 				CtrlSetText (szDlg, IDC_BROWSEFILE, szResult);
+ 				szDefaultBrowse=szResult;
+ 			
+ 		   case IDC_CHECK_BROWSEFILE:
+ 				hwndItem = GetDlgItem( hwndDlg, IDC_BROWSEFILE );
+ 				EnableWindow( hwndItem, TRUE);
+ 				hwndItem = GetDlgItem( hwndDlg, IDC_BROWSE );
+ 				EnableWindow( hwndItem, TRUE);
+                 CtrlSetState (szDlg, DefaultItem,BUTTON_UNCHECKED);
+                 CtrlSetState (szDlg, nId,BUTTON_CHECKED);
+ 				switch (DefaultItem)
+ 				case IDC_CHECK_WEB:
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_WEB );
+ 					EnableWindow( hwndItem, FALSE);
+ 				case IDC_CHECK_PREVIOUSFILE:
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_PREVIOUSFILE );
+ 					EnableWindow( hwndItem, FALSE);
+ 				case IDC_CHECK_INSTALL:
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_INSTALL);
+ 					EnableWindow( hwndItem, FALSE);
+ 				default:
+ 					;
+ 				endswitch;
+ 				DefaultItem=nId;
+ 		   case IDC_CHECK_INSTALL:
+ 				hwndItem = GetDlgItem( hwndDlg, IDC_INSTALL );
+ 				EnableWindow( hwndItem, TRUE);
+                 CtrlSetState (szDlg, DefaultItem,BUTTON_UNCHECKED);
+                 CtrlSetState (szDlg, nId,BUTTON_CHECKED);
+ 				switch (DefaultItem)
+ 				case IDC_CHECK_BROWSEFILE:
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_BROWSE );
+ 					EnableWindow( hwndItem, FALSE);
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_BROWSEFILE );
+ 					EnableWindow( hwndItem, FALSE);
+ 				case IDC_CHECK_WEB:
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_WEB );
+ 					EnableWindow( hwndItem, FALSE);
+ 				case IDC_CHECK_PREVIOUSFILE:
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_PREVIOUSFILE );
+ 					EnableWindow( hwndItem, FALSE);
+ 				default:
+ 					;
+ 				endswitch;
+ 				DefaultItem=nId;
+ 		   case IDC_CHECK_WEB:
+ 				hwndItem = GetDlgItem( hwndDlg, IDC_WEB );
+ 				EnableWindow( hwndItem, TRUE);
+                 CtrlSetState (szDlg, DefaultItem,BUTTON_UNCHECKED);
+                 CtrlSetState (szDlg, nId,BUTTON_CHECKED);
+ 				switch (DefaultItem)
+ 				case IDC_CHECK_BROWSEFILE:
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_BROWSE );
+ 					EnableWindow( hwndItem, FALSE);
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_BROWSEFILE );
+ 					EnableWindow( hwndItem, FALSE);
+ 				case IDC_CHECK_INSTALL:
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_INSTALL);
+ 					EnableWindow( hwndItem, FALSE);
+ 				case IDC_CHECK_PREVIOUSFILE:
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_PREVIOUSFILE );
+ 					EnableWindow( hwndItem, FALSE);
+ 				default:
+ 					;
+ 				endswitch;
+ 				DefaultItem=nId;
+ 		   case IDC_CHECK_PREVIOUSFILE:
+ 				hwndItem = GetDlgItem( hwndDlg, IDC_PREVIOUSFILE );
+ 				EnableWindow( hwndItem, TRUE);
+                 CtrlSetState (szDlg, DefaultItem,BUTTON_UNCHECKED);
+                 CtrlSetState (szDlg, nId,BUTTON_CHECKED);
+ 				switch (DefaultItem)
+ 				case IDC_CHECK_BROWSEFILE:
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_BROWSE );
+ 					EnableWindow( hwndItem, FALSE);
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_BROWSEFILE );
+ 					EnableWindow( hwndItem, FALSE);
+ 				case IDC_CHECK_INSTALL:
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_INSTALL);
+ 					EnableWindow( hwndItem, FALSE);
+ 				case IDC_CHECK_WEB:
+ 					hwndItem = GetDlgItem( hwndDlg, IDC_WEB );
+ 					EnableWindow( hwndItem, FALSE);
+ 				default:
+ 					;
+ 				endswitch;
+ 				DefaultItem=nId;
+            default:
+                 // check standard handling
+                  if (SdIsStdButton( nId ) && SdDoStdButton( nId )) then
+                     bDone = TRUE;
+                 endif;
+            endswitch;
+ 
+         endwhile;
+ 
+ 		CtrlGetText (szDlg, IDC_BROWSEFILE, szDefaultBrowse);
+ 		CtrlGetText (szDlg, IDC_WEB, szDefaultWeb);
+         if (nId != NEXT) then
+ 			return nId;
+ 		endif;
+        	if InstallCellServDB(DefaultItem,szDefaultWeb,szDefaultBrowse)==FALSE then
+        		goto doagain;
+  		endif;
+         EndDialog( szDlg );
+         ReleaseDialog( szDlg );
+ 		VarRestore(SRCTARGETDIR);
+ 		Enable(LOGGING);
+         SdUnInit( );
+         // record data produced by this dialog
+ 		SilentSetCellServDB(szDlg,1,nId,DefaultItem,szDefaultWeb,szDefaultBrowse);
+         return nId;
+ end;
+ 
+ ////////////////////////////////////////////////////////////////////////////////
+ //
+ //   Function Name: Template
+ //
+ //     Description: This dialog will show a dialog template which can be
+ //                  used for creating any user-defined dialog with the
+ //                  Windows 95 look and feel.
+ //        Comments:
+ //
+ ////////////////////////////////////////////////////////////////////////////////
+ 
+ prototype BOOL GetUser(BYREF STRING);
+ 
+ function GetUser(sUser)
+ 	NUMBER nResult;
+ begin
+ 	sUser="                                                                 ";
+ 	nResult=GetUserLogon(sUser);
+ 	if (nResult!=1) then
+ 		sUser="";
+ 	endif;
+ 	return (nResult==1);
+ end;
+ 
+ 
+ prototype BOOL SetDriveMaps(STRING,STRING,STRING,STRING,STRING);
+ function SetDriveMaps(szPath,szRootDrive,szRootPath,szHomeDrive,szHomePath)
+ HWND   handle;
+ begin
+ 	VarSave(SRCTARGETDIR);
+ 	TARGETDIR=WINDIR;
+ 	DeleteFile("afsdsbmt.ini");
+ 	VarRestore(SRCTARGETDIR);
+     CreateFile(handle, szPath, "afsdsbmt.ini");
+     WriteLine(handle, "[AFS Submounts]");
+    	if (StrLength(szRootDrive)==2) then
+    		WriteLine(handle, "all="+szRootPath);
+    	endif;
+     if (StrLength(szHomeDrive)==2) then
+    		WriteLine(handle, "home=" + szHomePath);
+    	endif;
+    	WriteLine(handle, "[AFS Mappings]");
+    	if (StrLength(szRootDrive)>0) then
+    		WriteLine(handle, szRootDrive+"="+szRootPath);
+     endif;
+    	if (StrLength(szHomeDrive)>0) then
+    		WriteLine(handle, szHomeDrive+"="+szHomePath);
+     endif;
+    	CloseFile(handle);
+ end;
+ 
+ // Return TRUE if silent mode active
+ prototype BOOL SilentSetHomeRoot(STRING,NUMBER,NUMBER,BYREF STRING,BYREF STRING,BYREF STRING,BYREF STRING);
+ function SilentSetHomeRoot(szDlg,option,nResult,szRootDrive,szRootPath,szHomeDrive,szHomePath)
+ STRING svSection,szTemp,szTPath,szTShare,szTDrive,szLogname;
+ NUMBER nTemp,nCount,I;
+ HWND   handle;
+ begin
+ 	Logitn("SilentSetHomeRoot option=%i",option);
+ 	switch (option)
+ 	case 0:		//READ function
+ 		if (MODE!=SILENTMODE) then
+ 			return FALSE;
+ 		endif;			// this section is a little more complicated, allowing installation of n mappings
+ 		SdMakeName( svSection, szDlg, "", nvSection );
+ 		Logit("SdMakeName="+svSection);
+         SilentReadData( svSection, "Result", DATA_NUMBER,szTemp,nResult);
+        	Logitn("nResult=%i",nResult);
+         if (nResult!=NEXT) then
+         	return TRUE;
+         endif;
+         Logit("Do count");
+        	SilentReadData( svSection, "Count", DATA_NUMBER, szTemp,nCount);
+        	Logitn("nCount=%i",nCount);
+        	if nCount==0 then
+        		return TRUE;
+        	endif;
+ 		VarSave(SRCTARGETDIR);
+ 		TARGETDIR=WINDIR;
+ 		DeleteFile("afsdsbmt.ini");
+ 		VarRestore(SRCTARGETDIR);
+ 	    CreateFile(handle, WINDIR, "afsdsbmt.ini");
+     	WriteLine(handle, "[AFS Submounts]");
+        	for I=0 to nCount-1
+ 	       	Logitn("I=%i",I);       	
+        		Sprintf(szTemp,"Path_%i",I);
+        		Logit("Path="+szTemp);       		
+ 	       	SilentReadData( svSection, szTemp, DATA_STRING, szTPath,nTemp);
+        		Logit("TPath="+szTPath);       		
+ 	       	if (szTPath % "%LOGINNAME%") then
+ 	       		//Replace loginname with actual loging name
+ 				nTemp=StrFind(szTPath,"%LOGINNAME%");
+ 				StrSub(szTemp,szTPath,nTemp+11,StrLength(szTPath));
+ 				StrSub(szTPath,szTPath,0,nTemp);
+ 			    if (GetUser(szLogname)) then
+ 					szTPath=szTPath+szLogname+szTemp;
+ 				endif;
+ 	       	endif;
+        		Sprintf(szTemp,"Share_%i",I);
+ 	       	SilentReadData( svSection, szTemp, DATA_STRING, szTShare,nTemp);
+ 	   		WriteLine(handle, szTShare+"="+szTPath);
+        	endfor;
+ 	   	WriteLine(handle, "[AFS Mappings]");
+        	for I=0 to nCount-1
+        		Sprintf(szTemp,"Drive_%i",I);
+ 	       	SilentReadData( svSection, szTemp, DATA_STRING, szTDrive,nTemp);
+        		Sprintf(szTemp,"Path_%i",I);
+ 	       	SilentReadData( svSection, szTemp, DATA_STRING, szTPath,nTemp);
+ 	       	if (szTPath % "%LOGINNAME%") then
+ 	       		//Replace loginname with actual loging name
+ 				nTemp=StrFind(szTPath,"%LOGINNAME%");
+ 				StrSub(szTemp,szTPath,nTemp+11,StrLength(szTPath));
+ 				StrSub(szTPath,szTPath,0,nTemp);
+ 			    if (GetUser(szLogname)) then
+ 					szTPath=szTPath+szLogname+szTemp;
+ 				endif;
+ 	       	endif;
+ 	   		WriteLine(handle, szTDrive+"="+szTPath);
+        	endfor;
+ 	    CloseFile(handle);
+ 		nResult=NEXT;
+ 		return TRUE;
+ 	default:	//write
+ 		SdMakeName( svSection, szDlg, "", nvSection );
+ 		nCount=0;
+         SilentWriteData( svSection, "Result", DATA_NUMBER,szTemp, nResult );
+         if (StrLength(szRootDrive)==2) then
+        		Sprintf(szTemp,"Drive_%i",nCount);
+ 	        SilentWriteData( svSection,szTemp, DATA_STRING,szRootDrive, nTemp );//root drive
+        		Sprintf(szTemp,"Path_%i",nCount);
+ 	        SilentWriteData( svSection,szTemp, DATA_STRING,szRootPath, nTemp );//root drive
+        		Sprintf(szTemp,"Share_%i",nCount);
+ 	        SilentWriteData( svSection,szTemp, DATA_STRING,"all", nTemp );//root drive
+ 	        nCount++;
+ 	    endif;
+         if (StrLength(szHomeDrive)==2) then
+        		Sprintf(szTemp,"Drive_%i",nCount);
+ 	        SilentWriteData( svSection,szTemp, DATA_STRING,szHomeDrive, nTemp );//root drive
+        		Sprintf(szTemp,"Path_%i",nCount);
+ 	        SilentWriteData( svSection,szTemp, DATA_STRING,szHomePath, nTemp );//root drive
+        		Sprintf(szTemp,"Share_%i",nCount);
+ 	        SilentWriteData( svSection,szTemp, DATA_STRING,"home", nTemp );//root drive
+         	nCount++;
+         endif;
+         SilentWriteData( svSection, "Count", DATA_NUMBER,szTemp, nCount );	// only two can be defined through Dialog box
+ 		SetDriveMaps(WINDIR,szRootDrive,szRootPath,szHomeDrive,szHomePath);
+ 		return TRUE;		
+     endswitch;
+ end;
+ 
+ function SetHomeRoot( szTitle,szRootDrive,szRootPath,szHomeDrive,szHomePath )
+ 
+ STRING  szDlg, szTemp,svSection;
+ NUMBER  bDone, nId, nMessage, nTemp,AvailableDrives,nResult;
+ INT     hwndDlg,hwndItem,hwndItem2;
+ 
+ begin
+        szDlg = "DLG_DRIVEPATH";
+ 
+         // record data produced by this dialog
+ 		Logit("SetHomeRoot");
+ 		if SilentSetHomeRoot(szDlg,0,nResult,szRootDrive,szRootPath,szHomeDrive,szHomePath ) then
+ 			return nResult;
+ 		endif;
+ 
+ 		GetDefaultDrive(AvailableDrives);
+          // ensure general initialization is complete
+         if (!bSdInit) then
+            SdInit();
+         endif;
+ 
+         if (EzDefineDialog( szDlg, "", "",
+                             DLG_DRIVEPATH ) = DLG_ERR) then
+            return -1;
+         endif;
+ 
+         // Loop in dialog until the user selects a standard button
+         bDone = FALSE;
+ 
+         while (!bDone)
+ 
+            nId = WaitOnDialog( szDlg );
+ 
+            switch(nId)
+ 
+            case DLG_INIT:
+                 hwndDlg = CmdGetHwndDlg( szDlg );
+                 // Initialize List Control
+         		nResult=CtrlSetList( szDlg, IDC_HOMEDRIVELIST, AvailableDrives );
+ 	            if (nResult != 0) then
+ 	               // Handle error from CtrlSetList.
+ 	               MessageBox ("Unable to create folder name list.", SEVERE);
+ 	               bDone = TRUE;
+ 	            endif;
+ 				if (CtrlSetCurSel(szDlg,IDC_HOMEDRIVELIST,szHomeDrive)!=0) then
+ 					szHomeDrive="None:";
+ 					CtrlSetCurSel(szDlg,IDC_HOMEDRIVELIST,szHomeDrive);
+ 				endif;
+ 
+         		nResult=CtrlSetList( szDlg, IDC_ROOTDRIVELIST, AvailableDrives );
+ 	            if (nResult != 0) then
+ 	               // Handle error from CtrlSetList.
+ 	               MessageBox ("Unable to create folder name list.", SEVERE);
+ 	               bDone = TRUE;
+ 	            endif;
+ 				if (CtrlSetCurSel(szDlg,IDC_ROOTDRIVELIST,szRootDrive)!=0) then
+ 					szRootDrive="None:";
+ 					CtrlSetCurSel(szDlg,IDC_ROOTDRIVELIST,szRootDrive);
+ 				endif;
+ 
+         		nResult=CtrlSetText( szDlg, IDC_ROOTPATH,szRootPath );
+ 	            if (nResult != 0) then
+ 	               MessageBox ("Unable to create szRootPath.", SEVERE);
+ 	               bDone = TRUE;
+ 	            endif;
+         		nResult=CtrlSetText( szDlg, IDC_HOMEPATH,szHomePath );
+ 	            if (nResult != 0) then
+ 	               MessageBox ("Unable to create szHomePath.", SEVERE);
+ 	               bDone = TRUE;
+ 	            endif;
+ 
+                 CtrlSetState (szDlg, IDC_ENABLEHOME,BUTTON_CHECKED);
+                 CtrlSetState (szDlg, IDC_ENABLEROOT,BUTTON_CHECKED);
+                 SdGeneralInit( szDlg, hwndDlg, STYLE_NORMAL, szSdProduct );
+ 			
+                 //This function sets the caption for old style dialogs or
+                 //sets the text in the top banner area of win2k style dialogs
+            case OK:
+            		if (szRootDrive!=szHomeDrive) then
+ 	                nId    = NEXT;
+ 	                bDone  = TRUE;
+ 	            else
+ 	            	MessageBox("Home and Root drives cannot be the same",WARNING);
+                 endif;
+ 
+            case BACK:
+                 nId    = BACK;
+                 bDone  = TRUE;
+ 
+            case DLG_ERR:
+                 SdError( -1, "DLG_DRIVEPATH" );
+                 nId    = -1;
+                 bDone  = TRUE;
+ 
+            case DLG_CLOSE:
+                 SdCloseDlg( hwndDlg, nId, bDone );
+ 
+ 		   case IDC_ENABLEROOT:
+ 		   	
+ 				hwndItem = GetDlgItem( hwndDlg, IDC_ROOTDRIVELIST );//get handle of control in custom dialog box
+ 				hwndItem2 = GetDlgItem( hwndDlg, IDC_ROOTPATH );//get handle of control in custom dialog box
+ 				if (CtrlGetState (szDlg, nId)==BUTTON_CHECKED) then
+ 					EnableWindow( hwndItem2, TRUE);
+ 					EnableWindow( hwndItem, TRUE);
+ 				else
+ 					EnableWindow( hwndItem2, FALSE);
+ 					EnableWindow( hwndItem, FALSE);
+ 				endif;
+ 		   case IDC_ENABLEHOME:
+ 				hwndItem = GetDlgItem( hwndDlg, IDC_HOMEDRIVELIST );//get handle of control in custom dialog box
+ 				hwndItem2 = GetDlgItem( hwndDlg, IDC_HOMEPATH );//get handle of control in custom dialog box
+ 				if (CtrlGetState (szDlg, nId)==BUTTON_CHECKED) then
+ 					EnableWindow( hwndItem2, TRUE);
+ 					EnableWindow( hwndItem, TRUE);
+ 				else
+ 					EnableWindow( hwndItem2, FALSE);
+ 					EnableWindow( hwndItem, FALSE);
+ 				endif;
+ 
+            case IDC_HOMEDRIVELIST:
+ 				;
+            case IDC_ROOTDRIVELIST:
+ 				;
+            case IDC_HOMEPATH:
+         		CtrlGetText (szDlg, nId,szHomePath);
+ 
+            case IDC_ROOTPATH:
+         		CtrlGetText (szDlg, nId,szRootPath);
+ 
+            default:
+                 // check standard handling
+                  if (SdIsStdButton( nId ) && SdDoStdButton( nId )) then
+                     bDone = TRUE;
+                 endif;
+            endswitch;
+ 
+         endwhile;
+ 
+ 		CtrlGetCurSel (szDlg, nId, szRootDrive);
+ 		if (CtrlGetState (szDlg, IDC_ENABLEROOT)==BUTTON_UNCHECKED) then
+ 	        szRootDrive="None:";
+ 		endif;
+ 		CtrlGetCurSel (szDlg, nId, szHomeDrive);
+ 		if (CtrlGetState (szDlg, IDC_ENABLEHOME)==BUTTON_UNCHECKED) then
+ 	        szHomeDrive="None:";
+ 		endif;
+         EndDialog( szDlg );
+         ReleaseDialog( szDlg );
+ 
+         SdUnInit( );
+ 
+         // record data produced by this dialog
+         if (nId==NEXT) then
+ 			SilentSetHomeRoot(szDlg,1,nId,szRootDrive,szRootPath,szHomeDrive,szHomePath );
+ 		endif;
+         ListDestroy (AvailableDrives);
+         return nId;
+ 
+ end;
+ 
+ 
+ // ---- script function prototypes -----
+ 
+ 
+     // your script function prototypes
+ 
+ 
+ 
  ///////////////////////////////////////////////////////////////////////////////
  //
  //   MAIN PROGRAM
***************
*** 333,358 ****
  //
  ///////////////////////////////////////////////////////////////////////////////
  program
      Disable( BACKGROUND );
- 
  	if (UseDLL(SUPPORTDIR ^ SETUP_UTILS_DLL_PATH) < 0) then
          ShowError(@SETUPUTILS_NOT_FOUND, SEVERE);
          bInstallAborted = TRUE;
          goto end_install;
      endif;
! 
!     SetupInstall();
! 
      CheckRequirements();
! 
! 	ParseCommandLine();
  	
  	SetupAppInfo();
! 
  	LocalizeComponents();
! 
  	DetectInstalledComponents();
! 
  	// Can't upgrade, downgrade, or reinstall the light client, so if it is
  	// already installed, we must abort.  This is because on Win9x, we can't
  	// move in-use files, and so we can't silently uninstall the light client,
--- 1071,1110 ----
  //
  ///////////////////////////////////////////////////////////////////////////////
  program
+ 	Logit("Begin");
+ 	nvSection=0;
      Disable( BACKGROUND );
  	if (UseDLL(SUPPORTDIR ^ SETUP_UTILS_DLL_PATH) < 0) then
          ShowError(@SETUPUTILS_NOT_FOUND, SEVERE);
          bInstallAborted = TRUE;
          goto end_install;
      endif;
! 	Logit("UseDLL1");
! 	ChangeDirectory (SUPPORTDIR);
! 	if (UseDLL("GetWebDLL.dll") != 0) then
! 		MessageBox ("DLL failed.\n\nCouldn't load"+SUPPORTDIR^"GetWebDLL.dll", INFORMATION);
! 		abort;
! 	endif;
! 	Logit("UseDLL2");
! 		
! 	SetupInstall();
! 	Logit("SetupInstall");
! 	
      CheckRequirements();
! 	Logit("CheckRequirements");
  	
+ 	ParseCommandLine();
+ 	Logit("ParseCommandLine");
+ 		
  	SetupAppInfo();
! 	Logit("SetupAppInfo");
! 	
  	LocalizeComponents();
! 	Logit("LocalizeComponents");
! 	
  	DetectInstalledComponents();
! 	Logit("DetectInstalledComponents");
! 	
  	// Can't upgrade, downgrade, or reinstall the light client, so if it is
  	// already installed, we must abort.  This is because on Win9x, we can't
  	// move in-use files, and so we can't silently uninstall the light client,
***************
*** 395,400 ****
--- 1147,1160 ----
  
  	// Install the Client
  	if (bFullClientSel) then
+ 		RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE);
+ 		Enable(LOGGING);
+ 		if RegDBSetKeyValueEx ("SYSTEM\\CurrentControlSet\\Services\\NetBT\\Parameters"	
+ 			,"SmbDeviceEnabled", REGDB_NUMBER, "0", 8) < 0 then
+ 			MessageBox ("RegDBCreateKeyEx failed.", SEVERE);
+ 		    abort;
+ 		endif;
+ 
  		pApp = &appFullClient;
  		if (InstallApp(pApp) < 0) goto end_install;
  	endif;
***************
*** 459,470 ****
  
  	CreateStartMenuEntries();
  
! 	if (bFullClientSel || bLightClientSel || bCcSel) then
! 		CheckCopyCellServDB();
! 	endif;
  
  	end_install:
  
  	UnUseDLL(SUPPORTDIR ^ SETUP_UTILS_DLL_PATH);
  
      CleanUpInstall();
--- 1219,1231 ----
  
  	CreateStartMenuEntries();
  
! //	if (bFullClientSel || bLightClientSel || bCcSel) then
! //		CheckCopyCellServDB();
! //	endif;
  
  	end_install:
  
+ 	UnUseDLL(SUPPORTDIR^"GetWebDLL.dll");
  	UnUseDLL(SUPPORTDIR ^ SETUP_UTILS_DLL_PATH);
  
      CleanUpInstall();
***************
*** 486,522 ****
  //
  ///////////////////////////////////////////////////////////////////////////////
  function ShowDialogs()
!     NUMBER  nResult;
      STRING	szTargetLicense;
      STRING	szSourceLicense;
  begin
      Dlg_Start:
      // beginning of dialogs label
- 
      Dlg_SdWelcome:
      nResult = DialogShowSdWelcome();
      if (nResult = BACK) goto Dlg_Start;
  
      Dlg_License:
!     szTargetLicense = DOCUMENTATION_LICENSE_PATH;
!     GetLicenseFilename (szSourceLicense);
!     Disable( DIALOGCACHE );
!     nResult = ShowLicense(szTargetLicense,szSourceLicense);
!     if (nResult = 0) then
!     	abort;
!     endif;
!     Enable( DIALOGCACHE );
! 
  	Dlg_SdCompDlg:
  	nResult = DialogShowSdAskComponentDialog();
  	if (nResult = BACK) goto Dlg_License;
  
      Dlg_SdSelectFolder:
      nResult = DialogShowSdSelectFolder();
!     if (nResult = BACK) goto Dlg_SdCompDlg;
! 
!     return 0;
! 
  end;
  
  
--- 1247,1326 ----
  //
  ///////////////////////////////////////////////////////////////////////////////
  function ShowDialogs()
!     NUMBER  nResult,handle;
      STRING	szTargetLicense;
      STRING	szSourceLicense;
+ 	STRING sRootDrive,sHomeDrive,userID,rootPath,homePath;
+ 	NUMBER 	DefaultItem;
+ 	STRING  szDefaultWeb,szDefaultBrowse,szDefaultInstall,szPreviousInstall;
+ 	STRING  szResult[256],svResult;
  begin
      Dlg_Start:
      // beginning of dialogs label
      Dlg_SdWelcome:
      nResult = DialogShowSdWelcome();
      if (nResult = BACK) goto Dlg_Start;
  
      Dlg_License:
! //    szTargetLicense = DOCUMENTATION_LICENSE_PATH;
! //    GetLicenseFilename (szSourceLicense);
! //	Logit("ShowLicense");
! //	Disable( DIALOGCACHE );
! //	if (MODE!=SILENTMODE) then
! //	    nResult = ShowLicense(szTargetLicense,szSourceLicense);
! //	    if (nResult = 0) then
! //	    	abort;
! //	    endif;
! //	    Enable( DIALOGCACHE );
! //	endif;
!     if (nResult = BACK) goto Dlg_Start;
  	Dlg_SdCompDlg:
  	nResult = DialogShowSdAskComponentDialog();
+ 	Logit("DialogShowSdAskComponentDialog");
  	if (nResult = BACK) goto Dlg_License;
  
      Dlg_SdSelectFolder:
      nResult = DialogShowSdSelectFolder();
! 	Logit("DialogShowSdSelectFolder");
! 	if (nResult = BACK) goto Dlg_SdCompDlg;
! 	if (bFullClientSel || bLightClientSel) then
! 		szDefaultWeb=@CELLSERVDB_WEB;
! 		szDefaultBrowse=TARGETDIR^"*";
! 		szDefaultInstall=@CELLSERVDB_INSTALL;
! 		szPreviousInstall=WINDIR^@CELLSERVDB_CONFIGNAME;
! 	    if (Is(FILE_EXISTS,szPreviousInstall)) then
! 			DefaultItem=IDC_CHECK_PREVIOUSFILE;
! 		else
! 			DefaultItem=IDC_CHECK_INSTALL;
! 		endif;
! 		Dlg_SdSelectCellServDB:
! 			Logit("SetCellServDB-next");
! 			nResult =SetCellServDB("Select AFS Cell Data base (afsdcell.ini)"
! 			,DefaultItem
! 			,szPreviousInstall
! 			,szDefaultWeb
! 			,szDefaultBrowse
! 			,szDefaultInstall);
! 		Logit("SetCellServDB");
! 	    if (nResult=BACK) goto Dlg_SdSelectFolder;
! 		if (Is(FILE_EXISTS, WINDIR^"afsdsbmt.ini")) then
! 			Logit("AskYesNo next");
! 			if (AskYesNo("Previous Drive Mapping Configuration already exist.\n\nPress Yes to keep previous configuration\nPress No to change previous configuration.",YES)=YES) then
! 				return 0;
! 			endif;
! 		endif;
! 		userID="                   ";
! 	    GetUser(userID);
! 		sRootDrive="Z:";
! 		sHomeDrive="U:";
! 	   	rootPath="/";
! 	    homePath = "/afs/" + @CELLNAME_DEFAULT + "/u/" + userID;
! 	    nResult=SetHomeRoot( "Home and Root Drive Assignment\nThese drives will be mapped each time AFS is connected!",sRootDrive,rootPath,sHomeDrive,homePath );
! 		Logit("SetHomeRoot");
! 		if (nResult = BACK) goto Dlg_SdSelectCellServDB;
! 	endif;
! 	Logit("ShowDialogs-done");
! 	return 0;
  end;
  
  
***************
*** 1549,1555 ****
  begin
  
      szTitle = "";
!     szMsg   = "";
      nResult = SdWelcome( szTitle, szMsg );
  
      return nResult;
--- 2353,2359 ----
  begin
  
      szTitle = "";
!     szMsg   = @WELCOME_MESSAGE;
      nResult = SdWelcome( szTitle, szMsg );
  
      return nResult;
***************
*** 1799,1810 ****
  			ComponentSetData(MEDIA, SERVER_COMP_NAME, COMPONENT_FIELD_VISIBLE, FALSE, "");
  			ComponentSetData(MEDIA, CC_COMP_NAME, COMPONENT_FIELD_VISIBLE, FALSE, "");
  			ComponentSetData(MEDIA, DOCS_COMP_NAME, COMPONENT_FIELD_VISIBLE, FALSE, "");
- 		
- 			ComponentSelectItem(MEDIA, SERVER_COMP_NAME, FALSE);
- 			ComponentSelectItem(MEDIA, CC_COMP_NAME, FALSE);
  			ComponentSelectItem(MEDIA, DOCS_COMP_NAME, FALSE);
  		endif;
! 	else
  		ComponentSetData(MEDIA, CLIENT_COMP_NAME, COMPONENT_FIELD_VISIBLE, FALSE, "");
  		ComponentSetData(MEDIA, SERVER_COMP_NAME, COMPONENT_FIELD_VISIBLE, FALSE, "");
  		ComponentSetData(MEDIA, CC_COMP_NAME, COMPONENT_FIELD_VISIBLE, FALSE, "");
--- 2603,2617 ----
  			ComponentSetData(MEDIA, SERVER_COMP_NAME, COMPONENT_FIELD_VISIBLE, FALSE, "");
  			ComponentSetData(MEDIA, CC_COMP_NAME, COMPONENT_FIELD_VISIBLE, FALSE, "");
  			ComponentSetData(MEDIA, DOCS_COMP_NAME, COMPONENT_FIELD_VISIBLE, FALSE, "");
  			ComponentSelectItem(MEDIA, DOCS_COMP_NAME, FALSE);
+ 			endif;
+ 		ComponentSelectItem(MEDIA, SERVER_COMP_NAME, FALSE);
+ 		if (@CELLNAME_DEFAULT % ".") then
+ 			ComponentSelectItem(MEDIA, CC_COMP_NAME, FALSE);
+ 		else
+ 			ComponentSelectItem(MEDIA, CC_COMP_NAME, TRUE);
  		endif;
! else
  		ComponentSetData(MEDIA, CLIENT_COMP_NAME, COMPONENT_FIELD_VISIBLE, FALSE, "");
  		ComponentSetData(MEDIA, SERVER_COMP_NAME, COMPONENT_FIELD_VISIBLE, FALSE, "");
  		ComponentSetData(MEDIA, CC_COMP_NAME, COMPONENT_FIELD_VISIBLE, FALSE, "");
***************
*** 2652,2657 ****
--- 3459,3489 ----
  end;
  
  
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
  ///////////////////////////////////////////////////////////////////////////////
  //
  // Function: CreateStartMenuEntries
***************
*** 2738,2745 ****
  
  // --- include script file section ---
  #include "sddialog.rul"
- 
- 
- 
- 
- 
--- 3570,3572 ----
Index: openafs/src/WINNT/install/InstallShield5/lang/en_US/value.shl
diff -c openafs/src/WINNT/install/InstallShield5/lang/en_US/value.shl:1.2 openafs/src/WINNT/install/InstallShield5/lang/en_US/value.shl:removed
*** openafs/src/WINNT/install/InstallShield5/lang/en_US/value.shl:1.2	Sat Jun 23 13:26:08 2001
--- openafs/src/WINNT/install/InstallShield5/lang/en_US/value.shl	Thu Aug 23 01:47:34 2001
***************
*** 1,114 ****
- [Data]
- DEFAULT_INSTALL_DIR=IBM\AFS
- NOTHING_SELECTED_MSG=You must select something to install before continuing.
- DOWNGRADE_LIGHT_CLIENT_MSG=Downgrade AFS Light Client
- SETUP_FINISHED_MSG=Setup has finished installing AFSŪ for Windows on your computer.
- TITLE_MAIN=Open AFS for Windows 1.0 4.01
- SEVERE_DIALOG_TITLE=Open AFS for Windows
- UPGRADE_CLIENT_MSG=Upgrade AFS Client
- PRODUCT_VERSION_MINOR=0
- CONFIGURING_AFS_CLIENT_SERVICE=Configuring the AFS Client service
- PRODUCT_NAME_CC=AFS Control Center
- PRODUCT_NAME_SERVER=AFS Server
- UPGRADE_CC_MSG=Upgrade AFS Control Center
- DOWNGRADE_SERVER_MSG=Downgrade AFS Server
- UNINST_DISPLAY_NAME_LIGHT_CLIENT=AFS Light 1.0 4.01
- PRODUCT_NAME_LIGHT_CLIENT=AFS Light
- ERROR_COMPONENT=Component:
- COMPANY_NAME=TransarcCorporation
- REINSTALL_CLIENT_MSG=Reinstall AFS Client
- DOWNGRADE_CC_MSG=Downgrade AFS Control Center
- UNINST_DISPLAY_NAME_DOCS=AFS Supplemental Documentation 1.0 4.01
- UNINST_KEY_SERVER=AFS Server
- VIEW_README_PROMPT_MSG=View the readme file
- INSTALL_LIGHT_CLIENT_MSG=AFS Light Client
- PRODUCT_VERSION_TITLE=1.0 4.01
- UNINST_DISPLAY_NAME_CC=AFS Control Center 1.0 4.01
- ERROR_FILEGROUP=File Group:
- ERROR_MOVEDATA=An error occurred during the move data process: %d
- CONFIGURING_AFS_SERVER_SERVICE=Configuring the AFS Server service
- CLIENT_DESC=AFS Client
- SET_NETWORK_PROVIDER_ERROR=Unable to configure the AFS Client as a Network Provider.
- PRODUCT_VERSION_MAJOR=1
- UNINST_DISPLAY_NAME_SERVER=AFS Server 1.0 4.01
- SETUPUTILS_NOT_FOUND=The file InstallUtils.dll could not be loaded.  Setup cannot continue.
- LIGHT_CLIENT_ALREADY_INSTALLED_MSG=AFS Light is already installed on this computer.
- SETUP_TYPE_MSG=Select the AFSŪ for Windows products that you wish to install:
- PRODUCT_KEY_SERVER=bosctlsvc.exe
- INSTALL_SERVER_MSG=AFS Server
- REINSTALL_LIGHT_CLIENT_MSG=Reinstall AFS Light Client
- PRODUCT_NAME_DOCS=AFS Supplemental Documentation
- NEW_STRING1=
- PRODUCT_KEY_DOCS=dummy.exe
- TITLE_CAPTIONBAR=AFSŪ for Windows Setup
- CONFIG_FILE_MAN_EXT_ERROR=Failed to configure the AFS Client File Manager Extension.
- CONFIGURING_AFS_CREDS_ERROR=Failed to configure the AFS Client toolbar tool.
- UPGRADE_SERVER_MSG=Upgrade AFS Server
- PRODUCT_VERSION_RELEASE_TYPE=GA
- AFS_CLIENT_SERVICE_INSTALL_ERROR=An error occurred during configuration of the AFS Client service: %d
- CLIENT_TITLE=AFS Client
- PRODUCT_KEY_CC=TaAfsServerManager.exe
- AFS_SERVER_SERVICE_INSTALL_ERROR=An error occurred during configuration of the AFS Server service: %d
- LIGHT_CLIENT_DESC=AFS Light
- CLIENT_FILE_MAN_EXT_ENTRY_NAME=TransarcAFSFileManExt
- INSTALL_CC_MSG=AFS Control Center
- REINSTALL_CC_MSG=Reinstall AFS Control Center
- PRODUCT_NAME_CLIENT=AFS Client
- CONFIGURING_AFS_CREDS=Configuring the AFS Client
- DOWNGRADE_DOCS_MSG=Downgrade AFS Supplemental Documentation
- INSTALL_DOCS_MSG=AFS Supplemental Documentation
- PRODUCT_KEY_LIGHT_CLIENT=fs.exe
- FOLDER_NAME=IBM AFS
- ERROR_FILE=File:
- ERROR_VGARESOLUTION=This program requires VGA or better resolution.
- REINSTALL_SERVER_MSG=Reinstall AFS Server
- DOWNGRADE_CLIENT_MSG=Downgrade AFS Client
- PRODUCT_VERSION_BETA_LEVEL=0
- UNINST_KEY_CC=AFS Control Center
- UNINST_KEY_CLIENT=AFS Client
- UPGRADE_DOCS_MSG=Upgrade AFS Supplemental Documentation
- DOWNGRADE_PREP_MSG=Preparing to downgrade the %s.  Please wait...this may be a lengthy process.
- PRODUCT_VERSION_PATCH_LEVEL=401
- NON_UPGRADABLE_SOFTWARE_INSTALLED_ERROR_MSG=Non-upgradable versions of this product are installed on your computer.  These \nversions must be uninstalled before the current versions can be installed.
- CANT_INSTALL_BOTH_CLIENTS_MSG=Please select only one of the AFS Clients to install.  You cannot install both.
- UNINST_KEY_LIGHT_CLIENT=AFS Light
- UPGRADE_LIGHT_CLIENT_MSG=Upgrade AFS Light Client
- UNINST_KEY_DOCS=AFS Supplemental Documentation
- UNINST_DISPLAY_NAME_CLIENT=AFS Client 1.0 4.01
- REINSTALL_DOCS_MSG=Reinstall AFS Supplemental Documentation
- UPGRADE_PREP_MSG=Preparing to upgrade the %s.  Please wait...this may be a lengthy process.
- MUST_BE_AN_ADMIN_MSG=You must be a member of the local Administrators group on this Windows system in order to install this product.
- LIGHT_CLIENT_TITLE=AFS Light
- PRODUCT_NAME=AFSŪ for Windows
- PRODUCT_KEY_CLIENT=fs.exe
- ERROR_UNINSTSETUP=unInstaller setup failed to initialize.  You may not be able to uninstall this product.
- ADD_PATH_ERROR=Failed to add program directory to the system path.
- SERVER_NEEDS_CLIENT_MSG=To install the AFS Server, you must also choose to install the AFS Client.
- INSTALL_CLIENT_MSG=AFS Client
- WSPP_FOLDER_NAME=IBM WebSphere\Performance Pack\AFS
- REINSTALL_PREP_MSG=Preparing to reinstall the %s.  Please wait...this may be a lengthy process.
- APPS_NOT_SAME_VERSION=The components you have selected for installation will result in a mixture of different versions of AFS for Windows.  AFS will not work correctly if installed in this way.  Please remake your selections so that all of the AFS components will be the same version after installation.\n
- STATUS_INSTALLING_CLIENT=Installing the AFS Client...
- STATUS_INSTALLING_SERVER=Installing the AFS Server...
- STATUS_INSTALLING_CCENTER=Installing the AFS Control Center...
- STATUS_INSTALLING_LIGHT=Installing AFS Light...
- STATUS_INSTALLING_HEADERS=Installing AFS Client extension files...
- STATUS_INSTALLING_DOCS=Installing AFS Supplemental Documentation...
- STATUS_INSTALLING_LANGUAGE=Installing language-specific content...
- DOCUMENTATION_ITEM_NAME=Documentation
- CFG_WIZARD_ITEM_NAME=Configuration Wizard
- CREDS_TOOL_ITEM_NAME=Authentication
- CLIENT_HELP_ITEM_NAME=AFS Client Help
- LIGHT_CLIENT_HELP_ITEM_NAME=AFS Light Help
- SERVER_MANAGER_ITEM_NAME=Server Manager
- ACCT_MANAGER_ITEM_NAME=Account Manager
- SERVER_GROUP_NAME=Server
- CLIENT_GROUP_NAME=Client
- CCENTER_GROUP_NAME=Control Center
- LIGHT_GROUP_NAME=Light
- 
- [General]
- Language=0009
- Type=STRINGTABLESPECIFIC
- Version=1.00.000
- 
--- 0 ----
Index: openafs/src/WINNT/install/InstallShield5/lang/en_US/value.txt
diff -c /dev/null openafs/src/WINNT/install/InstallShield5/lang/en_US/value.txt:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:34 2001
--- openafs/src/WINNT/install/InstallShield5/lang/en_US/value.txt	Thu Aug 23 01:31:52 2001
***************
*** 0 ****
--- 1,119 ----
+ [Data]
+ DEFAULT_INSTALL_DIR=IBM\AFS
+ CELLNAME_DEFAULT=almaden.ibm.com
+ CELLSERVDB_CONFIGNAME=
+ CELLSERVDB_WEB=
+ CELLSERVDB_INSTALL=
+ WELCOME_MESSAGE=
+ NOTHING_SELECTED_MSG=You must select something to install before continuing.
+ DOWNGRADE_LIGHT_CLIENT_MSG=Downgrade AFS Light Client
+ SETUP_FINISHED_MSG=Setup has finished installing AFSŪ for Windows on your computer.
+ TITLE_MAIN=Open AFS for Windows %5
+ SEVERE_DIALOG_TITLE=Open AFS for Windows
+ UPGRADE_CLIENT_MSG=Upgrade AFS Client
+ PRODUCT_VERSION_MINOR=%2
+ CONFIGURING_AFS_CLIENT_SERVICE=Configuring the AFS Client service
+ PRODUCT_NAME_CC=AFS Control Center
+ PRODUCT_NAME_SERVER=AFS Server
+ UPGRADE_CC_MSG=Upgrade AFS Control Center
+ DOWNGRADE_SERVER_MSG=Downgrade AFS Server
+ UNINST_DISPLAY_NAME_LIGHT_CLIENT=AFS Light %5
+ PRODUCT_NAME_LIGHT_CLIENT=AFS Light
+ ERROR_COMPONENT=Component:
+ COMPANY_NAME=TransarcCorporation
+ REINSTALL_CLIENT_MSG=Reinstall AFS Client
+ DOWNGRADE_CC_MSG=Downgrade AFS Control Center
+ UNINST_DISPLAY_NAME_DOCS=AFS Supplemental Documentation %5
+ UNINST_KEY_SERVER=AFS Server
+ VIEW_README_PROMPT_MSG=View the readme file
+ INSTALL_LIGHT_CLIENT_MSG=AFS Light Client
+ PRODUCT_VERSION_TITLE=%5
+ UNINST_DISPLAY_NAME_CC=AFS Control Center %5
+ ERROR_FILEGROUP=File Group:
+ ERROR_MOVEDATA=An error occurred during the move data process: %d
+ CONFIGURING_AFS_SERVER_SERVICE=Configuring the AFS Server service
+ CLIENT_DESC=AFS Client
+ SET_NETWORK_PROVIDER_ERROR=Unable to configure the AFS Client as a Network Provider.
+ PRODUCT_VERSION_MAJOR=%1
+ UNINST_DISPLAY_NAME_SERVER=AFS Server %5
+ SETUPUTILS_NOT_FOUND=The file InstallUtils.dll could not be loaded.  Setup cannot continue.
+ LIGHT_CLIENT_ALREADY_INSTALLED_MSG=AFS Light is already installed on this computer.
+ SETUP_TYPE_MSG=Select the AFSŪ for Windows products that you wish to install:
+ PRODUCT_KEY_SERVER=bosctlsvc.exe
+ INSTALL_SERVER_MSG=AFS Server
+ REINSTALL_LIGHT_CLIENT_MSG=Reinstall AFS Light Client
+ PRODUCT_NAME_DOCS=AFS Supplemental Documentation
+ NEW_STRING1=
+ PRODUCT_KEY_DOCS=dummy.exe
+ TITLE_CAPTIONBAR=AFSŪ for Windows Setup
+ CONFIG_FILE_MAN_EXT_ERROR=Failed to configure the AFS Client File Manager Extension.
+ CONFIGURING_AFS_CREDS_ERROR=Failed to configure the AFS Client toolbar tool.
+ UPGRADE_SERVER_MSG=Upgrade AFS Server
+ PRODUCT_VERSION_RELEASE_TYPE=GA
+ AFS_CLIENT_SERVICE_INSTALL_ERROR=An error occurred during configuration of the AFS Client service: %d
+ CLIENT_TITLE=AFS Client
+ PRODUCT_KEY_CC=TaAfsServerManager.exe
+ AFS_SERVER_SERVICE_INSTALL_ERROR=An error occurred during configuration of the AFS Server service: %d
+ LIGHT_CLIENT_DESC=AFS Light
+ CLIENT_FILE_MAN_EXT_ENTRY_NAME=TransarcAFSFileManExt
+ INSTALL_CC_MSG=AFS Control Center
+ REINSTALL_CC_MSG=Reinstall AFS Control Center
+ PRODUCT_NAME_CLIENT=AFS Client
+ CONFIGURING_AFS_CREDS=Configuring the AFS Client
+ DOWNGRADE_DOCS_MSG=Downgrade AFS Supplemental Documentation
+ INSTALL_DOCS_MSG=AFS Supplemental Documentation
+ PRODUCT_KEY_LIGHT_CLIENT=fs.exe
+ FOLDER_NAME=IBM AFS
+ ERROR_FILE=File:
+ ERROR_VGARESOLUTION=This program requires VGA or better resolution.
+ REINSTALL_SERVER_MSG=Reinstall AFS Server
+ DOWNGRADE_CLIENT_MSG=Downgrade AFS Client
+ PRODUCT_VERSION_BETA_LEVEL=0
+ UNINST_KEY_CC=AFS Control Center
+ UNINST_KEY_CLIENT=AFS Client
+ UPGRADE_DOCS_MSG=Upgrade AFS Supplemental Documentation
+ DOWNGRADE_PREP_MSG=Preparing to downgrade the %s.  Please wait...this may be a lengthy process.
+ PRODUCT_VERSION_PATCH_LEVEL=%3%4
+ NON_UPGRADABLE_SOFTWARE_INSTALLED_ERROR_MSG=Non-upgradable versions of this product are installed on your computer.  These \nversions must be uninstalled before the current versions can be installed.
+ CANT_INSTALL_BOTH_CLIENTS_MSG=Please select only one of the AFS Clients to install.  You cannot install both.
+ UNINST_KEY_LIGHT_CLIENT=AFS Light
+ UPGRADE_LIGHT_CLIENT_MSG=Upgrade AFS Light Client
+ UNINST_KEY_DOCS=AFS Supplemental Documentation
+ UNINST_DISPLAY_NAME_CLIENT=AFS Client %5
+ REINSTALL_DOCS_MSG=Reinstall AFS Supplemental Documentation
+ UPGRADE_PREP_MSG=Preparing to upgrade the %s.  Please wait...this may be a lengthy process.
+ MUST_BE_AN_ADMIN_MSG=You must be a member of the local Administrators group on this Windows system in order to install this product.
+ LIGHT_CLIENT_TITLE=AFS Light
+ PRODUCT_NAME=AFSŪ for Windows
+ PRODUCT_KEY_CLIENT=fs.exe
+ ERROR_UNINSTSETUP=unInstaller setup failed to initialize.  You may not be able to uninstall this product.
+ ADD_PATH_ERROR=Failed to add program directory to the system path.
+ SERVER_NEEDS_CLIENT_MSG=To install the AFS Server, you must also choose to install the AFS Client.
+ INSTALL_CLIENT_MSG=AFS Client
+ WSPP_FOLDER_NAME=IBM WebSphere\Performance Pack\AFS
+ REINSTALL_PREP_MSG=Preparing to reinstall the %s.  Please wait...this may be a lengthy process.
+ APPS_NOT_SAME_VERSION=The components you have selected for installation will result in a mixture of different versions of AFS for Windows.  AFS will not work correctly if installed in this way.  Please remake your selections so that all of the AFS components will be the same version after installation.\n
+ STATUS_INSTALLING_CLIENT=Installing the AFS Client...
+ STATUS_INSTALLING_SERVER=Installing the AFS Server...
+ STATUS_INSTALLING_CCENTER=Installing the AFS Control Center...
+ STATUS_INSTALLING_LIGHT=Installing AFS Light...
+ STATUS_INSTALLING_HEADERS=Installing AFS Client extension files...
+ STATUS_INSTALLING_DOCS=Installing AFS Supplemental Documentation...
+ STATUS_INSTALLING_LANGUAGE=Installing language-specific content...
+ DOCUMENTATION_ITEM_NAME=Documentation
+ CFG_WIZARD_ITEM_NAME=Configuration Wizard
+ CREDS_TOOL_ITEM_NAME=Authentication
+ CLIENT_HELP_ITEM_NAME=AFS Client Help
+ LIGHT_CLIENT_HELP_ITEM_NAME=AFS Light Help
+ SERVER_MANAGER_ITEM_NAME=Server Manager
+ ACCT_MANAGER_ITEM_NAME=Account Manager
+ SERVER_GROUP_NAME=Server
+ CLIENT_GROUP_NAME=Client
+ CCENTER_GROUP_NAME=Control Center
+ LIGHT_GROUP_NAME=Light
+ 
+ [General]
+ Language=0009
+ Type=STRINGTABLESPECIFIC
+ Version=1.00.000
+ 
Index: openafs/src/WINNT/install/Win9x/NTMakeFile
diff -c openafs/src/WINNT/install/Win9x/NTMakeFile:1.2 openafs/src/WINNT/install/Win9x/NTMakeFile:1.2.4.1
*** openafs/src/WINNT/install/Win9x/NTMakeFile:1.2	Sat Jun 23 13:26:09 2001
--- openafs/src/WINNT/install/Win9x/NTMakeFile	Thu Aug 23 01:31:52 2001
***************
*** 5,12 ****
  #	License.  For details, see the LICENSE file in the top-level source
  #	directory or online at http://www.openafs.org/dl/license10.html
  
- 
- 
  !INCLUDE ..\..\..\config\NTMakefile.$(SYS_NAME)
  !INCLUDE ..\..\..\config\NTMakefile.version
  OUTDIR = $(DESTDIR)\WinInstall
--- 5,10 ----
***************
*** 16,22 ****
  COMPONENTS = \
  	INSTALL.BAT \
  	afsd.pif \
- 	cellservdb \
  	readme.RTF \
  	license.txt \
  	templet.reg \
--- 14,19 ----
***************
*** 37,44 ****
  	$(DESTDIR)\lib\win95\pthread.dll \
  	$(DESTDIR)\lib\afsrpc.dll
  		
! $(COMPONENTS)::
! 	$(DESTDIR)\bin\util_cr.exe ~ $@ "Missing $@"
  	$(COPY) $@ $(DESTDIR)\WinInstall\.
  
  !IF (EXIST(ISBUILD.MAK))
--- 34,41 ----
  	$(DESTDIR)\lib\win95\pthread.dll \
  	$(DESTDIR)\lib\afsrpc.dll
  		
! $(COMPONENTS)::
! 	$(DESTDIR)\bin\util_cr.exe ~ $@
  	$(COPY) $@ $(DESTDIR)\WinInstall\.
  
  !IF (EXIST(ISBUILD.MAK))
***************
*** 57,62 ****
      $(DEL) $(OUTDIR)\DiskIm~1\WebInstall\*
  
  prep :
! 	$(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\sock.vxd" "SOCK.VXD is missing from $(DESTDIR)\WinInstall\."
! 	$(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\MMAP.vxd" "MMAP.VXD is missing from $(DESTDIR)\WinInstall\."
! 	$(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\AFSD.EXE" "AFSD.EXE is missing from $(DESTDIR)\WinInstall\."
--- 54,59 ----
      $(DEL) $(OUTDIR)\DiskIm~1\WebInstall\*
  
  prep :
! 	$(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\sock.vxd"
! 	$(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\MMAP.vxd"
! 	$(DESTDIR)\bin\util_cr.exe ~ "$(DESTDIR)\WinInstall\AFSD.EXE"
Index: openafs/src/WINNT/install/Win9x/setup.iss
diff -c /dev/null openafs/src/WINNT/install/Win9x/setup.iss:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:35 2001
--- openafs/src/WINNT/install/Win9x/setup.iss	Thu Aug 23 01:31:52 2001
***************
*** 0 ****
--- 1,22 ----
+ [InstallShield Silent]
+ Version=v6.00.000
+ File=Response File
+ 
+ [File Transfer]
+ OverwrittenReadOnly=NoToAll
+ 
+ [{EA711160-C786-11D3-A374-00105A6BCA4C}-DlgOrder]
+ Dlg0={EA711160-C786-11D3-A374-00105A6BCA4C}-SdWelcome-0
+ Count=3
+ Dlg1={EA711160-C786-11D3-A374-00105A6BCA4C}-SdAskDestPath-0
+ Dlg2={EA711160-C786-11D3-A374-00105A6BCA4C}-SprintfBox-0
+ 
+ [{EA711160-C786-11D3-A374-00105A6BCA4C}-SdWelcome-0]
+ Result=1
+ 
+ [{EA711160-C786-11D3-A374-00105A6BCA4C}-SdAskDestPath-0]
+ szDir=C:\afs cli
+ Result=1
+ 
+ [{EA711160-C786-11D3-A374-00105A6BCA4C}-SprintfBox-0]
+ Result=6
Index: openafs/src/WINNT/win9xpanel/CAfs.cpp
diff -c openafs/src/WINNT/win9xpanel/CAfs.cpp:1.1 openafs/src/WINNT/win9xpanel/CAfs.cpp:1.1.4.1
*** openafs/src/WINNT/win9xpanel/CAfs.cpp:1.1	Mon Apr 30 02:51:27 2001
--- openafs/src/WINNT/win9xpanel/CAfs.cpp	Thu Aug 23 01:31:52 2001
***************
*** 164,177 ****
                       /*DETACHED_PROCESS |*/ CREATE_NEW_CONSOLE | HIGH_PRIORITY_CLASS /*NORMAL_PRIORITY_CLASS*/,
                       NULL, NULL, &m_startUpInfo, &procInfo);
  
- 	LOG("AFSD Creation done - wait for notification");
  	if (!rc) {
! 		msg.Format("Error creating AFS Client Console process, Status=0x%0x", GetLastError());
  		return FALSE;
  	}
  	WPARAM wp;
  	CWINAFSLOADAPP->WaitForEvent(logintime*1000,&wp,&msg);
  	switch (wp)
  	{
  	case AFS_EXITCODE_NORMAL:
  		// extract machine name for logon
--- 164,190 ----
                       /*DETACHED_PROCESS |*/ CREATE_NEW_CONSOLE | HIGH_PRIORITY_CLASS /*NORMAL_PRIORITY_CLASS*/,
                       NULL, NULL, &m_startUpInfo, &procInfo);
  
  	if (!rc) {
! 		LPVOID lpMsgBuf;
! 		FormatMessage( 
! 			FORMAT_MESSAGE_ALLOCATE_BUFFER | 
! 			FORMAT_MESSAGE_FROM_SYSTEM | 
! 			FORMAT_MESSAGE_IGNORE_INSERTS,
! 			NULL,
! 			GetLastError(),
! 			MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
! 			(LPTSTR) &lpMsgBuf,
! 			0,
! 			NULL 
! 		);
! 		msg.Format("Error creating AFS Client Console process, Status=%s.",lpMsgBuf);
  		return FALSE;
  	}
+ 	LOG("AFSD Creation done - wait for notification");
  	WPARAM wp;
  	CWINAFSLOADAPP->WaitForEvent(logintime*1000,&wp,&msg);
  	switch (wp)
+ 
  	{
  	case AFS_EXITCODE_NORMAL:
  		// extract machine name for logon
***************
*** 360,365 ****
--- 373,379 ----
  	int code;
  	WIN32_FIND_DATA FileData;
  	CString dir;
+ 	if ((udrive==NULL) || (strlen(udrive)==0)) return TRUE;
  	dir.Format("%s\\*",udrive);
  	HANDLE hFile= FindFirstFile(
  		dir,               // file name
Index: openafs/src/WINNT/win9xpanel/Change.cpp
diff -c openafs/src/WINNT/win9xpanel/Change.cpp:1.1 openafs/src/WINNT/win9xpanel/Change.cpp:1.1.4.1
*** openafs/src/WINNT/win9xpanel/Change.cpp:1.1	Mon Apr 30 02:51:28 2001
--- openafs/src/WINNT/win9xpanel/Change.cpp	Thu Aug 23 01:31:52 2001
***************
*** 118,127 ****
  		szDrive[3]='*';
  		m_cDrive.SetCurSel(m_cDrive.FindString(0,szDrive));
  	}
- 	if (stricmp(m_sDescription,"all")) return TRUE;
- 	m_cPath.ModifyStyle(0,WS_DISABLED);
- 	m_cShare.ModifyStyle(0,WS_DISABLED);
- 	m_cAuto.ModifyStyle(0,WS_DISABLED);
  	return TRUE;  // return TRUE unless you set the focus to a control
  	              // EXCEPTION: OCX Property Pages should return FALSE
  }
--- 118,123 ----
***************
*** 159,166 ****
  {
     if (!*pszSubmount)
        return FALSE;
-    if (stricmp(pszSubmount,"all")==0)
- 	   return FALSE;					//disallow adding a share name of "all"
     for ( ; *pszSubmount; ++pszSubmount)
        {
        if (!isprint(*pszSubmount))
--- 155,160 ----
Index: openafs/src/WINNT/win9xpanel/NTMakefile
diff -c openafs/src/WINNT/win9xpanel/NTMakefile:1.2 openafs/src/WINNT/win9xpanel/NTMakefile:1.2.4.1
*** openafs/src/WINNT/win9xpanel/NTMakefile:1.2	Sat Jun 23 13:26:09 2001
--- openafs/src/WINNT/win9xpanel/NTMakefile	Thu Aug 23 01:31:52 2001
***************
*** 48,55 ****
  HLPDIR= .\HELP
  
  prep : 
! 	$(DESTDIR)\bin\util_cr.exe ~ "$(MSSDK)\Include\windows.h" "MSSDK must point to SDK include headers "
  
  !IF  "$(AFSDEV_BUILDTYPE)" == "FREE"
  
  INTDIR=.
--- 48,56 ----
  HLPDIR= .\HELP
  
  prep : 
! 	$(DESTDIR)\bin\util_cr.exe ~ "$(MSSDK)\Include\windows.h" "Enviornment variable MSSDK must point to SDK" 
  
+ 
  !IF  "$(AFSDEV_BUILDTYPE)" == "FREE"
  
  INTDIR=.
***************
*** 76,82 ****
  	/D "NDEBUG" /D "_MFC" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_WINNT" /D "_AFXDLL" /D "ENCRIPT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
  
  MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
! RSC_PROJ=/l 0x409 /fo"$(INTDIR)\WinAfsLoad.res" $(AFSD_INC_MFC) /d "NDEBUG" /d "_AFXDLL" 
  BSC32=bscmake.exe
  BSC32_FLAGS=/nologo /o"$(INTDIR)\WinAfsLoad.bsc" 
  BSC32_SBRS= \
--- 77,83 ----
  	/D "NDEBUG" /D "_MFC" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_WINNT" /D "_AFXDLL" /D "ENCRIPT" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c 
  
  MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 
! RSC_PROJ=/l 0x409 /fo"$(INTDIR)\WinAfsLoad.res" $(AFSD_INC_MFC) /d "AFSPRODUCT_VERSION=\"$(AFSPRODUCT_VERSION)\"" /d "NDEBUG" /d "_AFXDLL" 
  BSC32=bscmake.exe
  BSC32_FLAGS=/nologo /o"$(INTDIR)\WinAfsLoad.bsc" 
  BSC32_SBRS= \
***************
*** 137,143 ****
  	/D "_DEBUG" /D "WIN32_LEAN_AND_MEAN" /D _WIN32_IE=0x0400 /D "TESTBUTTONS" /D "_MFC" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_WINNT" /D "_AFXDLL" /D "ENCRIPT" /D "NOKNOK" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
  
  MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
! RSC_PROJ=/l 0x409 /fo"$(INTDIR)\WinAfsLoad.res" $(AFSD_INC_MFC) /d "_DEBUG" /d "_AFXDLL" 
  BSC32=bscmake.exe
  BSC32_FLAGS=/nologo /o"$(INTDIR)\WinAfsLoad.bsc" 
  BSC32_SBRS= \
--- 138,144 ----
  	/D "_DEBUG" /D "WIN32_LEAN_AND_MEAN" /D _WIN32_IE=0x0400 /D "TESTBUTTONS" /D "_MFC" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_WINNT" /D "_AFXDLL" /D "ENCRIPT" /D "NOKNOK" /Yu"stdafx.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c 
  
  MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 
! RSC_PROJ=/l 0x409 /fo"$(INTDIR)\WinAfsLoad.res" $(AFSD_INC_MFC) /d "AFSPRODUCT_VERSION=\"$(AFSPRODUCT_VERSION)\"" /d "_DEBUG" /d "_AFXDLL" 
  BSC32=bscmake.exe
  BSC32_FLAGS=/nologo /o"$(INTDIR)\WinAfsLoad.bsc" 
  BSC32_SBRS= \
Index: openafs/src/WINNT/win9xpanel/WinAfsLoad.cpp
diff -c openafs/src/WINNT/win9xpanel/WinAfsLoad.cpp:1.1 openafs/src/WINNT/win9xpanel/WinAfsLoad.cpp:1.1.4.1
*** openafs/src/WINNT/win9xpanel/WinAfsLoad.cpp:1.1	Mon Apr 30 02:51:34 2001
--- openafs/src/WINNT/win9xpanel/WinAfsLoad.cpp	Thu Aug 23 01:31:52 2001
***************
*** 154,159 ****
--- 154,160 ----
  	// show userid: password: connect
  	CharLower(m_lpCmdLine);
  	m_bShowAfs=(strstr(m_lpCmdLine,"show")!=NULL);
+ 	m_bConnect=(strstr(m_lpCmdLine,"connect")!=NULL);
  	if (m_bLogWindow)
  		ShowLog(TRUE);
  	if (m_bLog)
***************
*** 170,176 ****
  	{
  		cPassWord=(strstr(str,":"));
  	}
! //	BOOL bConnect=(strstr(m_lpCmdLine,"connect")!=NULL);
  
  	if (m_hAfsLoadFinish)	// SOME REASON THE WINDOW WAS NOT SHUT DOWN, SO LETES KILL IT
  	{
--- 171,177 ----
  	{
  		cPassWord=(strstr(str,":"));
  	}
! 	m_bNoID=(strstr(m_lpCmdLine,"noid")!=NULL);
  
  	if (m_hAfsLoadFinish)	// SOME REASON THE WINDOW WAS NOT SHUT DOWN, SO LETES KILL IT
  	{
***************
*** 407,413 ****
  		m_wParam=wp;
  		m_sMsg=msg;	
  		SetEvent(CMyUIThread::m_hEventThreadKilled);
! 		m_uNntifyMessage=0;
  		break;
  	default:
  		break;
--- 408,414 ----
  		m_wParam=wp;
  		m_sMsg=msg;	
  		SetEvent(CMyUIThread::m_hEventThreadKilled);
! 		m_uNotifyMessage=0;
  		break;
  	default:
  		break;
Index: openafs/src/WINNT/win9xpanel/WinAfsLoad.h
diff -c openafs/src/WINNT/win9xpanel/WinAfsLoad.h:1.1 openafs/src/WINNT/win9xpanel/WinAfsLoad.h:1.1.4.1
*** openafs/src/WINNT/win9xpanel/WinAfsLoad.h:1.1	Mon Apr 30 02:51:34 2001
--- openafs/src/WINNT/win9xpanel/WinAfsLoad.h	Thu Aug 23 01:31:52 2001
***************
*** 83,91 ****
  	UINT m_uEvent;
  	UINT m_uNotifyMessage;
  	WPARAM m_wParam;
! #if NOKNOK
! 	BOOL m_bNokNok;
! #endif
  
  	//{{AFX_MSG(CWinAfsLoadApp)
  	//}}AFX_MSG
--- 83,89 ----
  	UINT m_uEvent;
  	UINT m_uNotifyMessage;
  	WPARAM m_wParam;
! 	BOOL m_bNoID;
  
  	//{{AFX_MSG(CWinAfsLoadApp)
  	//}}AFX_MSG
Index: openafs/src/WINNT/win9xpanel/WinAfsLoad.rc
diff -c openafs/src/WINNT/win9xpanel/WinAfsLoad.rc:1.1 openafs/src/WINNT/win9xpanel/WinAfsLoad.rc:1.1.4.1
*** openafs/src/WINNT/win9xpanel/WinAfsLoad.rc:1.1	Mon Apr 30 02:51:35 2001
--- openafs/src/WINNT/win9xpanel/WinAfsLoad.rc	Thu Aug 23 01:31:52 2001
***************
*** 1,19 ****
! //generated resource script.
  //
- /* Copyright 2000, International Business Machines Corporation and others.
- 	All Rights Reserved.
-  
- 	This software has been released under the terms of the IBM Public
- 	License.  For details, see the LICENSE file in the top-level source
- 	directory or online at http://www.openafs.org/dl/license10.html
- */
- 
  #include "resource.h"
  
  // Generated Help ID header file
  #define APSTUDIO_HIDDEN_SYMBOLS
  #undef APSTUDIO_HIDDEN_SYMBOLS
  #define APSTUDIO_READONLY_SYMBOLS
  #define HIDC_STATIC                     0x80fcffff    // IDD_SETTINGS
  
  /////////////////////////////////////////////////////////////////////////////
--- 1,16 ----
! //Microsoft Developer Studio generated resource script.
  //
  #include "resource.h"
  
  // Generated Help ID header file
  #define APSTUDIO_HIDDEN_SYMBOLS
+ //#include "resource.hm"
  #undef APSTUDIO_HIDDEN_SYMBOLS
+ 
  #define APSTUDIO_READONLY_SYMBOLS
+ // Microsoft Developer Studio generated Help ID include file.
+ // Used by WinAfsLoad.rc
+ //
  #define HIDC_STATIC                     0x80fcffff    // IDD_SETTINGS
  
  /////////////////////////////////////////////////////////////////////////////
***************
*** 63,68 ****
--- 60,66 ----
      "LANGUAGE 9, 1\r\n"
      "#pragma code_page(1252)\r\n"
      "#endif //_WIN32\r\n"
+     "#include ""res\\WinAfsLoad.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
      "#include ""afxres.rc""         // Standard components\r\n"
      "#endif\r\n"
      "\0"
***************
*** 265,271 ****
  
  VS_VERSION_INFO VERSIONINFO
   FILEVERSION 1,0,0,1
!  PRODUCTVERSION 2,0,0,0
   FILEFLAGSMASK 0x3fL
  #ifdef _DEBUG
   FILEFLAGS 0x1L
--- 263,269 ----
  
  VS_VERSION_INFO VERSIONINFO
   FILEVERSION 1,0,0,1
!  PRODUCTVERSION 1,0,4,0
   FILEFLAGSMASK 0x3fL
  #ifdef _DEBUG
   FILEFLAGS 0x1L
***************
*** 290,296 ****
              VALUE "OriginalFilename", "WinAfsLoad.EXE\0"
              VALUE "PrivateBuild", "\0"
              VALUE "ProductName", "WinAfsLoad Application\0"
!             VALUE "ProductVersion", "2, 0, 0, 0\0"
              VALUE "SpecialBuild", "\0"
          END
      END
--- 288,294 ----
              VALUE "OriginalFilename", "WinAfsLoad.EXE\0"
              VALUE "PrivateBuild", "\0"
              VALUE "ProductName", "WinAfsLoad Application\0"
!             VALUE "ProductVersion", AFSPRODUCT_VERSION,"\0"
              VALUE "SpecialBuild", "\0"
          END
      END
***************
*** 493,498 ****
--- 491,500 ----
      IDH_ADD                 "HELP ADD"
      IDH_CHANGE              "Help Change"
      IDH_MAIN                "Help Main"
+ END
+ 
+ STRINGTABLE DISCARDABLE 
+ BEGIN
      IDM_CLEAR               "Clear Window"
  END
  
***************
*** 532,537 ****
--- 534,540 ----
  #pragma code_page(1252)
  #endif //_WIN32
  #include "afxres.rc"         // Standard components
+ //#include "res\WinAfsLoad.rc2"  // non-Microsoft Visual C++ edited resources
  #endif
  
  /////////////////////////////////////////////////////////////////////////////
Index: openafs/src/WINNT/win9xpanel/WinAfsLoadDlg.cpp
diff -c openafs/src/WINNT/win9xpanel/WinAfsLoadDlg.cpp:1.1 openafs/src/WINNT/win9xpanel/WinAfsLoadDlg.cpp:1.1.4.1
*** openafs/src/WINNT/win9xpanel/WinAfsLoadDlg.cpp:1.1	Mon Apr 30 02:51:35 2001
--- openafs/src/WINNT/win9xpanel/WinAfsLoadDlg.cpp	Thu Aug 23 01:31:52 2001
***************
*** 333,338 ****
--- 333,339 ----
  	LOG("ADVAPI32 %d.%d",(vernum>>16) & 0xff,vernum & 0xff);
  	m_pEncript = (CEncript *)new CEncript(this);
  	
+ 
  	// initiallze AFS and setup Progress display
  	if (!m_cAfs.Init(this,msg))
  		HandleError(msg);
***************
*** 341,347 ****
  	EnableToolTips(TRUE);
  	
  	m_bServiceIsActive=FALSE;
! 	SetWindowText(AFSTITLE);
  
  	UpdateData(TRUE);
  
--- 342,352 ----
  	EnableToolTips(TRUE);
  	
  	m_bServiceIsActive=FALSE;
! 	// Obtain Version String
! 	CRegkey key(HKEY_LOCAL_MACHINE,"Software\\Open AFS\\AFS Control Center","CurrentVersion");
! 	key.GetString("VersionString",m_VersionString,128);
! 	msg.Format("%s %s",AFSTITLE,m_VersionString);
! 	SetWindowText(msg);
  
  	UpdateData(TRUE);
  
***************
*** 349,355 ****
  	m_sComputername=compName;
  	m_sMountDisplay.Format("Connected Drives on Computer:%s",compName);
  	m_sUsername="";
- 	m_bHomepath=FALSE;
  	CRect rect;
  	GetWindowRect(&m_OriginalRect);
  	m_cOptionLine.GetWindowRect(&rect);
--- 354,359 ----
***************
*** 366,393 ****
  	}
  	CHAR pLoginName[UNLEN + 1];
  	size=UNLEN;
! 	if (GetUserName(pLoginName,&size))
! 		m_sLoginName=pLoginName;
! 	else
! 		m_sLoginName="Bozo";
! 	CString sUser,sPass;
! 	RegPassword(sUser,sPass,TRUE);
! 	if ((m_sUsername=="") || (m_sLoginName.IsEmpty()))
! 	{
! 		m_sUsername=sUser;
! 	}
! 	if ((m_sPassword=="") || (m_sPassword.IsEmpty()))
  	{
! 		m_sPassword=sPass;
  	}
- 
- 	if (m_sPassword.IsEmpty())
- 	{
- 		m_cSaveUsername.SetCheck(FALSE);
- 		RegLastUser(m_sUsername,TRUE);
- 	} else
- 		m_cSaveUsername.SetCheck(TRUE);
- 	
  	// Initialize mount control list
  
  	m_pImagelist = new CImageList();
--- 370,410 ----
  	}
  	CHAR pLoginName[UNLEN + 1];
  	size=UNLEN;
! 	if (CWINAFSLOADAPP->m_bNoID)
  	{
! 		CWnd *w=GetDlgItem(IDC_USERNAME);
! 		w->EnableWindow(FALSE);
! 		w=GetDlgItem(IDC_PASSWORD);
! 		w->EnableWindow(FALSE);
! 		w=GetDlgItem(IDC_SAVEUSERNAME);
! 		w->EnableWindow(FALSE);
! 	} else {
! 		if (GetUserName(pLoginName,&size))
! 		{
! 			m_sLoginName=pLoginName;
! 		} else
! 			m_sLoginName="Bozo";
! 		CString sUser,sPass;
! 		RegPassword(sUser,sPass,TRUE);
! 		if (m_sUsername=="")
! 		{
! 			m_sUsername=sUser;
! 		}
! 		if ((m_sUsername=="") && (m_sLoginName!="Bozo"))
! 		{
! 			m_sUsername=m_sLoginName;
! 		}
! 		if ((m_sPassword=="") || (m_sPassword.IsEmpty()))
! 		{
! 			m_sPassword=sPass;
! 		}
! 		if (m_sPassword.IsEmpty())
! 		{
! 			m_cSaveUsername.SetCheck(FALSE);
! 			RegLastUser(m_sUsername,TRUE);
! 		} else
! 			m_cSaveUsername.SetCheck(TRUE);
  	}
  	// Initialize mount control list
  
  	m_pImagelist = new CImageList();
***************
*** 621,633 ****
  			BYTE *lpData=(BYTE *)new BYTE[rc];
  			if (GetFileVersionInfo(wdir,wHandle,rc,lpData))
  			{
- 				VS_FIXEDFILEINFO *pver;
  				UINT len;
! 				if (VerQueryValue(lpData,"\\",(PVOID *)&pver,&len))
! 				{
! 					dlgAbout.m_sVersion.Format("WinAFSload Version %d.%d.%d",(pver->dwProductVersionMS>>16) &0xff ,pver->dwProductVersionMS & 0xff,(pver->dwProductVersionLS>>16) &0xff );
  				}
! 			}
  			delete lpData;
  		}
  		dlgAbout.DoModal();
--- 638,667 ----
  			BYTE *lpData=(BYTE *)new BYTE[rc];
  			if (GetFileVersionInfo(wdir,wHandle,rc,lpData))
  			{
  				UINT len;
! 				struct TRANSLATION {
! 					WORD langID;         // language ID
! 					WORD charset;        // character set (code page)
! 				};
! 				CString msg;
! 				TRANSLATION mTrans,* pTrans;
! 				if (VerQueryValue(lpData,
! 					"\\VarFileInfo\\Translation", (PVOID *)&pTrans, &len) && len >= 4) {
! 					mTrans = *pTrans;
! 					TRACE("code page = %d\n", mTrans.charset);
! 					}
! 				LPCTSTR pVal;
! 				UINT iLenVal;
! 				CString query;
! 				query.Format(_T("\\StringFileInfo\\%04x%04x\\%s"),
! 					mTrans.langID,
! 					mTrans.charset,
! 					_T("ProductVersion"));
! 				if (VerQueryValue(lpData, (LPTSTR)(LPCTSTR)query,
! 					(LPVOID*)&pVal, &iLenVal)) {
! //					dlgAbout.m_sVersion.Format("WinAFSload Version %s",pVal);
  				}
!    			}
  			delete lpData;
  		}
  		dlgAbout.DoModal();
***************
*** 721,737 ****
  		return;
  	}
  	CCancel cancel(m_bConnect,FALSE);		//clear m_bConnect when connection done
! 	if (m_sUsername.IsEmpty() || m_sPassword.IsEmpty()) 
  	{
! 		HandleError("You must enter a username and password!");
! 		if (m_sUsername.IsEmpty()) m_cUsername.SetFocus();
! 		else m_cPassword.SetFocus();
  		return;
  	}
  	CProgress progress(this,7);
  	progress.Next();
  	if (!m_cAfs.Create(msg,m_sComputername,m_procInfo)) 
  	{
  		HandleError(msg);
  		m_procInfo.hThread=0;
  		return;
--- 755,774 ----
  		return;
  	}
  	CCancel cancel(m_bConnect,FALSE);		//clear m_bConnect when connection done
! 	if (									// if username is present then must have password
! 		IsGetTokens() 
! 		&& (m_sPassword=="")
! 		) 
  	{
! 		HandleError("You must enter a password!");
! 		m_cPassword.SetFocus();
  		return;
  	}
  	CProgress progress(this,7);
  	progress.Next();
  	if (!m_cAfs.Create(msg,m_sComputername,m_procInfo)) 
  	{
+ 		progress.Finish();
  		HandleError(msg);
  		m_procInfo.hThread=0;
  		return;
***************
*** 739,750 ****
  	// CWINAFSLOADAPP->m_sMsg contains the host name used for login
  	LOG("AFS Client Console started successfully [%s].",(const char *)m_sComputername);
  	CString sDrive;
! 	// lets find the All
  	CString sKey;
  	for (int iItem=0;iItem<m_cMountlist.GetItemCount();iItem++)
  	{
  		sKey = m_cMountlist.GetItemText(iItem,COLSHARE);
! 		if (stricmp(sKey,"all")!=0) continue;
  		CString sAuto(m_cMountlist.GetItemText(iItem,COLAUTO));
  		if (sAuto!="*")
  			continue;
--- 776,788 ----
  	// CWINAFSLOADAPP->m_sMsg contains the host name used for login
  	LOG("AFS Client Console started successfully [%s].",(const char *)m_sComputername);
  	CString sDrive;
! 
  	CString sKey;
+ 	int iMounted=-1;
  	for (int iItem=0;iItem<m_cMountlist.GetItemCount();iItem++)
  	{
  		sKey = m_cMountlist.GetItemText(iItem,COLSHARE);
! 		if (stricmp(sKey,"all")!=0) continue;		// lets find the All first
  		CString sAuto(m_cMountlist.GetItemText(iItem,COLAUTO));
  		if (sAuto!="*")
  			continue;
***************
*** 754,787 ****
  		{
  			m_cMountlist.SetCheck(iItem,TRUE);
  			AddMenu(sDrive,sKey);
  		} else {
  			CString msg2;
  			m_cAfs.Shutdown(msg2);
  			m_procInfo.hThread=0;
  			msg2.Format("Connect can't continue: %s",msg);
  			HandleError(msg2);
  			return;
  		}
  		break;
  	}
! 	if (stricmp(sKey,"all")!=0){
! 		m_cAfs.Shutdown(msg);
! 		m_procInfo.hThread=0;
! 		msg="Connect can't continue, 'all' path not defined";
! 		HandleError(msg);
! 		return;
  	}
  	progress.Next();
! 	if (!m_cAfs.Authencate(msg,m_sUsername,m_sPassword))
  	{
! 		CString msg2;
! 		m_cAfs.Dismount(msg2,sDrive,TRUE);
! 		m_cMountlist.SetCheck(iItem,FALSE);
! 		RemoveMenu(sDrive);
! 		m_cAfs.Shutdown(msg2);
! 		m_procInfo.hThread=0;
! 		HandleError(msg);
! 		return;
  	}
  	progress.Next();	
  	// scan through the list for any additional items to connect
--- 792,861 ----
  		{
  			m_cMountlist.SetCheck(iItem,TRUE);
  			AddMenu(sDrive,sKey);
+ 			iMounted=iItem;
  		} else {
  			CString msg2;
  			m_cAfs.Shutdown(msg2);
  			m_procInfo.hThread=0;
  			msg2.Format("Connect can't continue: %s",msg);
+ 			progress.Finish();
  			HandleError(msg2);
  			return;
  		}
  		break;
  	}
! 	if (iMounted<0){
! 		// Scan for any other connection
! 		for (int iItem=0;iItem<m_cMountlist.GetItemCount();iItem++)
! 		{
! 			CString sAuto(m_cMountlist.GetItemText(iItem,COLAUTO));
! 			if (sAuto!="*")
! 				continue;
! 			sDrive=m_cMountlist.GetItemText(iItem,COLDRIVE);
! 			LOG("Connect %s %s",sDrive,sKey);
! 			if (m_cAfs.Mount(msg,sDrive,sKey))
! 			{
! 				m_cMountlist.SetCheck(iItem,TRUE);
! 				AddMenu(sDrive,sKey);
! 				iMounted=iItem;
! 			} else {
! 				CString msg2;
! 				m_cAfs.Shutdown(msg2);
! 				m_procInfo.hThread=0;
! 				msg2.Format("Connect can't continue: %s",msg);
! 				progress.Finish();
! 				HandleError(msg2);
! 				return;
! 			}
! 			break;
! 		}
  	}
  	progress.Next();
! 	if  (IsGetTokens())
  	{
! #if 0
! 		if (iMounted<0)		//have we mounted at least one drive
! 		{
! 			m_cAfs.Shutdown(msg);
! 			m_procInfo.hThread=0;
! 			msg="Connect can't continue, mountable drive not defined";
! 			progress.Finish();
! 			HandleError(msg);
! 			return;
! 		}
! #endif
! 		if (!m_cAfs.Authencate(msg,m_sUsername,m_sPassword))
! 		{
! 			CString msg2;
! 			m_cAfs.Dismount(msg2,sDrive,TRUE);
! 			m_cMountlist.SetCheck(iItem,FALSE);
! 			RemoveMenu(sDrive);
! 			m_cAfs.Shutdown(msg2);
! 			m_procInfo.hThread=0;
! 			progress.Finish();
! 			HandleError(msg);
! 			return;
! 		}
  	}
  	progress.Next();	
  	// scan through the list for any additional items to connect
***************
*** 789,795 ****
  	for (iItem=0;iItem<m_cMountlist.GetItemCount();iItem++)
  	{
  		CString sKey(m_cMountlist.GetItemText(iItem,COLSHARE));
! 		if (stricmp(sKey,"all")==0) continue;
  		CString sAuto(m_cMountlist.GetItemText(iItem,COLAUTO));
  		if (sAuto!="*")
  			continue;
--- 863,869 ----
  	for (iItem=0;iItem<m_cMountlist.GetItemCount();iItem++)
  	{
  		CString sKey(m_cMountlist.GetItemText(iItem,COLSHARE));
! 		if (iItem==iMounted) continue;
  		CString sAuto(m_cMountlist.GetItemText(iItem,COLAUTO));
  		if (sAuto!="*")
  			continue;
***************
*** 1028,1035 ****
  		m_cConnect.Invalidate();
  		m_cCancel.SetWindowText("Cancel");
  		m_cCancel.Invalidate();
! 		m_cAuthenicate.ModifyStyle(WS_DISABLED,0);
! 		m_cAuthenicate.Invalidate();
  		m_trayIcon.SetConnectState(0);
  		return;
  	}
--- 1102,1116 ----
  		m_cConnect.Invalidate();
  		m_cCancel.SetWindowText("Cancel");
  		m_cCancel.Invalidate();
! 		if (!CWINAFSLOADAPP->m_bNoID)
! 		{	
! 			m_cAuthenicate.ModifyStyle(WS_DISABLED,0);
! 			if (IsGetTokens())
! 				m_cAuthenicate.SetWindowText("ReAuthenicate");
! 			 else 	//tokens are not gotten; allow authenication
! 				m_cAuthenicate.SetWindowText("Authenicate");
! 			m_cAuthenicate.Invalidate();
! 		}
  		m_trayIcon.SetConnectState(0);
  		return;
  	}
***************
*** 1073,1079 ****
  	OnSysCommand(IDM_EXPLORERAFS+64, 0);
  }
  
! #define MAXKEY (SHARENAMESIZE+1)*MAXSHARES
  BOOL CWinAfsLoadDlg::ProfileData(BOOL put)
  {
  	CString dINI;
--- 1154,1161 ----
  	OnSysCommand(IDM_EXPLORERAFS+64, 0);
  }
  
! #define MAXDRIVESIZE (SHARENAMESIZE+5)*MAXSHARES
! 
  BOOL CWinAfsLoadDlg::ProfileData(BOOL put)
  {
  	CString dINI;
***************
*** 1106,1112 ****
  				dptr=dblock+dused;
  				wsprintf(dptr,"%s=%s%s",sKey,sAuto,sDrive);
  				dused+=len;
- 				if (stricmp(sKey,"all")==0) continue;	//skip 'all' output
  				len=sKey.GetLength()+sPath.GetLength()+2;
  				if (sused+len>=scur)
  					sblock=(char *)realloc(sblock,(scur+=BLOCKSIZE));
--- 1188,1193 ----
***************
*** 1121,1211 ****
  		WritePrivateProfileSection("AFS Drivemounts",dblock,dINI);
  		delete dblock;
  		delete sblock;
! 	} else {
! 		char sKey[MAXKEY+2];
  		CHAR sPath[MAX_PATH+1];
  		CHAR sDrive[DRIVESIZE+1];
  		CHAR sAuto[AUTOSIZE+1];
  		strcpy(sAuto," ");
- 		int len;
  		CString path;
! 		int keylen=GetPrivateProfileString("AFS Submounts", NULL, "", sKey, MAXKEY,tINI);
! 		PCHAR pkey=sKey;
! 		if (keylen>=MAXKEY)
! 		{
! 			CString msg;
! 			msg.Format("Profile String Error - Too many entries (%d)",MAXSHARES);
! 			HandleError(msg,TRUE);
! 			return FALSE;
! 		}
! 		// lets scan for all and home first, we want to place them 
  		//mode: 0=look for all, 1=look for home, 2=finish the rest		
  		for(int mode=0;mode<3;mode++)
  		{
! 			while (keylen>1)
  			{
! 				switch (mode)
  				{
! 				case 0:	//we skip looking for all
! 					break;
! 				case 1:
! 					if (stricmp(pkey,"home")!=0)
! 					{
! 						keylen-=(strlen(pkey)+1);
! 						pkey+=(strlen(pkey)+1);
! 						continue;
! 					}
! 					break;
! 				default:
! 					if((stricmp(pkey,"all")==0) || (stricmp(pkey,"home")==0))
! 					{
! 						keylen-=(strlen(pkey)+1);
! 						pkey+=(strlen(pkey)+1);
! 						continue;
! 					}
  					break;
  				}
! 				if (strlen(pkey)==0)
  				{
! 					HandleError("Profile String Error - Empty key",FALSE);
  					ret=FALSE;
! 					keylen-=(strlen(pkey)+1);
! 					continue;
! 				}
! 				if (mode!=0)
! 				{
! 					if ((len=GetPrivateProfileString("AFS Submounts", pkey, "", sPath, MAX_PATH,tINI))==0)
! 					{
! 						CString msg;
! 						msg.Format("Profile String Error on Submount key:%s",pkey);
! 						HandleError(msg,FALSE);
! 						ret=FALSE;
! 						keylen-=(strlen(pkey)+1);
! 						pkey+=(strlen(pkey)+1);
! 						continue;
! 					}
! 				} else {
! 					strcpy(sPath,"\\");
! 					pkey="all";
! 				}
! 				*sDrive=0;
! 				if ((len=GetPrivateProfileString("AFS Drivemounts", pkey, "", sDrive, DRIVESIZE,dINI))==0)
! 				{
! 					if ((stricmp("all",pkey)==0)||(stricmp("home",pkey)==0))
! 					{// allow for no drive id on home
! 						if (stricmp("home",pkey)==0)
! 							strcpy(sDrive,"*U");
! 						else
! 							strcpy(sDrive,"*Z");
! 					} else {
! 						CString msg;
! 						msg.Format("Profile String Error on Path key:%s",pkey);
! 						HandleError(msg,TRUE);
! 						ret=FALSE;
! 						keylen-=(strlen(pkey)+1);
! 						pkey+=(strlen(pkey)+1);
! 						continue;
! 					} 
  				}
  				if (sDrive[0]=='*')	//test for leading *
  				{
--- 1202,1242 ----
  		WritePrivateProfileSection("AFS Drivemounts",dblock,dINI);
  		delete dblock;
  		delete sblock;
! 	} else {	//get
! 		char sShare[SHARENAMESIZE+1];
  		CHAR sPath[MAX_PATH+1];
+ 		CHAR sDriveMount[MAXDRIVESIZE+2];
  		CHAR sDrive[DRIVESIZE+1];
  		CHAR sAuto[AUTOSIZE+1];
  		strcpy(sAuto," ");
  		CString path;
! 		// lets scan for all and home first, we want to place them first
  		//mode: 0=look for all, 1=look for home, 2=finish the rest		
  		for(int mode=0;mode<3;mode++)
  		{
! 			int drivelen=GetPrivateProfileString("AFS Drivemounts", NULL, "", sDriveMount, MAXDRIVESIZE,dINI);
! 			if (drivelen>=MAXDRIVESIZE)
  			{
! 				CString msg;
! 				msg.Format("Profile String Error - Too many entries (%d)",MAXSHARES);
! 				HandleError(msg,TRUE);
! 				return FALSE;
! 			}
! 			PCHAR pDrivekey=sDriveMount;
! 			while (drivelen>1)
! 			{
! 				if ((strlen(pDrivekey)==0) || (strlen(pDrivekey)>SHARENAMESIZE))
  				{
! 					HandleError("Profile String Error - AFS Drivemounts - Share Name",FALSE);
! 					ret=FALSE;
  					break;
  				}
! 				strcpy(sShare,pDrivekey);
! 				if (GetPrivateProfileString("AFS Drivemounts", sShare, "", sDrive, DRIVESIZE,dINI)==0)
  				{
! 					HandleError("Profile String Error - AFS Drivemounts - Drive Name",FALSE);
  					ret=FALSE;
! 					break;
  				}
  				if (sDrive[0]=='*')	//test for leading *
  				{
***************
*** 1215,1260 ****
  				} else
  					strcpy(sAuto," ");
  				sDrive[1]=0;	//force to be single character
- 				if (stricmp("home",pkey)==0)	//force auto connect for home and all
- 				{
- 					m_bHomepath=TRUE;
- 				} 
  				strupr(sDrive);
! 				if ((strlen(sDrive)!=1)||(strspn(sDrive,"ABCDEFGHIJKLMNOPQRSTUVWXYZ")==0))
  				{
! 					if (stricmp("home",pkey)==0)
! 						strcpy(sDrive,"U");
! 					else if (stricmp("all",pkey)==0)
! 						strcpy(sDrive,"Z");
! 					else
! 						strcpy(sDrive,"");
  				}
  				strcat(sDrive,":");
! 				if (mode==0) 
! 					strcpy(sAuto,"*");	//no matter how it turns out 'all' is forced on.
! 				AddToList(sDrive,sPath,pkey,sAuto);
! 				if (mode<2) break;
! 				keylen-=(strlen(pkey)+1);
! 				pkey+=(strlen(pkey)+1);
! 			}
! 			switch (mode)
! 			{
! 			case 0:
! 				if (keylen<=1)	//we never found "all"
! 					AddToList("Z:","\\","all","*");
! 				keylen=GetPrivateProfileString("AFS Submounts", NULL, "", sKey, MAXKEY,tINI);
! 				pkey=sKey;
! 				break;
! 			case 1:
! 				if (keylen<=1)	//we never found "home"
  					break;
! 				keylen=GetPrivateProfileString("AFS Submounts", NULL, "", sKey, MAXKEY,tINI);
! 				pkey=sKey;
!  				break;
! 			default:
! 				break;
  			}
  		}
  	}
  	return ret;
  }
--- 1246,1298 ----
  				} else
  					strcpy(sAuto," ");
  				sDrive[1]=0;	//force to be single character
  				strupr(sDrive);
! 				if (strspn(sDrive,"DEFGHIJKLMNOPQRSTUVWXYZ")==0)
  				{
! 					HandleError("Profile String Error - AFS Drivemounts - Drive Letter",FALSE);
! 					ret=FALSE;
! 					break;
  				}
  				strcat(sDrive,":");
! 				switch (mode)
! 				{
! 				case 0:
! 					if (stricmp("all",sShare)!=0) break;
! 					if (GetPrivateProfileString("AFS Submounts", sShare, "", sPath, MAX_PATH,tINI)==0)
! 					{
! 						strcpy(sPath,"/");	//none defined
! 					}
! 					AddToList(sDrive,sPath,sShare,sAuto);
! 					drivelen=0;
! 					continue;
! 
! 				case 1:
! 					if (stricmp("home",sShare)!=0) break;
! 					if (GetPrivateProfileString("AFS Submounts", sShare, "", sPath, MAX_PATH,tINI)==0)
! 					{
! 						HandleError("Profile String Error - AFS Drivemounts - Share Name",FALSE);
! 						ret=FALSE;
! 						break;
! 					}
! 					AddToList(sDrive,sPath,sShare,sAuto);
! 					drivelen=0;
! 					continue;
! 				default:
! 					if ((stricmp("all",sShare)==0)|| (stricmp("home",sShare)==0)) break;
! 					if (GetPrivateProfileString("AFS Submounts", sShare, "", sPath, MAX_PATH,tINI)==0)
! 					{
! 						HandleError("Profile String Error - AFS Drivemounts - Share Name",FALSE);
! 						ret=FALSE;
! 						break;
! 					}
! 					AddToList(sDrive,sPath,sShare,sAuto);
  					break;
! 				}
! 				drivelen-=(strlen(pDrivekey)+1);
! 				pDrivekey+=(strlen(pDrivekey)+1);
  			}
  		}
+ 
  	}
  	return ret;
  }
***************
*** 1359,1369 ****
--- 1397,1409 ----
  			HandleError("You cannot remove Item from the list while connected!");
  			continue;
  		}
+ #if 0
  		if (stricmp(m_cMountlist.GetItemText(nItem,COLSHARE),"all")==0)
  		{
  			HandleError("You cannot remove 'All' Item from the list!");
  			continue;
  		}
+ #endif
  		m_cMountlist.DeleteItem(nItem);
  	}
  	ProfileData(TRUE);
***************
*** 1686,1701 ****
--- 1726,1756 ----
  	m_nShown=0;
  	m_cAuthWarn.ShowWindow(SW_HIDE);
  	LOG("Re-Authenication");
+ 	if (m_sUsername=="")
+ 	{
+ 		HandleError("You must enter a user name!");
+ 		m_cUsername.SetFocus();
+ 		return;
+ 	}
+ 	if (m_sPassword=="")
+ 	{
+ 		HandleError("You must enter a password!");
+ 		m_cPassword.SetFocus();
+ 		return;
+ 	}
  	if (!m_cAfs.Authencate(msg,m_sUsername,m_sPassword))
  	{
  		HandleError(msg);
  		return;
  	}
+ 	m_cAuthenicate.SetWindowText("ReAuthenicate");
+ 	m_cAuthenicate.Invalidate();
  	if (!m_cSaveUsername.GetCheck())
  	{
  		m_sPassword.Empty();
  		UpdateData(FALSE);
  	}
+ 
  }
  
  
Index: openafs/src/WINNT/win9xpanel/WinAfsLoadDlg.h
diff -c openafs/src/WINNT/win9xpanel/WinAfsLoadDlg.h:1.1 openafs/src/WINNT/win9xpanel/WinAfsLoadDlg.h:1.1.4.1
*** openafs/src/WINNT/win9xpanel/WinAfsLoadDlg.h:1.1	Mon Apr 30 02:51:35 2001
--- openafs/src/WINNT/win9xpanel/WinAfsLoadDlg.h	Thu Aug 23 01:31:52 2001
***************
*** 37,42 ****
--- 37,43 ----
  	void OnShowAddMenus();
  	LRESULT OnNotifyReturn(WPARAM wParam, LPARAM lParam);
  	LRESULT OnAfsEvent(WPARAM wParam, LPARAM lParam);
+ 	BOOL IsGetTokens(){return (!CWINAFSLOADAPP->m_bNoID) && (m_sUsername!="");}
  
  // Dialog Data
  	//{{AFX_DATA(CWinAfsLoadDlg)
***************
*** 72,77 ****
--- 73,79 ----
  
  // Implementation
  protected:
+ 	CString m_VersionString;
  	CAfs m_cAfs;
  	CTrayIcon	m_trayIcon;		// my tray icon
  	HICON m_hIcon;
Index: openafs/src/WINNT/win9xpanel/cafs.h
diff -c openafs/src/WINNT/win9xpanel/cafs.h:1.1 openafs/src/WINNT/win9xpanel/cafs.h:1.1.4.1
*** openafs/src/WINNT/win9xpanel/cafs.h:1.1	Mon Apr 30 02:51:36 2001
--- openafs/src/WINNT/win9xpanel/cafs.h	Thu Aug 23 01:31:52 2001
***************
*** 13,25 ****
  #define DOSTITLEFINISH "Finished - AFS Client Console"
  #define APPTITLE "AFS"
  #define APPTITLEFINISH "Finished - AFSD"
! #ifdef _DEBUG 
! #define CMDLINE "AFSD.PIF -startup"
! //#define CMDLINE ".//debug//AFSD.EXE -startup"
! #else
  #define CMDLINE "AFSD.EXE -startup"
! //#define CMDLINE "AFSD.PIF -startup"
! //#define CMDLINE "AFSD.EXE"
  #endif
  
  #ifndef __CAFS__
--- 13,26 ----
  #define DOSTITLEFINISH "Finished - AFS Client Console"
  #define APPTITLE "AFS"
  #define APPTITLEFINISH "Finished - AFSD"
! #ifdef DEV_IDE
! #ifdef _DEBUG
  #define CMDLINE "AFSD.EXE -startup"
! #else
! #define CMDLINE ".//release//AFSD.EXE -startup"
! #endif
! #else
! #define CMDLINE "AFSD.PIF -startup"
  #endif
  
  #ifndef __CAFS__
Index: openafs/src/config/NTMakefile
diff -c openafs/src/config/NTMakefile:1.5 openafs/src/config/NTMakefile:1.5.2.1
*** openafs/src/config/NTMakefile:1.5	Sat Jun 23 13:26:10 2001
--- openafs/src/config/NTMakefile	Thu Aug 23 01:31:53 2001
***************
*** 65,70 ****
--- 65,73 ----
  !	IF (!EXIST($(DESTDIR)\WinInstall))
  		$(MKDIR) $(DESTDIR)\WinInstall
  !	ENDIF
+ !	IF (!EXIST($(DESTDIR)\WinInstall\Config))
+ 		$(MKDIR) $(DESTDIR)\WinInstall\Config
+ !	ENDIF
  !	IF (!EXIST($(DESTDIR)\root.server))
  		$(MKDIR) $(DESTDIR)\root.server
  !	ENDIF
***************
*** 89,94 ****
--- 92,98 ----
  !	IF (!EXIST($(DESTDIR)\root.client\usr\vice\etc))
  		$(MKDIR) $(DESTDIR)\root.client\usr\vice\etc
  !	ENDIF
+ 	$(COPY) AFSCONFIG-WINDOWS.H $(DESTDIR)\include\afs\.
  
  INCCOPY = \
  	$(DESTDIR)\bin\rmbat.bat \
Index: openafs/src/config/NTMakefile.i386_nt40
diff -c openafs/src/config/NTMakefile.i386_nt40:1.5 openafs/src/config/NTMakefile.i386_nt40:1.5.2.1
*** openafs/src/config/NTMakefile.i386_nt40:1.5	Sat Jun 23 13:26:10 2001
--- openafs/src/config/NTMakefile.i386_nt40	Thu Aug 23 01:31:53 2001
***************
*** 36,41 ****
--- 36,47 ----
  APPVER = 4.0
  !ENDIF
  
+ #define used in WinNT/2000 installation and program version display
+ AFSPRODUCT_VERSION=1.1.1 a
+ CELLNAME_DEFAULT=Your Cell Name
+ CELLSERVDB_INSTALL=CellServDB.GrandCentral
+ CELLSERVDB_WEB=http://grand.central.org/dl/cellservdb/CellServDB
+ 
  !IFNDEF TARGETOS
  TARGETOS = WINNT
  !ENDIF
Index: openafs/src/config/NTMakefile.i386_win95
diff -c openafs/src/config/NTMakefile.i386_win95:1.2 openafs/src/config/NTMakefile.i386_win95:1.2.4.1
*** openafs/src/config/NTMakefile.i386_win95:1.2	Sat Jun 23 13:26:10 2001
--- openafs/src/config/NTMakefile.i386_win95	Thu Aug 23 01:31:53 2001
***************
*** 36,41 ****
--- 36,47 ----
  APPVER = 4.0
  !ENDIF
  
+ #define used in Win9x installation and program version display
+ AFSPRODUCT_VERSION=1.1.1 a
+ CELLNAME_DEFAULT=Your Cell Name
+ CELLSERVDB_INSTALL=CellServDB.GrandCentral
+ CELLSERVDB_WEB=http://grand.central.org/dl/cellservdb/CellServDB
+ 
  !IFNDEF TARGETOS
  TARGETOS = WIN95
  #TARGETOS = WINNT
Index: openafs/src/config/afsconfig-windows.h
diff -c /dev/null openafs/src/config/afsconfig-windows.h:1.1.4.1
*** /dev/null	Thu Aug 23 01:47:37 2001
--- openafs/src/config/afsconfig-windows.h	Thu Aug 23 01:31:53 2001
***************
*** 0 ****
--- 1,223 ----
+ /* src/config/afsconfig.h.in.  Generated automatically from configure.in by autoheader.  */
+ /* Modified for Win2000 build*/
+ 
+ /* Define if on AIX 3.
+    System headers sometimes define this.
+    We just want to avoid a redefinition error message.  */
+ #ifndef _ALL_SOURCE
+ #undef _ALL_SOURCE
+ #endif
+ 
+ /* Define to empty if the keyword does not work.  */
+ #undef const
+ 
+ /* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
+ #undef HAVE_SYS_WAIT_H
+ 
+ /* Define as __inline if that's what the C compiler calls it.  */
+ #define inline __inline
+ 
+ /* Define if on MINIX.  */
+ #undef _MINIX
+ 
+ /* Define to `int' if <sys/types.h> doesn't define.  */
+ #undef pid_t
+ 
+ /* Define if the system does not provide POSIX.1 features except
+    with this defined.  */
+ #undef _POSIX_1_SOURCE
+ 
+ /* Define if you need to in order for stat and other things to work.  */
+ #undef _POSIX_SOURCE
+ 
+ /* Define as the return type of signal handlers (int or void).  */
+ #undef RETSIGTYPE
+ 
+ /* Define to `unsigned' if <sys/types.h> doesn't define.  */
+ //#undef size_t unsigned int 
+ 
+ /* Define if you have the ANSI C header files.  */
+ #undef STDC_HEADERS
+ 
+ /* Define if lex declares yytext as a char * by default, not a char[].  */
+ #undef YYTEXT_POINTER
+ 
+ /* Define if you have the connect function.  */
+ #undef HAVE_CONNECT
+ 
+ /* Define if you have the getdtablesize function.  */
+ #undef HAVE_GETDTABLESIZE
+ 
+ /* Define if you have the gethostbyname function.  */
+ #define HAVE_GETHOSTBYNAME
+ 
+ /* Define if you have the random function.  */
+ #define HAVE_RANDOM
+ 
+ /* Define if you have the re_comp function.  */
+ #undef HAVE_RE_COMP
+ 
+ /* Define if you have the re_exec function.  */
+ #undef HAVE_RE_EXEC
+ 
+ /* Define if you have the res_search function.  */
+ #undef HAVE_RES_SEARCH
+ 
+ /* Define if you have the snprintf function.  */
+ #undef HAVE_SNPRINTF
+ 
+ /* Define if you have the socket function.  */
+ #define HAVE_SOCKET
+ 
+ /* Define if you have the srandom function.  */
+ #undef HAVE_SRANDOM
+ 
+ /* Define if you have the utimes function.  */
+ #define HAVE_UTIMES
+ 
+ /* Define if you have the <direct.h> header file.  */
+ #undef HAVE_DIRECT_H
+ 
+ /* Define if you have the <dirent.h> header file.  */
+ #undef HAVE_DIRENT_H
+ 
+ /* Define if you have the <fcntl.h> header file.  */
+ #define HAVE_FCNTL_H
+ 
+ /* Define if you have the <io.h> header file.  */
+ #define HAVE_IO_H
+ 
+ /* Define if you have the <malloc.h> header file.  */
+ #define HAVE_MALLOC_H
+ 
+ /* Define if you have the <mntent.h> header file.  */
+ #undef HAVE_MNTENT_H
+ 
+ /* Define if you have the <ndir.h> header file.  */
+ #undef HAVE_NDIR_H
+ 
+ /* Define if you have the <netdb.h> header file.  */
+ #undef HAVE_NETDB_H
+ 
+ /* Define if you have the <netinet/in.h> header file.  */
+ #undef HAVE_NETINET_IN_H
+ 
+ /* Define if you have the <security/pam_modules.h> header file.  */
+ #undef HAVE_SECURITY_PAM_MODULES_H
+ 
+ /* Define if you have the <siad.h> header file.  */
+ #undef HAVE_SIAD_H
+ 
+ /* Define if you have the <signal.h> header file.  */
+ #define HAVE_SIGNAL_H
+ 
+ /* Define if you have the <stdlib.h> header file.  */
+ #define HAVE_STDLIB_H
+ 
+ /* Define if you have the <string.h> header file.  */
+ #define HAVE_STRING_H
+ 
+ /* Define if you have the <strings.h> header file.  */
+ #undef HAVE_STRINGS_H
+ 
+ /* Define if you have the <sys/dir.h> header file.  */
+ #undef HAVE_SYS_DIR_H
+ 
+ /* Define if you have the <sys/fcntl.h> header file.  */
+ #define HAVE_SYS_FCNTL_H
+ 
+ /* Define if you have the <sys/file.h> header file.  */
+ #undef HAVE_SYS_FILE_H
+ 
+ /* Define if you have the <sys/fs_types.h> header file.  */
+ #undef HAVE_SYS_FS_TYPES_H
+ 
+ /* Define if you have the <sys/mntent.h> header file.  */
+ #undef HAVE_SYS_MNTENT_H
+ 
+ /* Define if you have the <sys/mnttab.h> header file.  */
+ #undef HAVE_SYS_MNTTAB_H
+ 
+ /* Define if you have the <sys/mount.h> header file.  */
+ #undef HAVE_SYS_MOUNT_H
+ 
+ /* Define if you have the <sys/ndir.h> header file.  */
+ #undef HAVE_SYS_NDIR_H
+ 
+ /* Define if you have the <sys/param.h> header file.  */
+ #undef HAVE_SYS_PARAM_H
+ 
+ /* Define if you have the <sys/time.h> header file.  */
+ #undef HAVE_SYS_TIME_H
+ 
+ /* Define if you have the <sys/vfs.h> header file.  */
+ #undef HAVE_SYS_VFS_H
+ 
+ /* Define if you have the <termios.h> header file.  */
+ #undef HAVE_TERMIOS_H
+ 
+ /* Define if you have the <unistd.h> header file.  */
+ #undef HAVE_UNISTD_H
+ 
+ /* Define if you have the <usersec.h> header file.  */
+ #undef HAVE_USERSEC_H
+ 
+ /* Define if you have the <windows.h> header file.  */
+ #define HAVE_WINDOWS_H
+ 
+ /* Define if you have the <winsock2.h> header file.  */
+ #define HAVE_WINSOCK2_H
+ 
+ /* Name of package */
+ #undef PACKAGE
+ 
+ /* Version number of package */
+ #undef VERSION
+ 
+ /* define if target is big endian */
+ #undef WORDS_BIGENDIAN
+ 
+ /* define if sys/param.h defines the endiness */
+ #undef ENDIANESS_IN_SYS_PARAM_H
+ 
+ /* define if struct ufsvfs has vfs_dqrwlock */
+ #undef HAVE_VFS_DQRWLOCK
+ 
+ #undef PACKAGE
+ #undef VERSION
+  
+ #define RCSID(msg) \
+ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
+ 
+ #undef HAVE_CONNECT
+ //#undef HAVE_GETHOSTBYNAME
+ #undef HAVE_RES_SEARCH
+ //#undef HAVE_SOCKET
+ 
+ #if ENDIANESS_IN_SYS_PARAM_H
+ # ifndef KERNEL
+ #  include <sys/types.h>
+ #  include <sys/param.h>
+ #  if BYTE_ORDER == BIG_ENDIAN
+ #  define WORDS_BIGENDIAN 1
+ #  endif
+ # endif
+ #endif
+ 
+ #undef AFS_AFSDB_ENV
+ #undef AFS_NAMEI_ENV
+ #undef BOS_RESTRICTED_MODE
+ 
+ #undef FAST_RESTART
+ #undef BITMAP_LATER
+ 
+ #undef INODE_SETATTR_NOT_VOID
+ #undef STRUCT_INODE_HAS_I_BYTES
+ #undef STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
+ 
+ /* glue for RedHat kernel bug */
+ #undef ENABLE_REDHAT_BUILDSYS
+ 
+ #if defined(ENABLE_REDHAT_BUILDSYS) && defined(KERNEL) && defined(REDHAT_FIX)
+ #include "redhat-fix.h"
+ #endif
Index: openafs/src/config/util_cr.c
diff -c openafs/src/config/util_cr.c:1.3 openafs/src/config/util_cr.c:1.3.2.1
*** openafs/src/config/util_cr.c:1.3	Thu Jul  5 11:20:18 2001
--- openafs/src/config/util_cr.c	Thu Aug 23 01:31:53 2001
***************
*** 15,28 ****
  #include "process.h"
  #include "windows.h"
  #include "malloc.h"
  
  void usuage()
  {
  	printf("util_cr file ;remove cr (from crlf)\n\
  	OR util_cr + file ;add cr\n \
  	OR util_cr * \"+[register key value] x=y\" ; add register key value\n\
  	OR util_cr * \"-[register key value]\" ; aremove register key value\n\
! 	OR util_cr & file.ini \"SectionKey=value\" ; update ini-ipr-pwf file\n\
  	OR util_cr ~  ;force error\n");
  	exit(0xc000);
  }
--- 15,34 ----
  #include "process.h"
  #include "windows.h"
  #include "malloc.h"
+ #include "time.h"
  
  void usuage()
  {
  	printf("util_cr file ;remove cr (from crlf)\n\
+ 	OR util_cr } ProductVersion in_filename out_filename ; substitute for %1-%5 in file\n\
+ 	   %1=Major version, %2=Minor version, %3=Patch(first digit) %4=(last two digits) %5=Version display string \n\
+ 	   ProductVersion=maj.min.pat.pat2 ;maj=numeric, min=numeric pat,pat2 are not more than 3 digits or 1-2 digits and one alpha \n\
+ 	   e.g 1.0.4.1, 1.0.4 a 1.0.401, 1.0.4a  all represent the same version\n\
  	OR util_cr + file ;add cr\n \
  	OR util_cr * \"+[register key value] x=y\" ; add register key value\n\
  	OR util_cr * \"-[register key value]\" ; aremove register key value\n\
! 	OR util_cr @ file.ini \"[SectionKey]variable=value\" ; update ini-ipr-pwf file\n\
! 	OR util_cr @ file.ini \"[SectionKey]variable=value*DatE*\" ; update ini-ipr-pwf file, insert date\n\
  	OR util_cr ~  ;force error\n");
  	exit(0xc000);
  }
***************
*** 97,111 ****
  	int l,i;
  	char **pvar,*ch;
  	long len;
! 	typedef char * CHARP;
  
  	if (argc<3)
  		usuage();
  	if (strcmp(argv[1],"~")==0)
! 	{	//check for file presence
! 		if (fopen(argv[2],"r"))
! 			return(0);
! 		printf("Error---%s\n",argv[3]);
  		exit(0xc000);
  	}
  	if (strcmp(argv[1],"*")==0)
--- 103,253 ----
  	int l,i;
  	char **pvar,*ch;
  	long len;
! 	typedef char * CHARP;
  
  	if (argc<3)
  		usuage();
+  	if (strcmp(argv[1],"}")==0)
+  	{
+  		char v1[4],v2[4],v3[4],v4[4];
+  		char v5[132];
+  		char *ptr=NULL;
+  		char *buf;
+  		int maj;
+  		int min;
+  		int pat,pat2;
+  		strcpy(v5,argv[2]);
+  		if (argc<5)
+  			usuage();
+  		if ((ptr=strtok(argv[2],". \n"))==NULL)
+  			return 0;
+  		maj=atoi(ptr);
+  		if ((ptr=strtok(NULL,". \n"))==NULL)
+  			return 0;
+  		min=atoi(ptr);
+  		if ((ptr=strtok(NULL,". \n"))==NULL)
+  			return 0;
+  		pat2=-1;
+  		switch (strlen(ptr))
+  		{
+  		case 0:
+  			usuage();
+  		case 1:
+  			pat=atoi(ptr);
+  			if (isdigit(*ptr)!=0)
+  				break;
+  			usuage();
+  		case 2:	//ONLY 1.0.44 is interpreted as 1.0.4.4 or 1.0.4a as 1.0.4.a
+  			if (isdigit(*ptr)==0)
+  				usuage();
+  			pat=*ptr-'0';
+  			ptr++;
+  			if (isalpha(*ptr)==0)
+  			{
+  				pat2=atoi(ptr);
+  			} else if (isalpha(*ptr)!=0)
+  			{
+  				pat2=tolower(*ptr)-'a'+1;
+  			} else 
+  				usuage();
+  			break;			
+  		case 3://1.0.401 or 1.0.40a are the same; 
+  			if ((isdigit(*ptr)==0)	// first 2 must be digit
+  				|| (isdigit(*(ptr+1)==0))
+  				|| (*(ptr+1)!='0' && isdigit(*(ptr+2))==0) // disallow 1.0.4b0  or 1.0.41a 
+  				)
+  				usuage();
+  			pat=*ptr-'0';
+  			ptr++;
+  			pat2=atoi(ptr);
+  			ptr++;
+  			if (isalpha(*ptr))
+  				pat2=tolower(*ptr)-'a'+1;
+  			break;
+  		default:
+  			usuage();
+  		}
+  		// last can be 1-2 digits or one alpha (if pat2 hasn't been set)
+  		if ((ptr=strtok(NULL,". \n"))!=NULL)
+  		{
+  			if (pat2>=0)
+  				usuage();
+  			switch (strlen(ptr))
+  			{
+  			case 1:
+  				pat2=(isdigit(*ptr))?atoi(ptr):tolower(*ptr)-'a'+1;
+  				break;
+  			case 2:
+  				if ( 
+  					isdigit(*ptr)==0 
+  					|| isdigit(*(ptr+1))==0
+  					) 
+  					usuage();
+  				pat2=atoi(ptr);
+  			default:
+  				usuage();
+  			}
+  		}
+  		file=fopen(argv[3],"r");
+  		if (file==NULL)
+  			usuage();
+  		len=filelength(_fileno(file));
+  		buf=(char *)malloc(len+1);
+  		len=fread(buf,sizeof(char),len,file);
+  		buf[len]=0;	//set eof
+  		fclose(file);
+  		file=fopen(argv[4],"w");
+  		if (file==NULL)
+  			usuage();
+  		sprintf(v1,"%i",maj);
+  		sprintf(v2,"%i",min);
+  		sprintf(v3,"%i",pat);
+  		sprintf(v4,"%02i",pat2);
+  		while (1)
+  		{
+  			ptr=strstr(buf,"%");
+  			fwrite(buf,1,(ptr)?ptr-buf:strlen(buf),file);	//write file if no % found or up to %
+  			if (ptr==NULL)
+  				break;
+  			switch (*(ptr+1))	//skip first scan if buf="1...."
+  			{
+  			case '1':
+  				fwrite(v1,1,strlen(v1),file);
+  				ptr++;
+  				break;				
+  			case '2':
+  				fwrite(v2,1,strlen(v2),file);
+  				ptr++;
+  				break;				
+  			case '3':
+  				fwrite(v3,1,strlen(v3),file);
+  				ptr++;
+  				break;				
+  			case '4':
+  				fwrite(v4,1,strlen(v4),file);
+  				ptr++;
+  				break;				
+  			case '5':
+  				fwrite(v5,1,strlen(v5),file);
+  				ptr++;
+  				break;
+  			default:
+  				fwrite("%",1,1,file);	//either % at end of file or no %1...
+  				break;
+  			}
+  			buf=ptr+1;
+  		}
+  		fclose(file);
+  		return 0;
+  	}
  	if (strcmp(argv[1],"~")==0)
! 	{	//check for file presence
! 		if (fopen(argv[2],"r"))
!   			return(0);
!  		if(argc<4)
!  			printf("ERROR --- File not present %s\n",argv[2]);
!  		else 
!  			printf("Error---%s\n",argv[3]);
  		exit(0xc000);
  	}
  	if (strcmp(argv[1],"*")==0)
***************
*** 149,179 ****
  		}
  		return 0;
  	}
! 	if (strcmp(argv[1],"&")==0)
  	{
  		if (argc<4)
  			usuage();
  		for (i=3;argc>=4;i++)
  		{
! 			char *ssect=strtok(argv[i],"[");
! 			char *skey=strtok(argv[i],"]");
  			char *sval;
- 			skey=strtok(NULL,"=");
  			if ((ssect==NULL) || (skey==NULL))
  			{
  				printf("format error parameter %s\n",argv[i]);
  				exit(0xc000);
  			}
! 			while(*skey==' ') 
! 				skey++;
! 
! 			sval=strtok(NULL,"=");
  			if (sval==NULL)
  			{
  				printf("format error parameter %s\n",argv[i]);
  				exit(0xc000);
  			}
- //			printf("parameters %s %s %s %s\n",ssect,skey,sval,argv[2]);
  			if (WritePrivateProfileString(ssect,skey,sval,argv[2])==0)
  			{
  				LPVOID lpMsgBuf;
--- 291,352 ----
  		}
  		return 0;
  	}
! 	if (strcmp(argv[1],"@")==0)
  	{
+ 		char msg[256],msgt[256];
+ 		char *ptr;
  		if (argc<4)
  			usuage();
  		for (i=3;argc>=4;i++)
  		{
! 
! 			char *ssect=strstr(argv[i],"[");
! 			char *skey=strstr(ssect,"]");
  			char *sval;
  			if ((ssect==NULL) || (skey==NULL))
  			{
  				printf("format error parameter %s\n",argv[i]);
  				exit(0xc000);
  			}
! 			ssect++;
! 			*skey=0;
! 			if ((strlen(skey+1)==0)||(strlen(ssect)==0))
! 			{
! 				printf("format error parameter %s\n",argv[i]);
! 				exit(0xc000);
! 			}
! 			while(*++skey==' ');
! 			sval=strstr(skey,"=");
  			if (sval==NULL)
  			{
  				printf("format error parameter %s\n",argv[i]);
  				exit(0xc000);
+ 			}
+ 			ptr=sval;
+ 			while(*--ptr==' ') ;
+ 			*(ptr+1)=0;
+ 			while(*++sval==' ') ;
+ 			if (ptr=strstr(sval,"*DatE*"))
+ 			{// ok so lets substitute date in this string;
+ 				char tmpbuf[32];
+ 				*(ptr)=0;
+ 				strcpy(msg,sval);
+ 			    _tzset();
+ 			    _strdate( tmpbuf );
+ 				strcat(msg,tmpbuf);
+ 				strcat(msg,ptr+6);
+ 				sval=msg;
+ 			}
+ 			if (ptr=strstr(sval,"*TimE*"))
+ 			{
+ 				char tmpbuf[32];
+ 				*(ptr)=0;
+ 				strcpy(msgt,sval);
+ 			    _strtime( tmpbuf );
+ 				strncat(msgt,tmpbuf,5);
+ 				strcat(msgt,ptr+6);
+ 				sval=msgt;
  			}
  			if (WritePrivateProfileString(ssect,skey,sval,argv[2])==0)
  			{
  				LPVOID lpMsgBuf;
Index: openafs/src/tviced/NTMakefile
diff -c openafs/src/tviced/NTMakefile:1.3 openafs/src/tviced/NTMakefile:1.3.2.1
*** openafs/src/tviced/NTMakefile:1.3	Mon Feb 12 14:44:08 2001
--- openafs/src/tviced/NTMakefile	Thu Aug 23 01:31:53 2001
***************
*** 190,195 ****
--- 190,196 ----
  	$(DESTDIR)\lib\afs\afsreg.lib \
  	$(DESTDIR)\lib\afs\afsprocmgmt.lib \
  	$(DESTDIR)\lib\afs\afseventlog.lib \
+ 	$(DESTDIR)\lib\afs\afsutil.lib \
  	$(DESTDIR)\lib\pthread.lib
  
  $(EXEFILE): $(EXEOBJS) $(EXELIBS)
