From 49f5d91fed9199cbcb92136d229cfa2563230b01 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 17 Oct 2016 16:36:50 +0200 Subject: Windows: Support 32-bit Windows in Rescue Disk. --- DcsRe/DcsRe.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/DcsRe/DcsRe.c b/DcsRe/DcsRe.c index 5ccb1b2..1278eea 100644 --- a/DcsRe/DcsRe.c +++ b/DcsRe/DcsRe.c @@ -102,7 +102,11 @@ SelectEfiVolume() for (i = 0; i < gFSCount; ++i) { res = FileOpenRoot(gFSHandles[i], &file); if(EFI_ERROR(res)) continue; +#ifdef _M_X64 if (!EFI_ERROR(FileExist(file, L"EFI\\Boot\\bootx64.efi"))) { +#else + if (!EFI_ERROR(FileExist(file, L"EFI\\Boot\\bootia32.efi"))) { +#endif efiVolumesCount++; efiVolumes[i] = file; if (gFSHandles[i] != startHandle) { @@ -141,7 +145,11 @@ SelectEfiVolume() ////////////////////////////////////////////////////////////////////////// EFI_STATUS ActionBootWinPE() { +#ifdef _M_X64 return EfiExec(NULL, L"EFI\\Boot\\WinPE_bootx64.efi"); +#else + return EfiExec(NULL, L"EFI\\Boot\\WinPE_bootia32.efi"); +#endif } EFI_STATUS @@ -151,9 +159,9 @@ ActionShell() { EFI_STATUS ActionDcsBoot() { - SelectEfiVolume(); - if (EfiBootVolume == NULL) return EFI_NOT_READY; - return EfiExec(gFSHandles[EfiBootVolumeIndex], L"EFI\\VeraCrypt\\DcsBoot.efi"); + SelectEfiVolume(); + if (EfiBootVolume == NULL) return EFI_NOT_READY; + return EfiExec(gFSHandles[EfiBootVolumeIndex], L"EFI\\VeraCrypt\\DcsBoot.efi"); } CHAR16* DcsBootBins[] = { @@ -298,7 +306,11 @@ DcsReMain( item = AppendMenu(item, L"Boot VeraCrypt loader from rescue disk", 'v', ActionDcsBoot); } +#ifdef _M_X64 if (!EFI_ERROR(FileExist(NULL, L"EFI\\Boot\\WinPE_bootx64.efi"))) { +#else + if (!EFI_ERROR(FileExist(NULL, L"EFI\\Boot\\WinPE_bootia32.efi"))) { +#endif item = AppendMenu(item, L"Boot Windows PE from rescue disk", 'w', ActionBootWinPE); } -- cgit v1.2.3