diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Common/Dlgcode.c | 15 | ||||
-rw-r--r-- | src/Common/Dlgcode.h | 3 | ||||
-rw-r--r-- | src/Format/Tcformat.c | 5 | ||||
-rw-r--r-- | src/Mount/Mount.c | 6 |
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 (); |