1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Windows: Update EFI NVRAM variable only if changed or doesn't exist and add configuration to force setting EFI BootNext to veraCrypt bootloader before each shutdown

This commit is contained in:
Mounir IDRASSI
2019-10-26 22:49:37 +02:00
parent f22abf93dd
commit ca46cf928a
3 changed files with 27 additions and 12 deletions

View File

@@ -9430,7 +9430,10 @@ static DWORD WINAPI SystemFavoritesServiceCtrlHandler ( DWORD dwControl,
if (!BootEncStatus.HiddenSystem)
{
// re-install our bootloader again in case the update process has removed it.
BootEncryption bootEnc (NULL, true);
bool bForceSetNextBoot = false;
if (BootEncObj->ReadServiceConfigurationFlags () & VC_SYSTEM_FAVORITES_SERVICE_CONFIG_FORCE_SET_BOOTNEXT)
bForceSetNextBoot = true;
BootEncryption bootEnc (NULL, true, bForceSetNextBoot);
bootEnc.InstallBootLoader (true);
}
}