mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-28 05:53:29 +01:00
Windows: fix regression when language selected in the setup during fresh install and that caused VeraCrypt background task to be disabled.
This commit is contained in:
parent
35dabf4b2c
commit
d3060a97b6
@ -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,8 +3054,11 @@ 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 ())
|
||||
|
@ -163,6 +163,9 @@ extern BOOL MountVolumesAsSystemFavorite;
|
||||
extern BOOL FavoriteMountOnArrivalInProgress;
|
||||
extern BOOL MultipleMountOperationInProgress;
|
||||
|
||||
#ifndef SETUP
|
||||
extern BOOL bLanguageSetInSetup;
|
||||
#endif
|
||||
|
||||
enum tc_app_msg_ids
|
||||
{
|
||||
|
@ -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 ();
|
||||
|
||||
|
@ -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 ();
|
||||
|
Loading…
Reference in New Issue
Block a user