diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-07-22 17:04:32 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2020-07-22 17:27:59 +0200 |
commit | 587e6db4f16291d8b6f22d0937a4bff87bc8ffc0 (patch) | |
tree | c60a12b021182324b9d741981bf8b45b621ee742 /src/Common/BootEncryption.cpp | |
parent | 1c3e4fd0ee235ac2cf7cee2c2f6db2ac74ba21c8 (diff) | |
download | VeraCrypt-587e6db4f16291d8b6f22d0937a4bff87bc8ffc0.tar.gz VeraCrypt-587e6db4f16291d8b6f22d0937a4bff87bc8ffc0.zip |
Windows: Warn about Fast Startup if it is enabled during system encryption or volume creation and propose to disable it
Diffstat (limited to 'src/Common/BootEncryption.cpp')
-rw-r--r-- | src/Common/BootEncryption.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Common/BootEncryption.cpp b/src/Common/BootEncryption.cpp index 502b4e06..0f415394 100644 --- a/src/Common/BootEncryption.cpp +++ b/src/Common/BootEncryption.cpp @@ -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) |