

So what needs to be changed for a BIOS device (non-UEFI, which today typically means a UEFI device booting using a compatibility support module )? Absolutely nothing, because that same “Media” folder that we copied previously includes the necessary structure for non-UEFI systems as well: The “bootmgr” file at the root of the media, the BCD file in the \Boot folder, and a few other supporting files in that same \Boot folder (again with a lot of non-essential language files carried along, but not worth the hassle to remove). The previous script set up a USB key to boot a UEFI device. See below for the full script, attached in a zip file. While in theory you could have a single USB key that can be used to boot all three platforms (since each platform will look for a different “BOOT.efi” file), in practice it’s not worth the hassle because (a) you would have to create the BCD yourself, and (b) you can’t easily have per-platform BCDs so you would have to show a boot menu to let the user pick which one to boot. You can now eject your USB key, insert it into a UEFI system, and boot from it. But since the “media” folder that we copied already includes a BCD that points to \Sources\boot.wim, the easiest solution is put the Windows PE boot image in that exact location (using “boot.wim” as the file name, instead of whatever name it originally had). Technically, the “right spot” could be anywhere, as long as the BCD points to it. Lastly, we need to put the Windows PE boot image in the right spot. Technically this copies more than you really need (as you probably don’t care about having all the different sets of language resources, since you’re unlikely to ever see a boot menu anyway), but it’s not worth the hassle to filter out the extra stuff. That’s simple to do:Īnd copy the whole “Media” folder structure from the ADK to the media, which puts all the needed files in the right places. To provide a little bit of safety, it’s good to verify that the drive letter is actually a removable disk, since the next step is to format the drive as FAT32, a destructive operation. Next, we need to find the ADK and Windows PE files. First, we need to know the source and destination details: Let’s walk through a PowerShell script to set up a USB key. Fortunately, the ADK includes a folder structure called “Media” that makes it easier to set all this up.

That file then loads the boot configuration data (BCD) form \EFI\Microsoft\BOOT\BCD, which tells it what Windows installation to boot. The boot process itself looks for a particular file, for example \EFI\BOOT\BOOTX64.EFI on an AMD64 (64-bit) system. UEFI requires a FAT32 volume for booting it doesn’t support booting from NTFS. These days, the most useful way is via a USB key on a UEFI system, so let’s start there.

And there are plenty different ways to do that. My previous blog talked about how to create a Windows PE boot image.
