mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-12 19:38:26 -06:00
Windows: Modifications to build 64-bit versions of VeraCrypt.exe & "VeraCrypt Format.exe".
This commit is contained in:
@@ -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, ®NameSize))
|
||||
if (!ReadLocalMachineRegistryStringNonReflected ((string (uninstallRegName) + "\\" + regName).c_str(), "DisplayName", regName, ®NameSize, b32bitApp))
|
||||
regName[0] = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,12 +65,12 @@ BOOL ReadLocalMachineRegistryString (const char *subKey, char *name, char *str,
|
||||
return type == REG_SZ;
|
||||
}
|
||||
|
||||
BOOL ReadLocalMachineRegistryStringNonReflected (const char *subKey, char *name, char *str, DWORD *size)
|
||||
BOOL ReadLocalMachineRegistryStringNonReflected (const char *subKey, char *name, char *str, DWORD *size, BOOL b32bitApp)
|
||||
{
|
||||
HKEY hkey = 0;
|
||||
DWORD type;
|
||||
|
||||
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, subKey, 0, KEY_READ | KEY_WOW64_64KEY, &hkey) != ERROR_SUCCESS)
|
||||
if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, subKey, 0, KEY_READ | (b32bitApp? KEY_WOW64_32KEY: KEY_WOW64_64KEY), &hkey) != ERROR_SUCCESS)
|
||||
return FALSE;
|
||||
|
||||
if (RegQueryValueEx (hkey, name, NULL, &type, (BYTE *) str, size) != ERROR_SUCCESS)
|
||||
|
||||
@@ -13,7 +13,7 @@ extern "C" {
|
||||
BOOL ReadLocalMachineRegistryDword (char *subKey, char *name, DWORD *value);
|
||||
BOOL ReadLocalMachineRegistryMultiString (char *subKey, char *name, char *value, DWORD *size);
|
||||
BOOL ReadLocalMachineRegistryString (const char *subKey, char *name, char *value, DWORD *size);
|
||||
BOOL ReadLocalMachineRegistryStringNonReflected (const char *subKey, char *name, char *str, DWORD *size);
|
||||
BOOL ReadLocalMachineRegistryStringNonReflected (const char *subKey, char *name, char *str, DWORD *size, BOOL b32bitApp);
|
||||
int ReadRegistryInt (char *subKey, char *name, int defaultValue);
|
||||
char *ReadRegistryString (char *subKey, char *name, char *defaultValue, char *str, int maxLen);
|
||||
DWORD ReadRegistryBytes (char *path, char *name, char *value, int maxLen);
|
||||
|
||||
Reference in New Issue
Block a user