Mischa Taylor

Have you ever tried automating a Windows install using GUID Partition Table (GPT) partitioning, only to discover that you always get a "Press any key to boot" prompt that you can't disable?

Windows really wants you to press a key

You're not missing something. It turns out that Windows install images behave differently when you are using UEFI/GPT vs. legacy BIOS on boot[1]. By default UEFI/GPT displays a prompt, legacy BIOS boots directly to Windows install. The behaviour is not consistent. Apparently this was a default that was carried over from Intel Itanium (IA-64) architecture before the engineers fully understood how UEFI was going to be used in the real world.

Workaround

So how do you change this behaviour? Well, you need to make a new boot disk. All Windows install media comes with a second "no prompt" bootloader, it's just not enabled by default:

Both "prompt" and "no prompt" bootloaders are included on every Windows install .ISO

What you'll need

To create a new boot ISO, you'll need the following:

Steps

1) Mount the Windows install ISO

2) Copy the Windows install ISO to a local disk so you can change it:

3) Modify the local copy of the Windows install ISO in c:\iso to use cdboot_noprompt.efi and efisys_noprompt.bin bootloaders:

4) Start an elevated deployment and imaging tools environment (created when you installed the Windows ADK).

Choose Run As Administrator via Deployment and Imaging Tools Environment under Windows Kits in the Start menu to launch the imaging tools environment:

5) Use the oscdimg tool to create a new boot image. Be patient - it will take several minutes:

6) Use your _noprompt.iso with impunity - look ma, no prompt!

References

[1] https://blogs.technet.microsoft.com/jhoward/2013/11/11/hyper-v-generation-2-virtual-machines-part-9/