windows-32bit-tools-client-dir-20060625
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 26 Jun 2006 03:24:14 +0000 (03:24 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 26 Jun 2006 03:24:14 +0000 (03:24 +0000)
Modify afssw_GetClientInstallDir to check both the registry for both
the full client installation as well as the 32-bit tools installation
for the Client Install Pathname.

src/WINNT/afsreg/afsreg.h
src/WINNT/afsreg/afssw.c

index ef51617..e0bafae 100644 (file)
@@ -23,9 +23,8 @@
 #define AFSREG_SVR_SW_NAME   "AFS Server"
 
 #define AFSREG_CLT_SVC_NAME  "TransarcAFSDaemon"
-#define AFSREG_CLT_SW_NAME   "AFS Client"
-
-
+#define AFSREG_CLT_SW_NAME       "AFS Client"
+#define AFSREG_CLT_TOOLS_SW_NAME  "AFS Client 32-Bit Binaries"
 
 /* ---- NT system configuration information ---- */
 
 #define AFSREG_CLT_SW_VERSION_KEY  AFSREG_CLT_SW_KEY "\\CurrentVersion"
 #define AFSREG_CLT_SW_VERSION_SUBKEY  AFSREG_CLT_SW_SUBKEY "\\CurrentVersion"
 
+#define AFSREG_CLT_TOOLS_SW_SUBKEY \
+    "Software\\TransarcCorporation\\" AFSREG_CLT_TOOLS_SW_NAME
+#define AFSREG_CLT_TOOLS_SW_KEY "HKEY_LOCAL_MACHINE\\" AFSREG_CLT_TOOLS_SW_SUBKEY
+
+#define AFSREG_CLT_TOOLS_SW_VERSION_KEY  AFSREG_CLT_TOOLS_SW_KEY "\\CurrentVersion"
+#define AFSREG_CLT_TOOLS_SW_VERSION_SUBKEY  AFSREG_CLT_TOOLS_SW_SUBKEY "\\CurrentVersion"
+
 /* AFSREG_CLT_SW_VERSION_KEY values */
 #define AFSREG_CLT_SW_VERSION_DIR_VALUE   "PathName"
 #define AFSREG_CLT_SW_VERSION_MAJOR_VALUE    "MajorVersion"
index 3bd5bf1..c6aa2fe 100644 (file)
@@ -58,9 +58,14 @@ afssw_GetServerInstallDir(char **bufPP)  /* [out] data buffer */
 int
 afssw_GetClientInstallDir(char **bufPP)   /* [out] data buffer */
 {
-    return StringDataRead(AFSREG_CLT_SW_VERSION_KEY,
+    int retval = StringDataRead(AFSREG_CLT_SW_VERSION_KEY,
                          AFSREG_CLT_SW_VERSION_DIR_VALUE,
                          bufPP);
+    if (retval)
+       retval = StringDataRead(AFSREG_CLT_TOOLS_SW_VERSION_KEY,
+                         AFSREG_CLT_SW_VERSION_DIR_VALUE,
+                         bufPP);
+    return retval;
 }
 
 /*