VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2020-07-21 12:14:31 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2020-07-21 12:47:28 +0200
commit290412afced5f020c3c3cdaafe86c4352608ab16 (patch)
tree46f323fbcb68faeaa05a618c45db44911a93c502
parentf9782fb3f6393b967d2997feff85d59c01a7db80 (diff)
downloadVeraCrypt-290412afced5f020c3c3cdaafe86c4352608ab16.tar.gz
VeraCrypt-290412afced5f020c3c3cdaafe86c4352608ab16.zip
Windows Setup: Warn about Fast Startup during install if it is enabled and propose to disable it at the end of the installation.
-rw-r--r--src/Common/Language.xml1
-rw-r--r--src/Setup/Setup.c9
-rw-r--r--src/Setup/Wizard.c10
-rw-r--r--src/Setup/Wizard.h1
4 files changed, 21 insertions, 0 deletions
diff --git a/src/Common/Language.xml b/src/Common/Language.xml
index cc12e8b7..e0e657c9 100644
--- a/src/Common/Language.xml
+++ b/src/Common/Language.xml
@@ -1445,6 +1445,7 @@
<entry lang="en" key="IDC_FORCE_VERACRYPT_BOOT_ENTRY">Force the presence of VeraCrypt entry in the EFI firmware boot menu</entry>
<entry lang="en" key="IDC_FORCE_VERACRYPT_FIRST_BOOT_ENTRY">Force VeraCrypt entry to be the first in the EFI firmware boot menu</entry>
<entry lang="en" key="RAM_ENCRYPTION_DISABLE_HIBERNATE">WARNING: RAM encryption is not compatible with Windows Hibernate and Windows Fast Startup features. VeraCrypt needs to disable them before activating RAM encryption.\n\nContinue?</entry>
+ <entry lang="en" key="CONFIRM_DISABLE_FAST_STARTUP">WARNING: Windows Fast Startup is enabled and it is known to cause issues when working with VeraCrypt volumes. It is advised to disable it for better security and usability.\n\nDo you want to disable Windows Fast Startup?</entry>
</localization>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="VeraCrypt">
diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c
index 7d17962c..364395d8 100644
--- a/src/Setup/Setup.c
+++ b/src/Setup/Setup.c
@@ -2362,6 +2362,15 @@ void DoInstall (void *arg)
if (bOK && !bUninstall && !bDowngrade && !bRepairMode && !bDevm)
{
+ BOOL bHibernateEnabled = FALSE, bHiberbootEnabled = FALSE;
+ if (GetHibernateStatus (bHibernateEnabled, bHiberbootEnabled))
+ {
+ if (bHiberbootEnabled)
+ {
+ bPromptFastStartup = TRUE;
+ }
+ }
+
if (!IsHiddenOSRunning()) // A hidden OS user should not see the post-install notes twice (on decoy OS and then on hidden OS).
{
if (bRestartRequired || SystemEncryptionUpdate)
diff --git a/src/Setup/Wizard.c b/src/Setup/Wizard.c
index 1021e8bc..7de3ef0c 100644
--- a/src/Setup/Wizard.c
+++ b/src/Setup/Wizard.c
@@ -60,6 +60,7 @@ BOOL bStartExtraction = FALSE;
BOOL bInProgress = FALSE;
BOOL bPromptTutorial = FALSE;
BOOL bPromptReleaseNotes = FALSE;
+BOOL bPromptFastStartup = FALSE;
extern BOOL bUserSetLanguage;
@@ -1203,6 +1204,15 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
bPromptTutorial = FALSE;
}
+ if (bPromptFastStartup
+ && AskWarnYesNo ("CONFIRM_DISABLE_FAST_STARTUP", hwndDlg) == IDYES)
+ {
+ WriteLocalMachineRegistryDword (L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power", L"HiberbootEnabled", 0);
+ bRestartRequired = TRUE;
+ }
+
+ bPromptFastStartup = FALSE;
+
if (bRestartRequired
&& AskYesNo (bUpgrade ? "UPGRADE_OK_REBOOT_REQUIRED" : "CONFIRM_RESTART", hwndDlg) == IDYES)
{
diff --git a/src/Setup/Wizard.h b/src/Setup/Wizard.h
index df423b90..40ff0353 100644
--- a/src/Setup/Wizard.h
+++ b/src/Setup/Wizard.h
@@ -25,6 +25,7 @@ BOOL CALLBACK MainDialogProc ( HWND hwndDlg , UINT uMsg , WPARAM wParam , LPARAM
extern BOOL bPromptTutorial;
extern BOOL bPromptReleaseNotes;
+extern BOOL bPromptFastStartup;
#ifdef __cplusplus
}