diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-03-09 11:58:30 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-03-10 10:33:18 +0100 |
commit | 5402fa902e51ecb83f1f5629be62caa968ef31bb (patch) | |
tree | 0a74231bf1dcb2fdb9b32b8a01531832c795a26f | |
parent | 752f1283a9027ac5a5400ec5860a068a7eadc923 (diff) | |
download | VeraCrypt-5402fa902e51ecb83f1f5629be62caa968ef31bb.tar.gz VeraCrypt-5402fa902e51ecb83f1f5629be62caa968ef31bb.zip |
Windows: Add /secureDesktop switch to VeraCrypt Format
-rw-r--r-- | src/Format/Tcformat.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index 976809de..a8554084 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -9018,6 +9018,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) OptionFastCreateFile, OptionEnableMemoryProtection, OptionKeyfile, + OptionSecureDesktop, }; argument args[]= @@ -9043,6 +9044,7 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) { OptionFastCreateFile, L"/fastcreatefile", NULL, FALSE }, { OptionEnableMemoryProtection, L"/protectMemory", NULL, FALSE }, { OptionKeyfile, L"/keyfile", L"/k", FALSE }, + { OptionSecureDesktop, L"/secureDesktop", NULL, FALSE }, // Internal { CommandResumeSysEncLogOn, L"/acsysenc", L"/a", TRUE }, @@ -9482,6 +9484,25 @@ void ExtractCommandLine (HWND hwndDlg, wchar_t *lpszCommandLine) break; + case OptionSecureDesktop: + { + wchar_t szTmp[16] = {0}; + bCmdUseSecureDesktop = TRUE; + bCmdUseSecureDesktopValid = TRUE; + + if (HAS_ARGUMENT == GetArgumentValue (lpszCommandLineArgs, &i, nNoCommandLineArgs, + szTmp, ARRAYSIZE (szTmp))) + { + if (!_wcsicmp(szTmp,L"n") || !_wcsicmp(szTmp,L"no")) + bCmdUseSecureDesktop = FALSE; + else if (!_wcsicmp(szTmp,L"y") || !_wcsicmp(szTmp,L"yes")) + bCmdUseSecureDesktop = TRUE; + else + AbortProcess ("COMMAND_LINE_ERROR"); + } + } + break; + default: DialogBoxParamW (hInst, MAKEINTRESOURCEW (IDD_COMMANDHELP_DLG), hwndDlg, (DLGPROC) CommandHelpDlgProc, (LPARAM) &as); |