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

Windows: Warn about Fast Startup if it is enabled during system encryption or volume creation and propose to disable it

This commit is contained in:
Mounir IDRASSI
2020-07-22 17:04:32 +02:00
parent 1c3e4fd0ee
commit 587e6db4f1
4 changed files with 68 additions and 0 deletions

View File

@@ -5673,6 +5673,16 @@ namespace VeraCrypt
if (!rescueIsoImagePath.empty())
CreateRescueIsoImage (true, rescueIsoImagePath);
// check if Fast Startup is enabled and if yes then offer to disable it
BOOL bHibernateEnabled = FALSE, bHiberbootEnabled = FALSE;
if (GetHibernateStatus (bHibernateEnabled, bHiberbootEnabled) && bHiberbootEnabled)
{
if (AskWarnYesNo ("CONFIRM_DISABLE_FAST_STARTUP", ParentWindow) == IDYES)
{
WriteLocalMachineRegistryDwordValue (L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power", L"HiberbootEnabled", 0);
}
}
}
bool BootEncryption::IsPagingFileActive (BOOL checkNonWindowsPartitionsOnly)