diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Setup/Setup.c | 28 | ||||
-rw-r--r-- | src/Setup/Setup.h | 3 | ||||
-rw-r--r-- | src/Signing/sign.bat | 4 | ||||
-rw-r--r-- | src/Signing/sign_test.bat | 4 |
4 files changed, 34 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 @@ -680,8 +680,26 @@ BOOL DoFilesInstall (HWND hwndDlg, char *szDestDir) driver64 = TRUE;
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;
@@ -830,9 +848,9 @@ 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);
@@ -932,9 +950,9 @@ BOOL DoRegInstall (HWND hwndDlg, char *szDestDir, BOOL bInstallType) key = "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\VeraCrypt";
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! */
StringCbPrintfA (szTmp, sizeof(szTmp), "\"%sVeraCrypt Setup.exe\" /u", szDir);
@@ -1051,15 +1069,15 @@ 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)
{
HKEY hKey;
@@ -2032,9 +2050,9 @@ 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:
------------------------------------------------------------------------------------
1.0 C:\WINDOWS\VeraCrypt Setup.exe /u [optional]
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 @@ -74,8 +74,11 @@ static char *szCompressedFiles[]= "License.txt",
"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",
"Language.be.xml",
diff --git a/src/Signing/sign.bat b/src/Signing/sign.bat index 22236849..d099b9f2 100644 --- a/src/Signing/sign.bat +++ b/src/Signing/sign.bat @@ -6,8 +6,12 @@ signtool sign /v /a /n IDRIX /ac thawte_Primary_MS_Cross_Cert.cer /t http://time signtool sign /v /a /n IDRIX /ac Thawt_CodeSigning_CA.crt /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCrypt.exe"
signtool sign /v /a /n IDRIX /ac Thawt_CodeSigning_CA.crt /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCrypt Format.exe"
signtool sign /v /a /n IDRIX /ac Thawt_CodeSigning_CA.crt /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCryptExpander.exe"
+signtool sign /v /a /n IDRIX /ac Thawt_CodeSigning_CA.crt /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCrypt-x64.exe"
+signtool sign /v /a /n IDRIX /ac Thawt_CodeSigning_CA.crt /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCrypt Format-x64.exe"
+signtool sign /v /a /n IDRIX /ac Thawt_CodeSigning_CA.crt /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCryptExpander-x64.exe"
+
cd "..\Release\Setup Files\"
copy /V /Y ..\..\..\Translations\*.xml .
diff --git a/src/Signing/sign_test.bat b/src/Signing/sign_test.bat index d7976828..33dbd01b 100644 --- a/src/Signing/sign_test.bat +++ b/src/Signing/sign_test.bat @@ -9,8 +9,12 @@ signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac TestCertificate\idrix_Test signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac TestCertificate\idrix_TestRootCA.crt /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCrypt.exe"
signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac TestCertificate\idrix_TestRootCA.crt /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCrypt Format.exe"
signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac TestCertificate\idrix_TestRootCA.crt /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCryptExpander.exe"
+signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac TestCertificate\idrix_TestRootCA.crt /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCryptx-x64.exe"
+signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac TestCertificate\idrix_TestRootCA.crt /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCrypt Format-x64.exe"
+signtool sign /v /a /f %PFXNAME% /p %PFXPASSWORD% /ac TestCertificate\idrix_TestRootCA.crt /t http://timestamp.verisign.com/scripts/timestamp.dll "..\Release\Setup Files\VeraCryptExpander-x64.exe"
+
cd "..\Release\Setup Files\"
copy /V /Y ..\..\..\Translations\*.xml .
|