diff --git a/src/format.c b/src/format.c index 4050a13c..7ca67da0 100644 --- a/src/format.c +++ b/src/format.c @@ -1106,7 +1106,11 @@ static BOOL WritePBR(HANDLE hLogicalVolume) if (!write_fat_32_ros_br(fp, 0)) break; } else if ((bt == BT_ISO) && HAS_KOLIBRIOS(img_report)) { if (!write_fat_32_kos_br(fp, 0)) break; - } else { + } else if ((bt == BT_ISO) && (img_report.has_bootmgr)) { + if (!write_fat_32_pe_br(fp, 0)) break; + } else if ((bt == BT_ISO) && (img_report.has_ntldr)) { + if (!write_fat_32_nt_br(fp, 0)) break; + } else { /* This is a DOS boot record */ if (!write_fat_32_br(fp, 0)) break; } // Disk Drive ID needs to be corrected on XP diff --git a/src/iso.c b/src/iso.c index cfca7d51..2114373a 100644 --- a/src/iso.c +++ b/src/iso.c @@ -69,6 +69,7 @@ BOOL enable_iso = TRUE, enable_joliet = TRUE, enable_rockridge = TRUE, has_ldlin #define ISO_BLOCKING(x) do {x; iso_blocking_status++; } while(0) static const char* psz_extract_dir; static const char* bootmgr_efi_name = "bootmgr.efi"; +static const char* ntldr_name = "ntldr"; static const char* grldr_name = "grldr"; static const char* ldlinux_name = "ldlinux.sys"; static const char* ldlinux_c32 = "ldlinux.c32"; @@ -188,6 +189,9 @@ static BOOL check_iso_props(const char* psz_dirname, int64_t i_file_length, cons if (safe_strnicmp(psz_basename, bootmgr_efi_name, safe_strlen(bootmgr_efi_name)-5) == 0) { img_report.has_bootmgr = TRUE; } + if (safe_stricmp(psz_basename, ntldr_name) == 0) { + img_report.has_ntldr = TRUE; + } if (safe_stricmp(psz_basename, grldr_name) == 0) { img_report.has_grub4dos = TRUE; } diff --git a/src/rufus.h b/src/rufus.h index c9f0fa7a..84ac88c5 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -280,6 +280,7 @@ typedef struct { BOOLEAN has_long_filename; BOOLEAN has_symlinks; BOOLEAN has_bootmgr; + BOOLEAN has_ntldr; BOOLEAN has_autorun; BOOLEAN has_old_c32[NB_OLD_C32]; BOOLEAN has_old_vesamenu;