Q. How can I create a Windows Preinstallation Environment (WinPE) 2.1 boot image that has both x86 and x64 versions?

John Savill

February 12, 2009

3 Min Read
ITPro Today logo in a gray background | ITPro Today

A. The Windows Automated Installation Kit (WAIK) 1.1 makes it easy to create a customized PE environment for x86 or x64, but I wanted to create a bootable USB or ISO image that had both x86 and x64 versions. It turns out this is easy to do.

  1. Create an x86 WinPE 2.1 environment and an x64 WinPE 2.1 environment. Create each environment in its own folder, such as d:tempwinpex86 and d:tempwinpex64.

  2. You're going to use the x64 folder as your base. Go into the sources folder in the x64 folder and rename the file boot.wim to bootx64.wim.

  3. Change the boot configuration data (BCD) to point to bootx64.wim instead of boot.wim. Start a command prompt window with administrator credentials (press Start, type cmd, then right-click the command prompt item and choose Run As Administrator) and use the following commands. You'll pass the path to the BCD you're editing, d:tempwinpex64isobootbcd. Make sure to replace the GUID of the RAM disk for the existing value you have on your boot configuration database entry.

    C:Windowssystem32>bcdedit /store d:tempwinpex64isobootbcd /enumWindows Boot Manager--------------------identifier {bootmgr}description Windows Boot Managerlocale en-USinherit {globalsettings}default {default}displayorder {default}toolsdisplayorder {memdiag}timeout 30Windows Boot Loader-------------------identifier {default}device ramdisk=[boot]sourcesboot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}path windowssystem32bootwinload.exedescription Windows Setuplocale en-USinherit {bootloadersettings}osdevice ramdisk=[boot]sourcesboot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}systemroot windowsdetecthal Yeswinpe Yesems YesC:Windowssystem32>bcdedit /store d:tempwinpex64isobootbcd
    /set {default} device ramdisk=[boot]sourcesbootamd64.wim,
    {7619dcc8-fafe-11d9-b411-000476eba25f}The operation completed successfully.C:Windowssystem32>bcdedit /store d:tempwinpex64isobootbcd
    /set {default} osdevice ramdisk=[boot]sourcesbootamd64.wim,
    {7619dcc8-fafe-11d9-b411-000476eba25f}The operation completed successfully.C:Windowssystem32>bcdedit /store d:tempwinpex64isobootbcd
    /set {default} description "PE AMD64"The operation completed successfully.C:Windowssystem32>bcdedit /store d:tempwinpex64isobootbcd /enumWindows Boot Manager--------------------identifier {bootmgr}description Windows Boot Managerlocale en-USinherit {globalsettings}default {default}displayorder {default}toolsdisplayorder {memdiag}timeout 30Windows Boot Loader-------------------identifier {default}device ramdisk=[boot]sourcesbootamd64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}path windowssystem32bootwinload.exedescription PE AMD64locale en-USinherit {bootloadersettings}osdevice ramdisk=[boot]sourcesbootamd64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}systemroot windowsdetecthal Yeswinpe Yesems Yes
  4. Copy the boot.wim from the x86 folder into the sources folder of the x64 (the same folder as the bootx64.wim) and rename it to bootx86.wim.

  5. Add a boot entry for bootx86.wim. When you copy the boot configuration database record for default, take note of the GUID it generates, because you'll make changes to this new entry. Once again, when specifying the GUID after the name of the WIM it should be the same GUID used above, as it represents the RAM disk.

    C:Windowssystem32>bcdedit /store d:tempwinpex64isobootbcd /copy
    {default} /d "PE x86"The entry was successfully copied to {3de9d48e-e7cc-11dd-a3f7-002170a954ba}.C:Windowssystem32>bcdedit /store d:tempwinpex64isobootbcd /set
    {3de9d48e-e7cc-11dd-a3f7-002170a954ba} osdevice ramdisk=[boot]sourcesbootx86.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}The operation completed successfully.C:Windowssystem32>bcdedit /store d:tempwinpex64isobootbcd /set
    {3de9d48e-e7cc-11dd-a3f7-002170a954ba} device ramdisk=[boot]sourcesbootx86.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}The operation completed successfully.C:Windowssystem32>bcdedit /store d:tempwinpex64isobootbcd
    -displayorder {3de9d48e-e7cc-11dd-a3f7-002170a954ba} -addlastThe operation completed successfully.C:Windowssystem32>bcdedit /store d:tempwinpex64isobootbcd /enumWindows Boot Manager--------------------identifier {bootmgr}description Windows Boot Managerlocale en-USinherit {globalsettings}default {default}displayorder {default}{3de9d48e-e7cc-11dd-a3f7-002170a954ba}toolsdisplayorder {memdiag}timeout 30Windows Boot Loader-------------------identifier {default}device ramdisk=[boot]sourcesbootamd64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}path windowssystem32bootwinload.exedescription PE AMD64locale en-USinherit {bootloadersettings}osdevice ramdisk=[boot]sourcesbootamd64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}systemroot windowsdetecthal Yeswinpe Yesems YesWindows Boot Loader-------------------identifier {3de9d48e-e7cc-11dd-a3f7-002170a954ba}device ramdisk=[boot]sourcesbootx86.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}path windowssystem32bootwinload.exedescription PE x86locale en-USinherit {bootloadersettings}osdevice ramdisk=[boot]sourcesbootx86.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}systemroot windowsdetecthal Yeswinpe Yesems Yes
  6. Click to expand

    We now have the WIM files for both PE environments in one sources folder and the boot configuration database will display a menu to select which you want to use. At this point, you can copy the ISO folder to a USB device (which you've made active) or make an ISO using the usual methods. An ISO I created using the instructions above is shown here.

Related Reading:

  • Windows Server 2008: 32-Bit or 64-Bit?

  • A Problem With Installing 64-bit Vista

  • Heading to the Future, 64 Bits at a Time

  • How can I create the bootable Windows Preinstallation Environment (WinPE) CD-ROM that the Windows Automated Installation Kit (WAIK) uses?


Check out hundreds more useful Q&As like this in John Savill's FAQ for Windows. Also, watch instructional videos made by John at ITTV.net.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like