VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2018-09-02 21:21:51 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2018-09-02 23:00:54 (GMT)
commitd3060a97b68636ee3143ec1c02bbaaf3f3549131 (patch)
treef89ecb2e86e804a9e8bde5ec8ecbc56077adedda /src
parent35dabf4b2cfc6562608e7052d632dc666d66f01d (diff)
downloadVeraCrypt-d3060a97b68636ee3143ec1c02bbaaf3f3549131.zip
VeraCrypt-d3060a97b68636ee3143ec1c02bbaaf3f3549131.tar.gz
Windows: fix regression when language selected in the setup during fresh install and that caused VeraCrypt background task to be disabled.
Diffstat (limited to 'src')
-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 6157b18..f9b6f32 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 974d2e0..00a4923 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 ccdd682..46ad208 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 7b42bc4..a1543b6 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 ();