VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2018-09-02 23:21:51 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2018-09-03 01:00:54 +0200
commitd3060a97b68636ee3143ec1c02bbaaf3f3549131 (patch)
treef89ecb2e86e804a9e8bde5ec8ecbc56077adedda
parent35dabf4b2cfc6562608e7052d632dc666d66f01d (diff)
downloadVeraCrypt-d3060a97b68636ee3143ec1c02bbaaf3f3549131.tar.gz
VeraCrypt-d3060a97b68636ee3143ec1c02bbaaf3f3549131.zip
Windows: fix regression when language selected in the setup during fresh install and that caused VeraCrypt background task to be disabled.
-rw-r--r--src/Common/Dlgcode.c15
-rw-r--r--src/Common/Dlgcode.h3
-rw-r--r--src/Format/Tcformat.c5
-rw-r--r--src/Mount/Mount.c6
4 files changed, 21 insertions, 8 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 6157b189..f9b6f327 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -151,6 +151,10 @@ BOOL bMountFavoritesOnLogon = FALSE;
BOOL bHistory = FALSE;
+#ifndef SETUP
+BOOL bLanguageSetInSetup = FALSE;
+#endif
+
// Status of detection of hidden sectors (whole-system-drive encryption).
// 0 - Unknown/undetermined/completed, 1: Detection is or was in progress (but did not complete e.g. due to system crash).
int HiddenSectorDetectionStatus = 0;
@@ -2877,9 +2881,6 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
char langId[6];
InitCommonControlsPtr InitCommonControlsFn = NULL;
wchar_t modPath[MAX_PATH];
-#ifndef SETUP
- BOOL bLanguageSetInSetup = FALSE;
-#endif
GetModuleFileNameW (NULL, modPath, ARRAYSIZE (modPath));
@@ -3053,9 +3054,12 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
}
}
+#ifndef VCEXPANDER
// delete the registry key created by the installer (if any)
DeleteRegistryKey (HKEY_CURRENT_USER, L"Software\\VeraCrypt");
#endif
+
+#endif
if (langId[0] == 0)
{
@@ -3077,11 +3081,6 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
LoadLanguageFile ();
#ifndef SETUP
- // Save language to XML configuration file if it has been selected in the setup
- // so that other VeraCrypt programs will pick it up
- if (bLanguageSetInSetup)
- SaveSettings (NULL);
-
// UAC elevation moniker cannot be used in portable mode.
// A new instance of the application must be created with elevated privileges.
if (IsNonInstallMode () && !IsAdmin () && IsUacSupported ())
diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h
index 974d2e05..00a49239 100644
--- a/src/Common/Dlgcode.h
+++ b/src/Common/Dlgcode.h
@@ -163,6 +163,9 @@ extern BOOL MountVolumesAsSystemFavorite;
extern BOOL FavoriteMountOnArrivalInProgress;
extern BOOL MultipleMountOperationInProgress;
+#ifndef SETUP
+extern BOOL bLanguageSetInSetup;
+#endif
enum tc_app_msg_ids
{
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c
index ccdd682c..46ad2083 100644
--- a/src/Format/Tcformat.c
+++ b/src/Format/Tcformat.c
@@ -6060,6 +6060,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
LoadSettings (hwndDlg);
+ // Save language to XML configuration file if it has been selected in the setup
+ // so that other VeraCrypt programs will pick it up
+ if (bLanguageSetInSetup)
+ SaveSettings (hwndDlg);
+
LoadDefaultKeyFilesParam ();
RestoreDefaultKeyFilesParam ();
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c
index 7b42bc4b..a1543b61 100644
--- a/src/Mount/Mount.c
+++ b/src/Mount/Mount.c
@@ -6794,6 +6794,12 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
// General preferences
LoadSettings (hwndDlg);
+ // Save language to XML configuration file if it has been selected in the setup
+ // so that other VeraCrypt programs will pick it up
+ if (bLanguageSetInSetup)
+ SaveSettings (hwndDlg);
+
+
// Keyfiles
LoadDefaultKeyFilesParam ();
RestoreDefaultKeyFilesParam ();