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.
This commit is contained in:
Mounir IDRASSI
2026-05-25 05:06:33 +09:00
parent 0d86b9b3e6
commit 66ddd29c91

View File

@@ -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);