From 5b7948b5d2d943ec8cd0fa3fcd93dbf6f67d90c2 Mon Sep 17 00:00:00 2001 From: Jim Norman Date: Thu, 5 Apr 2007 19:31:28 +0000 Subject: [PATCH] Bug 248044. Fix login capture on 64 bit windows. --- CASA/micasad/cache/SecretStore.cs | 2 ++ CASA/micasad/init/CredMgr.cs | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/CASA/micasad/cache/SecretStore.cs b/CASA/micasad/cache/SecretStore.cs index 081e2d6a..774f48dc 100644 --- a/CASA/micasad/cache/SecretStore.cs +++ b/CASA/micasad/cache/SecretStore.cs @@ -946,6 +946,8 @@ namespace sscs.cache #else string sNewPath = GetUserHomeDirectory() + "\\CASA"; + System.Diagnostics.Trace.WriteLine("Migrate files to " + sNewPath); + if (!Directory.Exists(sNewPath)) { Directory.CreateDirectory(sNewPath); diff --git a/CASA/micasad/init/CredMgr.cs b/CASA/micasad/init/CredMgr.cs index 8dab9945..9ceb05fd 100644 --- a/CASA/micasad/init/CredMgr.cs +++ b/CASA/micasad/init/CredMgr.cs @@ -117,6 +117,15 @@ namespace sscs.init private static string GetCredMgrPath() { string sPath = Environment.GetEnvironmentVariable("ProgramFiles"); + + // are we on x64? + if (sPath.IndexOf("x86") > 0) + { + sPath = Environment.GetEnvironmentVariable("SystemDrive") + "\\Program Files"; + } + + System.Diagnostics.Trace.WriteLine("System Path is " + sPath); + if (sPath != null) { // look for regsvr32.exe