mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows: Don't allow to encrypt the system drive if it is already encrypted by BitLocker
This commit is contained in:
@@ -5176,6 +5176,12 @@ namespace VeraCrypt
|
||||
if (IsNonInstallMode())
|
||||
throw ErrorException ("FEATURE_REQUIRES_INSTALLATION", SRC_POS);
|
||||
|
||||
/* check if the system drive is already encrypted by BitLocker */
|
||||
wchar_t windowsDrive = (wchar_t) towupper (GetWindowsDirectory()[0]);
|
||||
BitLockerEncryptionStatus bitLockerStatus = GetBitLockerEncryptionStatus (windowsDrive);
|
||||
if (bitLockerStatus == BL_Status_Protected)
|
||||
throw ErrorException ("SYSENC_BITLOCKER_CONFLICT", SRC_POS);
|
||||
|
||||
SystemDriveConfiguration config = GetSystemDriveConfiguration ();
|
||||
|
||||
if (SystemDriveIsDynamic())
|
||||
|
||||
Reference in New Issue
Block a user