mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-06-19 02:56:07 -05:00
Windows: accept 'n' as a disable argument for /protectScreen and /protectMemory
This commit is contained in:
@@ -1119,7 +1119,7 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
|
||||
{
|
||||
if (_wcsicmp (argv[i], L"/protectScreen") == 0)
|
||||
{
|
||||
if ((i < argc - 1) && _wcsicmp (argv[i + 1], L"no") == 0)
|
||||
if ((i < argc - 1) && (_wcsicmp (argv[i + 1], L"no") == 0 || _wcsicmp (argv[i + 1], L"n") == 0))
|
||||
{
|
||||
// Disabling screen protection is only allowed in portable mode
|
||||
if (IsNonInstallMode())
|
||||
@@ -1132,7 +1132,7 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
|
||||
}
|
||||
if (_wcsicmp (argv[i], L"/protectMemory") == 0)
|
||||
{
|
||||
if ((i < argc - 1) && _wcsicmp (argv[i + 1], L"no") == 0)
|
||||
if ((i < argc - 1) && (_wcsicmp (argv[i + 1], L"no") == 0 || _wcsicmp (argv[i + 1], L"n") == 0))
|
||||
{
|
||||
// Disabling memory protection is only allowed in portable mode
|
||||
if (IsNonInstallMode())
|
||||
|
||||
@@ -10663,7 +10663,7 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
|
||||
{
|
||||
if (_wcsicmp (argv[i], L"/protectScreen") == 0)
|
||||
{
|
||||
if ((i < argc - 1) && _wcsicmp (argv[i + 1], L"no") == 0)
|
||||
if ((i < argc - 1) && (_wcsicmp (argv[i + 1], L"no") == 0 || _wcsicmp (argv[i + 1], L"n") == 0))
|
||||
{
|
||||
// Disabling screen protection is only allowed in portable mode
|
||||
if (IsNonInstallMode())
|
||||
@@ -10676,7 +10676,7 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
|
||||
}
|
||||
if (_wcsicmp (argv[i], L"/protectMemory") == 0)
|
||||
{
|
||||
if ((i < argc - 1) && _wcsicmp (argv[i + 1], L"no") == 0)
|
||||
if ((i < argc - 1) && (_wcsicmp (argv[i + 1], L"no") == 0 || _wcsicmp (argv[i + 1], L"n") == 0))
|
||||
{
|
||||
// Disabling memory protection is only allowed in portable mode
|
||||
if (IsNonInstallMode())
|
||||
|
||||
+2
-2
@@ -11118,7 +11118,7 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
|
||||
}
|
||||
if (_wcsicmp (argv[i], L"/protectScreen") == 0)
|
||||
{
|
||||
if ((i < argc - 1) && _wcsicmp (argv[i + 1], L"no") == 0)
|
||||
if ((i < argc - 1) && (_wcsicmp (argv[i + 1], L"no") == 0 || _wcsicmp (argv[i + 1], L"n") == 0))
|
||||
{
|
||||
// Disabling screen protection is only allowed in portable mode
|
||||
if (IsNonInstallMode())
|
||||
@@ -11131,7 +11131,7 @@ int WINAPI wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, wchar_t *lpsz
|
||||
}
|
||||
if (_wcsicmp (argv[i], L"/protectMemory") == 0)
|
||||
{
|
||||
if ((i < argc - 1) && _wcsicmp (argv[i + 1], L"no") == 0)
|
||||
if ((i < argc - 1) && (_wcsicmp (argv[i + 1], L"no") == 0 || _wcsicmp (argv[i + 1], L"n") == 0))
|
||||
{
|
||||
// Disabling memory protection is only allowed in portable mode
|
||||
if (IsNonInstallMode())
|
||||
|
||||
Reference in New Issue
Block a user