[togo] add newer install.wim + install.esd support

* With no thanks whatsoever to Microsoft for *NOT* documenting that you need
  to pass flag 0x2000000 to WIMCreateFile() if you want to avoid an open error.
  One has to wonder if Microsoft isn't deliberately adding *BULLSHIT FLAGS*
  that only they know of, to hinder competing third-party tools...
This commit is contained in:
Pete Batard 2019-01-08 18:30:07 +00:00
parent befe2606cf
commit 521034da99
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
7 changed files with 77 additions and 47 deletions

View file

@ -959,6 +959,7 @@ static void CALLBACK BlockingTimer(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD
#define PRINT_ISO_PROP(b, ...) do {if (b) uprintf(__VA_ARGS__);} while(0)
static void DisplayISOProps(void)
{
static char* inst_str = "[1/#]";
int i;
uprintf("ISO label: '%s'", img_report.label);
@ -993,13 +994,12 @@ static void DisplayISOProps(void)
PRINT_ISO_PROP(HAS_BOOTMGR(img_report), " Uses: Bootmgr (%s)",
HAS_BOOTMGR_BIOS(img_report) ? (HAS_BOOTMGR_EFI(img_report) ? "BIOS and UEFI" : "BIOS only") : "UEFI only");
PRINT_ISO_PROP(HAS_WINPE(img_report), " Uses: WinPE %s", (img_report.uses_minint) ? "(with /minint)" : "");
if (HAS_INSTALL_WIM(img_report)) {
uprintf(" Uses: Install.wim (version %d.%d.%d)", (img_report.install_wim_version >> 24) & 0xff,
(img_report.install_wim_version >> 16) & 0xff, (img_report.install_wim_version >> 8) & 0xff);
// Microsoft somehow managed to make their ESD WIMs incompatible with their own APIs
// (yes, EVEN the Windows 10 APIs), so we must filter them out...
if (img_report.install_wim_version >= MAX_WIM_VERSION)
uprintf(" Note: This WIM version is NOT compatible with Windows To Go");
if (HAS_WININST(img_report)) {
inst_str[3] = '0' + img_report.wininst_index;
uprintf(" Uses: Install.%s%s (version %d.%d.%d%s)", &img_report.wininst_path[0][strlen(img_report.wininst_path[0]) - 3],
(img_report.wininst_index > 1) ? inst_str : "", (img_report.wininst_version >> 24) & 0xff,
(img_report.wininst_version >> 16) & 0xff, (img_report.wininst_version >> 8) & 0xff,
(img_report.wininst_version >= SPECIAL_WIM_VERSION) ? "+": "");
}
PRINT_ISO_PROP(img_report.has_symlinks, " Note: This ISO uses symbolic links, which will not be replicated due to file system limitations.");
PRINT_ISO_PROP(img_report.has_symlinks, " Because of this, some features from this image may not work...");
@ -1196,7 +1196,7 @@ static DWORD WINAPI BootCheckThread(LPVOID param)
(!HAS_SYSLINUX(img_report) || (SL_MAJOR(img_report.sl_version) <= 5)))
|| ((IS_FAT(fs)) && (!HAS_SYSLINUX(img_report)) && (!allow_dual_uefi_bios) && !IS_EFI_BOOTABLE(img_report) &&
(!HAS_REACTOS(img_report)) && !HAS_KOLIBRIOS(img_report) && (!HAS_GRUB(img_report)))
|| ((IS_FAT(fs)) && (HAS_WINDOWS(img_report) || HAS_INSTALL_WIM(img_report)) && (!allow_dual_uefi_bios)) ) {
|| ((IS_FAT(fs)) && (HAS_WINDOWS(img_report) || HAS_WININST(img_report)) && (!allow_dual_uefi_bios)) ) {
// Incompatible FS and ISO
MessageBoxExU(hMainDialog, lmprintf(MSG_096), lmprintf(MSG_092), MB_OK|MB_ICONERROR|MB_IS_RTL, selected_langid);
goto out;