From 66ddd29c91b02d5b8fb5a95e36cd9baa0627a5e6 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 25 May 2026 05:06:33 +0900 Subject: [PATCH] Windows: report missing EFI boot loader clearly When preparing UEFI system encryption, check for the standard Windows bootmgfw.efi path before reading it. If it is absent, show the existing VeraCrypt diagnostic instead of surfacing a generic file-not-found error from the elevated COM path. --- src/Common/BootEncryption.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Common/BootEncryption.cpp b/src/Common/BootEncryption.cpp index 6a688a5c..86b7e07f 100644 --- a/src/Common/BootEncryption.cpp +++ b/src/Common/BootEncryption.cpp @@ -5043,6 +5043,12 @@ namespace VeraCrypt EfiBootInst.PrepareBootPartition(); + if (!EfiBootInst.FileExists (szStdMsBootloader)) + { + Error ("WINDOWS_EFI_BOOT_LOADER_MISSING", ParentWindow); + throw UserAbort (SRC_POS); + } + EfiBootInst.GetFileSize(szStdMsBootloader, loaderSize); bootLoaderBuf.resize ((size_t) loaderSize); EfiBootInst.ReadFile(szStdMsBootloader, &bootLoaderBuf[0], (DWORD) loaderSize);