Microsoft does not provide a WinPE bootable disk as an ISO, so you have to create it yourself. During this process, you can also add language packages or tools.

The Preinstallation Environment (WinPE) is a lean version of Windows that is used for OS deployment or for the Recovery Environment. Windows PE was always part of Windows ADK (formerly WAIK), but since Windows 10 1809, it has been a separate download. However, this alone is not enough to create an ISO file or a USB stick with WinPE. Instead, you still need the deployment tools from the ADK.

Install the WinPE package ^

If you run the setup for Windows PE, it installs the files as in Windows 10 at the following default location:

%ProgramFiles(amd64)%\Windows Kits\10\

If you start the batch files, which are used to create a bootable WinPE, they abort at this point with various error messages due to the missing ADK.

The files for creating WinPE media are installed via a separate setup

The files for creating WinPE media are installed via a separate setup

Add deployment tools ^

Therefore, the next step is to start the ADK-Setup and select Deployment Tools for installation.

From the Windows ADK, you only need the deployment tools for WinPE

From the Windows ADK, you only need the deployment tools for WinPE

When this process is finished, open a command prompt and run the batch file DandISetEnv.bat in the Deployment Tools directory (by default under %ProgramFiles(x86)%\Windows Kits\10\Assessment and Deployment Kit). This sets the required environment variables.

Now, you provision the files you need for the ISO or the memory stick by using copype.cmd. A call could look like this:

copype amd64 %USERPROFILE%\WinPE

The first parameter specifies the architecture; in this case, 64-bit for Intel or AMD. You can choose between amd64, arm, and arm64. The second parameter specifies the target directory. However, this must not exist; otherwise, the process will terminate.

Supply the files for the WinPE boot media with copype.cmd

Supply the files for the WinPE boot media with copype.cmd

Create the ISO or bootable USB stick ^

At this point, you have already met the prerequisites for creating the Windows PE boot media. The following command will generate an ISO image:

MakeWinPEMedia.cmd /ISO %USERPROFILE%\WinPE .\WinPE.iso

The ISO switch is followed by the directory that you specified as the target for copype.cmd and the name of the ISO file.

The USB stick is created in the same way, except that you use the UFD switch and specify only the letter of the drive as the target:

MakeWinPEMedia /UFD c:\Users\me\WinPE G:

If you want to suppress the warning before formatting the disk, you can add the /F switch to the command.

Create bootable media for Windows PE with MakeWinPEMedia.cmd

Create bootable media for Windows PE with MakeWinPEMedia.cmd

After the successful completion of the process, you get a bootable but only bare-bones WinPE. It contains only the English language package, the English keyboard layout, and no tools. Therefore, you will usually want to customize the image for Windows PE before generating the disk.

Mount the WinPE image with DISM ^

The file boot.wim can be found in media\sources in the directory tree below the target folder of copype.cmd. If you want to customize Windows PE, you have to mount the WIM with DISM.

This is done at the command prompt from the directory that you specified as the target for copype.cmd, where the mount directory already exists:

dism /Mount-Wim /MountDir:mount /wimfile:boot.wim /index:1

Add a language package ^

By default, the language files can be found under %ProgramFiles(x86)%\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\<Architecture>\WinPE_OCs\ in the directories named after the language codes.

For example, to add the German language pack in the x64 version, do the following:

dism /image:mount /Add-Package /PackagePath: "%ProgramFiles(amd64)%\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\de-de\lp.cab"
Add the German language pack and change the keyboard layout

Add the German language pack and change the keyboard layout

Using

dism /image:mount /Set-AllIntl:de-DE

you set the UI language, keyboard layout, and location to Germany.

Integrate PowerShell and tools ^

If you want to add PowerShell, you have to copy several packages in a given order; they are located in the same directory as the language file:

Dism /Image:mount /Add-Package /PackagePath:"%WinPERoot%\amd64\WinPE_OCs\WinPE-WMI.cab"
Dism /Image:mount /Add-Package /PackagePath:"%WinPERoot%\amd64\WinPE_OCs\de-de\WinPE-WMI_de-de.cab"
Dism /Image:mount /Add-Package /PackagePath:"%WinPERoot%\amd64\WinPE_OCs\WinPE-NetFx.cab"
Dism /Image:mount /Add-Package /PackagePath:"%WinPERoot%\amd64\WinPE_OCs\de-de\WinPE-NetFx_de-de.cab"
Dism /Image:mount /Add-Package /PackagePath:"%WinPERoot%\amd64\WinPE_OCs\WinPE-PowerShell.cab"
Dism /Image:mount /Add-Package /PackagePath:"%WinPERoot%\amd64\WinPE_OCs\de-de\WinPE-PowerShell_de-de.cab"

The three packages from the de-de directory are used for localization purposes. If you only need the English version of PowerShell, you don't have to install them.

WinPE with PowerShell installed and the German language settings activated

WinPE with PowerShell installed and the German language settings activated

If needed, you can copy your own tools into the image by changing to the desired folder under the mount directory, e.g., to the Program directory. Candidates might be the command line programs from SysInternals. However, you have to expect that many of them will not run on this stripped-down Windows.

To apply the changes to boot.wim, execute the following command:

dism /Unmount-Wim /MountDir:mount /commit

Conclusion ^

Creating a WinPE bootable disk has not changed much in Windows 11. You still need the command line tools from the Windows ADK and the separate WinPE download.

Subscribe to 4sysops newsletter!

A minimalistic Windows PE can be created quickly and with little effort. However, if you want additional language packs and a corresponding keyboard layout, you have to edit the image file. This is also the case if you want to add PowerShell or other tools.

0 Comments

Leave a reply

Your email address will not be published.

*

© 4sysops 2006 - 2022

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account