1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2026-07-06 04:58:01 -05:00

Windows: make Setup correctly manage option to disable memory protection during upgrade

This commit is contained in:
Mounir IDRASSI
2023-09-24 12:48:34 +02:00
parent 2363506e09
commit 718f11d9c3
3 changed files with 8 additions and 2 deletions
+4 -2
View File
@@ -75,6 +75,7 @@ BOOL bSystemRestore = TRUE;
BOOL bDisableSwapFiles = FALSE;
BOOL bForAllUsers = TRUE;
BOOL bDisableMemoryProtection = FALSE;
BOOL bOriginalDisableMemoryProtection = FALSE;
BOOL bRegisterFileExt = TRUE;
BOOL bAddToStartMenu = TRUE;
BOOL bDesktopIcon = TRUE;
@@ -2336,9 +2337,10 @@ void DoInstall (void *arg)
if (bSystemRestore)
SetSystemRestorePoint (hwndDlg, TRUE);
if (bOK && bDisableMemoryProtection)
if (bOK && (bDisableMemoryProtection != bOriginalDisableMemoryProtection))
{
WriteMemoryProtectionConfig(FALSE);
WriteMemoryProtectionConfig(bDisableMemoryProtection? FALSE : TRUE);
bRestartRequired = TRUE; // Restart is required to apply the new memory protection settings
}
if (bOK)