VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Setup
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-05-22 18:22:57 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-05-22 22:58:55 +0200
commit1c08ea01f1d7b1f24b1e21cbbccfd736f74d53ac (patch)
treef3c24caa1ebc7f6ea1dbcf2f27cb6d28849715f4 /src/Setup
parent0d23312886b7787eb4b7de2d788b7de4d021e139 (diff)
downloadVeraCrypt-1c08ea01f1d7b1f24b1e21cbbccfd736f74d53ac.tar.gz
VeraCrypt-1c08ea01f1d7b1f24b1e21cbbccfd736f74d53ac.zip
Windows Setup: Integrate 64-bit builds of exe files into the installer. Only install 64-bit exe files on Windows 64-bit. This gives a boot in performance for encryption/decryption of partitions/drives on Windows 64-bit.
Diffstat (limited to 'src/Setup')
-rw-r--r--src/Setup/Setup.c28
-rw-r--r--src/Setup/Setup.h3
2 files changed, 26 insertions, 5 deletions
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c
index bc080714..c52b311c 100644
--- a/src/Setup/Setup.c
+++ b/src/Setup/Setup.c
@@ -681,6 +681,24 @@ BOOL DoFilesInstall (HWND hwndDlg, char *szDestDir)
StringCbCopyNA (curFileName, sizeof(curFileName), FILENAME_64BIT_DRIVER, sizeof (FILENAME_64BIT_DRIVER));
}
+ if (Is64BitOs ()
+ && strcmp (szFiles[i], "AVeraCrypt.exe") == 0)
+ {
+ StringCbCopyNA (curFileName, sizeof(curFileName), "VeraCrypt-x64.exe", sizeof ("VeraCrypt-x64.exe"));
+ }
+
+ if (Is64BitOs ()
+ && strcmp (szFiles[i], "AVeraCryptExpander.exe") == 0)
+ {
+ StringCbCopyNA (curFileName, sizeof(curFileName), "VeraCryptExpander-x64.exe", sizeof ("VeraCryptExpander-x64.exe"));
+ }
+
+ if (Is64BitOs ()
+ && strcmp (szFiles[i], "AVeraCrypt Format.exe") == 0)
+ {
+ StringCbCopyNA (curFileName, sizeof(curFileName), "VeraCrypt Format-x64.exe", sizeof ("VeraCrypt Format-x64.exe"));
+ }
+
if (!bDevm)
{
bResult = FALSE;
@@ -831,7 +849,7 @@ BOOL DoRegInstall (HWND hwndDlg, char *szDestDir, BOOL bInstallType)
if (SystemEncryptionUpdate)
{
if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt",
- 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkey, &dw) == ERROR_SUCCESS)
+ 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE | KEY_WOW64_32KEY, NULL, &hkey, &dw) == ERROR_SUCCESS)
{
StringCbCopyA (szTmp, sizeof(szTmp), VERSION_STRING);
RegSetValueEx (hkey, "DisplayVersion", 0, REG_SZ, (BYTE *) szTmp, strlen (szTmp) + 1);
@@ -933,7 +951,7 @@ BOOL DoRegInstall (HWND hwndDlg, char *szDestDir, BOOL bInstallType)
RegMessage (hwndDlg, key);
if (RegCreateKeyEx (HKEY_LOCAL_MACHINE,
key,
- 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hkey, &dw) != ERROR_SUCCESS)
+ 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE | KEY_WOW64_32KEY, NULL, &hkey, &dw) != ERROR_SUCCESS)
goto error;
/* IMPORTANT: IF YOU CHANGE THIS IN ANY WAY, REVISE AND UPDATE SetInstallationPath() ACCORDINGLY! */
@@ -1052,13 +1070,13 @@ BOOL DoRegUninstall (HWND hwndDlg, BOOL bRemoveDeprecated)
if (!bRemoveDeprecated)
StatusMessage (hwndDlg, "REMOVING_REG");
- RegDeleteKey (HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt");
+ RegDeleteKeyEx (HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt", KEY_WOW64_32KEY, 0);
RegDeleteKey (HKEY_LOCAL_MACHINE, "Software\\Classes\\VeraCryptVolume\\Shell\\open\\command");
RegDeleteKey (HKEY_LOCAL_MACHINE, "Software\\Classes\\VeraCryptVolume\\Shell\\open");
RegDeleteKey (HKEY_LOCAL_MACHINE, "Software\\Classes\\VeraCryptVolume\\Shell");
RegDeleteKey (HKEY_LOCAL_MACHINE, "Software\\Classes\\VeraCryptVolume\\DefaultIcon");
RegDeleteKey (HKEY_LOCAL_MACHINE, "Software\\Classes\\VeraCryptVolume");
- RegDeleteKey (HKEY_CURRENT_USER, "Software\\VeraCrypt");
+ RegDeleteKeyEx (HKEY_CURRENT_USER, "Software\\VeraCrypt", KEY_WOW64_32KEY, 0);
if (!bRemoveDeprecated)
{
@@ -2033,7 +2051,7 @@ void SetInstallationPath (HWND hwndDlg)
memset (InstallationPath, 0, sizeof (InstallationPath));
// Determine if VeraCrypt is already installed and try to determine its "Program Files" location
- 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)
{
/* Default 'UninstallString' registry strings written by past versions of VeraCrypt:
------------------------------------------------------------------------------------
diff --git a/src/Setup/Setup.h b/src/Setup/Setup.h
index d2fb6c7b..5852f058 100644
--- a/src/Setup/Setup.h
+++ b/src/Setup/Setup.h
@@ -75,6 +75,9 @@ static char *szCompressedFiles[]=
"VeraCrypt.exe",
"VeraCryptExpander.exe",
"VeraCrypt Format.exe",
+ "VeraCrypt-x64.exe",
+ "VeraCryptExpander-x64.exe",
+ "VeraCrypt Format-x64.exe",
"veracrypt.sys",
"veracrypt-x64.sys",
"Language.ar.xml",