diff options
author | csware <email@cs-ware.de> | 2019-11-12 22:02:57 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2019-11-12 22:02:57 +0100 |
commit | 34a9e118b6d35b8a5b9a767a35cfc0e002605c10 (patch) | |
tree | aa4b03fa80fef22afa82d65f6dfd0a05bb3c5469 /src/Mount | |
parent | f5aea0628116b7e6bfe958b105a72a254eb19c67 (diff) | |
download | VeraCrypt-34a9e118b6d35b8a5b9a767a35cfc0e002605c10.tar.gz VeraCrypt-34a9e118b6d35b8a5b9a767a35cfc0e002605c10.zip |
Windows: Allow system encrypted devices to be mounted from WindowsPE - even if changing the keyboard layout failed (#539)
When my system broke and I had to use WindowsPE to rescue some files the password dialog always closed immediately. There was no chance to mount the system device using the GUI. It took me a while to realize that I could try using the CLI by passing the password as a parameter (which might not be so obvious for not advanced users).
Signed-off-by: Sven Strickroth <email@cs-ware.de>
Diffstat (limited to 'src/Mount')
-rw-r--r-- | src/Mount/Mount.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 833dbe01..9ba4ae86 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -3019,11 +3019,16 @@ BOOL CALLBACK PasswordDlgProc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa if (keybLayout != 0x00000409 && keybLayout != 0x04090409) { Error ("CANT_CHANGE_KEYB_LAYOUT_FOR_SYS_ENCRYPTION", hwndDlg); - EndDialog (hwndDlg, IDCANCEL); - return 1; + /* don't be too agressive on enforcing an English keyboard layout. E.g. on WindowsPE this call fails and + * then the user can only mount a system encrypted device using the command line by passing the password as a parameter + * (which might not be obvious for not so advanced users). + * + * Now, we informed the user that English keyboard is required, if it is not available the volume can just not be mounted. + * There should be no other drawback (as e.g., on the change password dialog, when you might change to a password which won't + * work on the pre-start environment. + */ } - - if (SetTimer (hwndDlg, TIMER_ID_KEYB_LAYOUT_GUARD, TIMER_INTERVAL_KEYB_LAYOUT_GUARD, NULL) == 0) + else if (SetTimer (hwndDlg, TIMER_ID_KEYB_LAYOUT_GUARD, TIMER_INTERVAL_KEYB_LAYOUT_GUARD, NULL) == 0) { Error ("CANNOT_SET_TIMER", hwndDlg); EndDialog (hwndDlg, IDCANCEL); |