Here is a step-by-step guide to create a x64 bootimage with support for Scripting, WMI, HTA, ADO, .NET Framework 4.0, PowerShell and the DISM cmdlets for PowerShell.
Create the boot image
In this sample you will create a x64 boot image.
- Download the Assessment and Deployment Kit (ADK) from MSDN subscribers download
- Install ADK by running adksetup.exe, and make sure that Windows Preinstallation Environment is selected (selected by default)
- Create the C:\WinPE_x64 folder
- Copy the winpe.wim file from C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64 to C:\WinPE_x64
- Create the C:\Mount folder
- Start the Deployment Tools and Imaging Environment, and mount the boot image using the following command:
Imagex /mountrw C:\WinPE_x64\winpe.wim 1 C:\Mount
- Add the various optional components to the boot image by running the following commands:
cd /d "C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs"
dism /image:C:\Mount /add-package /packagepath:"WinPE-Scripting.cab"
dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-Scripting_en-us.cab"
dism /image:C:\Mount /add-package /packagepath:"WinPE-WMI.cab"
dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-WMI_en-us.cab"
dism /image:C:\Mount /add-package /packagepath:"WinPE-MDAC.cab"
dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-MDAC_en-us.cab"
dism /image:C:\Mount /add-package /packagepath:"WinPE-HTA.cab"
dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-HTA_en-us.cab"
dism /image:C:\Mount /add-package /packagepath:"WinPE-NetFx4.cab"
dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-NetFx4_en-us.cab"
dism /image:C:\Mount /add-package /packagepath:"WinPE-PowerShell3.cab"
dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-PowerShell3_en-us.cab"
dism /image:C:\Mount /add-package /packagepath:"WinPE-DismCmdlets.cab"
dism /image:C:\Mount /add-package /packagepath:"en-us\WinPE-DismCmdlets_en-us.cab"
- Commit the changes to the boot image by running the following command: Imagex /unmount /commit C:\Mount
- Done, you now have 280 MB or so boot image, that you can add to your WDS (PXE) server.
Optional step – create a bootable ISO image.
If you don't have a PXE server or just want to mount an ISO for test, here you find the additional steps to create a bootable ISO.
- Create the C:\WinPE_x64\ISO folder
- Copy the contents of the C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\Media folder to C:\WinPE_x64\ISO
- Create the C:WinPE_x64\ISO\Sources folder
- Copy (or move) the winpe.wim file in C:\WinPE_x64 to C:\WinPE_x64\ISO\Sources
- Rename the winpe.wim file in C:\WinPE_x64\ISO\Sources to boot.wim
- Copy the etfsboot.com file from C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment and Imaging Tools\amd64\Oscdimg to C:\WinPE_x64
- Create the bootable ISO by running the following command:
oscdimg -b"c:\WinPE_X64\etfsboot.com" -n C:\WinPE_X64\ISO C:\WinPE_X64\WinPE_X64.iso
- Done, you now have a 330 MB or so ISO.

