mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-12-03 00:13:32 +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;
|
BOOL bHistory = FALSE;
|
||||||
|
|
||||||
|
#ifndef SETUP
|
||||||
|
BOOL bLanguageSetInSetup = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Status of detection of hidden sectors (whole-system-drive encryption).
|
// 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).
|
// 0 - Unknown/undetermined/completed, 1: Detection is or was in progress (but did not complete e.g. due to system crash).
|
||||||
int HiddenSectorDetectionStatus = 0;
|
int HiddenSectorDetectionStatus = 0;
|
||||||
@ -2877,9 +2881,6 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
|
|||||||
char langId[6];
|
char langId[6];
|
||||||
InitCommonControlsPtr InitCommonControlsFn = NULL;
|
InitCommonControlsPtr InitCommonControlsFn = NULL;
|
||||||
wchar_t modPath[MAX_PATH];
|
wchar_t modPath[MAX_PATH];
|
||||||
#ifndef SETUP
|
|
||||||
BOOL bLanguageSetInSetup = FALSE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
GetModuleFileNameW (NULL, modPath, ARRAYSIZE (modPath));
|
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)
|
// delete the registry key created by the installer (if any)
|
||||||
DeleteRegistryKey (HKEY_CURRENT_USER, L"Software\\VeraCrypt");
|
DeleteRegistryKey (HKEY_CURRENT_USER, L"Software\\VeraCrypt");
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (langId[0] == 0)
|
if (langId[0] == 0)
|
||||||
@ -3077,11 +3081,6 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
|
|||||||
LoadLanguageFile ();
|
LoadLanguageFile ();
|
||||||
|
|
||||||
#ifndef SETUP
|
#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.
|
// UAC elevation moniker cannot be used in portable mode.
|
||||||
// A new instance of the application must be created with elevated privileges.
|
// A new instance of the application must be created with elevated privileges.
|
||||||
if (IsNonInstallMode () && !IsAdmin () && IsUacSupported ())
|
if (IsNonInstallMode () && !IsAdmin () && IsUacSupported ())
|
||||||
|
@ -163,6 +163,9 @@ extern BOOL MountVolumesAsSystemFavorite;
|
|||||||
extern BOOL FavoriteMountOnArrivalInProgress;
|
extern BOOL FavoriteMountOnArrivalInProgress;
|
||||||
extern BOOL MultipleMountOperationInProgress;
|
extern BOOL MultipleMountOperationInProgress;
|
||||||
|
|
||||||
|
#ifndef SETUP
|
||||||
|
extern BOOL bLanguageSetInSetup;
|
||||||
|
#endif
|
||||||
|
|
||||||
enum tc_app_msg_ids
|
enum tc_app_msg_ids
|
||||||
{
|
{
|
||||||
|
@ -6060,6 +6060,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
|||||||
|
|
||||||
LoadSettings (hwndDlg);
|
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 ();
|
LoadDefaultKeyFilesParam ();
|
||||||
RestoreDefaultKeyFilesParam ();
|
RestoreDefaultKeyFilesParam ();
|
||||||
|
|
||||||
|
@ -6794,6 +6794,12 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
|
|||||||
// General preferences
|
// General preferences
|
||||||
LoadSettings (hwndDlg);
|
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
|
// Keyfiles
|
||||||
LoadDefaultKeyFilesParam ();
|
LoadDefaultKeyFilesParam ();
|
||||||
RestoreDefaultKeyFilesParam ();
|
RestoreDefaultKeyFilesParam ();
|
||||||
|
Loading…
Reference in New Issue
Block a user