From 9361a3cd4be3290611c11993a76b4c6ebedfceb3 Mon Sep 17 00:00:00 2001 From: ValdikSS Date: Sun, 9 Jan 2022 16:15:12 +0300 Subject: [PATCH] Extract bootmgfw.efi from both .wim and .esd (customized Win7 ISO) --- windows2usb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/windows2usb b/windows2usb index bde3d6e..cdb8a1e 100755 --- a/windows2usb +++ b/windows2usb @@ -155,8 +155,11 @@ function extract_bootmgfw_from_installwim() { # $2 - isomountpath # $3 - destdir + local fpath="$2/sources/install.wim" + [ ! -a "$fpath" ] && fpath="$2/sources/install.esd" + mount -o ro "$1" "$2" - 7z e "$2/sources/install.wim" -o"$3/efi/boot/" 1/Windows/Boot/EFI/bootmgfw.efi + 7z e "$fpath" -o"$3/efi/boot/" '?/Windows/Boot/EFI/bootmgfw.efi' umount "$2" }