VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-05-22 18:19:13 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-05-22 22:58:51 +0200
commit0d23312886b7787eb4b7de2d788b7de4d021e139 (patch)
treee152b581c57a87455cfca0f5bdd591d6771117d8 /src/Common/Dlgcode.c
parentc44c1ac9ce7148c2830191e373ad41a2feeff046 (diff)
downloadVeraCrypt-0d23312886b7787eb4b7de2d788b7de4d021e139.tar.gz
VeraCrypt-0d23312886b7787eb4b7de2d788b7de4d021e139.zip
Windows: Modifications to build 64-bit versions of VeraCrypt.exe & "VeraCrypt Format.exe".
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index b433aa04..0c5395c9 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -7668,7 +7668,7 @@ BOOL IsNonInstallMode ()
// The following test may be unreliable in some cases (e.g. after the user selects restore "Last Known Good
// Configuration" from the Windows boot menu).
- if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt", 0, KEY_READ, &hkey) == ERROR_SUCCESS)
+ if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt", 0, KEY_READ | KEY_WOW64_32KEY, &hkey) == ERROR_SUCCESS)
{
RegCloseKey (hkey);
return FALSE;
@@ -10615,12 +10615,12 @@ std::string HarddiskVolumePathToPartitionPath (const std::string &harddiskVolume
}
-BOOL IsApplicationInstalled (const char *appName)
+BOOL IsApplicationInstalled (const char *appName, BOOL b32bitApp)
{
const char *uninstallRegName = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
BOOL installed = FALSE;
HKEY unistallKey;
- LONG res = RegOpenKeyEx (HKEY_LOCAL_MACHINE, uninstallRegName, 0, KEY_READ | KEY_WOW64_64KEY, &unistallKey);
+ LONG res = RegOpenKeyEx (HKEY_LOCAL_MACHINE, uninstallRegName, 0, KEY_READ | b32bitApp? KEY_WOW64_32KEY: KEY_WOW64_64KEY, &unistallKey);
if (res != ERROR_SUCCESS)
{
SetLastError (res);
@@ -10635,7 +10635,7 @@ BOOL IsApplicationInstalled (const char *appName)
if (strstr (regName, "{") == regName)
{
regNameSize = sizeof (regName);
- if (!ReadLocalMachineRegistryStringNonReflected ((string (uninstallRegName) + "\\" + regName).c_str(), "DisplayName", regName, &regNameSize))
+ if (!ReadLocalMachineRegistryStringNonReflected ((string (uninstallRegName) + "\\" + regName).c_str(), "DisplayName", regName, &regNameSize, b32bitApp))
regName[0] = 0;
}