/ Johan
You need to have Windows ADK 8.1 installed, and open a "Deployment and Imaging Tools Environment" command prompt that sets the path to the tools.
/ Johan
Hi Johan,
I am new to this on building WinPE on Windows 8 and i'm following your steps.
When I issue this command:
Imagex /mountrw C:WinPE_x64winpe.wim 1 C:Mount
I get a message:
'imagex' is not recognized as an internal or external command,
operable program or batch file.
Please help.
Hi Magill,
What .exe?
All commands I'm using is part of Windows ADK which is a free download from Microsoft. No source code is available.
/ Johan
REPLY TO: "/ Johan"
is there any chance you could share your code for that .exe? Where I work I could very possibly use this but due to your typical in-house restrictions something like this running in a production environment would have to be approved and live in our source.
thanks
Sean
Cool, thanks for the update.
Do you mind if I create a new post with that info? (will give you credit of course)
/ Johan
Hi! Same build but with PE 8.1.. ———————# Run the Imaging tools command prompt as Administrator:C:Windowssystem32cmd.exe /k "C:Program Files (x86)Windows Kits8.1Assessment and Deployment KitDeployment ToolsDandISetEnv.bat " # Run the following commands or save them as a cmd and run it in the Imaging tools command prompt! md c:mountmd C:WinPE_x64 copy "C:Program Files (x86)Windows Kits8.1Assessment and Deployment KitWindows Preinstallation Environmentamd64en-uswinpe.wim" c:WinPE_x64 Imagex /mountrw C:WinPE_x64winpe.wim 1 C:Mount cd /d "C:Program Files (x86)Windows Kits8.1Assessment and Deployment KitWindows Preinstallation Environmentamd64WinPE_OCs" dism /image:C:Mount /add-package /packagepath:"WinPE-Scripting.cab"dism /image:C:Mount /add-package /packagepath:"en-usWinPE-Scripting_en-us.cab"dism /image:C:Mount /add-package /packagepath:"WinPE-WMI.cab"dism /image:C:Mount /add-package /packagepath:"en-usWinPE-WMI_en-us.cab"dism /image:C:Mount /add-package /packagepath:"WinPE-MDAC.cab"dism /image:C:Mount /add-package /packagepath:"en-usWinPE-MDAC_en-us.cab"dism /image:C:Mount /add-package /packagepath:"WinPE-HTA.cab"dism /image:C:Mount /add-package… Read more »
Don't know if it will be added in WinPE 5.0, but there are ways to fix this in WinPE 4.0
social.technet.microsoft.com/Forums/en-US/18aea633-de1d-4935-a748-320abc01746d/enable-8dot3name-in-a-task-sequence-using-winpe-40
/ Johan
I understand that they disabled the 8.3 naming convention in ADK and did not include the fsutil.exe in WinPE 4.0.
this is causing applications that use this naming convention to fail.. Are there any plans to add the fsutil.exe back into PE 4.0 or enable the 8.3 naming convention?
I don't now for sure about the SRT package, but I expect Microsoft to continue to only include it in the setup boot.wim, and not in the generally available ADK. Like it is for WinPE 3.0
/ Johan
ADK is simply the next version of WAIK. ADK is not required for Windows 8 or Windows Server 2012 deployments, you can still use WAIK, but does include additional features that are useful.
/ Johan
Hi All,
Does anyone knows if SRT package is available for Winpe 4.0 /ADK? I couldn't found it.
Is the recovery package has been moved or renamed or not present at all?
ADK is the next release of WAIK. ADK will be used for both Windows 8 and Windows Server 2012 deployments, and will be released at the same time.
/ Johan
What's the different between WAIK and ADK?
I expect that Microsoft will release a new WAIK for handling Windows Server 8 automated installation. Is that a realistic expectation? 😉 or ADK is the NEW way to go.
Thanks. I executed the procedure again and it works, so I did something wrong the first time. The 32-bit sample didn't run, maybe because WinPE still doesn't support WOW64, but an x64 app .NET app worked fine.
Hi Kevin,
I tested to write a small Windows Forms Application in C$ (.NET Framework 4 client profile), and that worked fine in WinPE. I have uploaded my sample to this link if you want to try it in your boot image. https://deploymentresearch.com/DRFiles/DotNetSampleAppWinPE40Demo.zip (Please note it's a x86 app).
If you want me to test your code, please zip the project and upload your code somewhere and post the link.
/ Johan
I followed the (excellent) instructions for configuring WinPE with all the packages indicated. WinPE runs fine and executes Win32 programs, but not a simple ("Hello world") .NET 4.0 GUI app. Did I do something wrong in configuration or is there some kind of limit on the kind of .NET 4.0 support?
Wow, I have never tested WinPE 4.0 on Windows Server 2003… I stopped using 2003 as WDS servers almost four years ago…
/ Johan
I made a x86 version of the above – booting from cd is fine and runs my .net4 apps woohoo – but i tried adding the boot.wim to a WDS server (on a win server 2003 box) – it broke WDS and you could no longer network boot.. had to re-store E:RemoteInstallBoot from last backup to get WDS to run again… – I really want this running from WDS!
Hi Johan!
Thank you for the infomation sharing, I really need .Net support in WinPE, I will check it out soon 🙂
Ehhh Cannot find it in my MSDN subscription either MSDN AA or technet 🙁 I'm so keen to do some testing using powershell in Windows PE. It would open so many new abilities of deploying OS and customizing them 🙂
I'm excited about the .Net framework support here. Do you know if this can be used used to deploy Win7? My guess is yes. Also, do you know if the WinPE-NetFx4_en-us.cab file would work on a WAIK 3.0 WinPE setup? Just curious. I don't know if we would start using the ADK if it hasn't been through the ringer fully yet.
Thanks for posting this. I haven't found this information any where else yet.
I have asked the setup team at Microsoft but no info yet, sorry.
/ Johan
When will this be available for technet subscribers?
Or more widely available for that matter?