I wanted to suppress the 'Press any key to boot from CD or DVD' prompt when booting directly from an unmodified Windows Installer ISO.
If I boot from a Windows Installer ISO and the use chainloader /bootmgr I don't see the 'Press any key to boot from CD or DVD' prompt.
However, if the ISO is of the Joliet specification, grub4dos 0.4.5c does not understand it (only \README.TXT is listed) and so it has to be booted using chainloader (0xff) - then I do get the 'Press any key to boot from CD or DVD' prompt.
It occurred to me that I could patch the initial boot code so that it did not load the bootfix.bin file.
chainloader (0xff)
causes the text
Load RBA: 0x5B4 Boot Type: 0 = No Emulation
to appear. and 0x5b4 x 4 is 0x16d0 x 512 = 0x2DA000
cat --hex --skip=0x2da700 --length=0x100 (0xff)+0x2000
shows a string
SETUPLDR.BINBOOTMGRBOOTFIX.BINBOOTI386AMD64
Therefore, if we can change the BOOTFIX.BIN string, we can cause it not to be loaded and thus suppress the prompt.
The solution turned out to be simple
map /win8.iso (0xff) map --hook chainloader (0xff) cat --locate=BOOTFIX.BIN --number=1 --replace=XXX (0xff)+0x3000 boot
This suppresses the 'Press any key to boot from CD or DVD' prompt.
[Edit] The ISO file is permanently changed which is why this works.
I am not to sure why this works - presumably (0xff) points to memory for at least some of the ISO and not to the actual ISO file???