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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user