VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c15
1 files changed, 7 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;
151 151
152BOOL bHistory = FALSE; 152BOOL bHistory = FALSE;
153 153
154#ifndef SETUP
155BOOL bLanguageSetInSetup = FALSE;
156#endif
157
154// Status of detection of hidden sectors (whole-system-drive encryption). 158// Status of detection of hidden sectors (whole-system-drive encryption).
155// 0 - Unknown/undetermined/completed, 1: Detection is or was in progress (but did not complete e.g. due to system crash). 159// 0 - Unknown/undetermined/completed, 1: Detection is or was in progress (but did not complete e.g. due to system crash).
156int HiddenSectorDetectionStatus = 0; 160int HiddenSectorDetectionStatus = 0;
@@ -2877,9 +2881,6 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
2877 char langId[6]; 2881 char langId[6];
2878 InitCommonControlsPtr InitCommonControlsFn = NULL; 2882 InitCommonControlsPtr InitCommonControlsFn = NULL;
2879 wchar_t modPath[MAX_PATH]; 2883 wchar_t modPath[MAX_PATH];
2880#ifndef SETUP
2881 BOOL bLanguageSetInSetup = FALSE;
2882#endif
2883 2884
2884 GetModuleFileNameW (NULL, modPath, ARRAYSIZE (modPath)); 2885 GetModuleFileNameW (NULL, modPath, ARRAYSIZE (modPath));
2885 2886
@@ -3053,9 +3054,12 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
3053 } 3054 }
3054 } 3055 }
3055 3056
3057#ifndef VCEXPANDER
3056 // delete the registry key created by the installer (if any) 3058 // delete the registry key created by the installer (if any)
3057 DeleteRegistryKey (HKEY_CURRENT_USER, L"Software\\VeraCrypt"); 3059 DeleteRegistryKey (HKEY_CURRENT_USER, L"Software\\VeraCrypt");
3058#endif 3060#endif
3061
3062#endif
3059 3063
3060 if (langId[0] == 0) 3064 if (langId[0] == 0)
3061 { 3065 {
@@ -3077,11 +3081,6 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine)
3077 LoadLanguageFile (); 3081 LoadLanguageFile ();
3078 3082
3079#ifndef SETUP 3083#ifndef SETUP
3080 // Save language to XML configuration file if it has been selected in the setup
3081 // so that other VeraCrypt programs will pick it up
3082 if (bLanguageSetInSetup)
3083 SaveSettings (NULL);
3084
3085 // UAC elevation moniker cannot be used in portable mode. 3084 // UAC elevation moniker cannot be used in portable mode.
3086 // A new instance of the application must be created with elevated privileges. 3085 // A new instance of the application must be created with elevated privileges.
3087 if (IsNonInstallMode () && !IsAdmin () && IsUacSupported ()) 3086 if (IsNonInstallMode () && !IsAdmin () && IsUacSupported ())