The Windows Preinstallation Environment (WinPE) is a stripped-down operating system that is used to deploy Windows 10 or for the recovery environment. Microsoft does not make it available as an ISO download; rather, you have to create the bootable media yourself.

Windows PE has always been part of the WAIK, or Windows ADK, but has been a separate download since Windows 10 1809. This gives the impression that one could create an ISO file or a USB stick with the separately downloaded WinPE files alone. But this is actually not the case.

Installing the WinPE package ^

If you run setup for Windows PE, it installs the files by default under the following path:

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

The files for Windows PE are installed via a separate setup, independent of the ADK

The files for Windows PE are installed via a separate setup, independent of the ADK

Alternatively, you can download the package into a different directory and start the setup from there. This option is particularly useful if you want to run the installation on other computers as well.

If you start the batch files that are used to create a bootable WinPE at this point, they will abort with various error messages. The main reason is the lack of required environment variables.

Adding deployment tools ^

Therefore, in the next step, you start the ADK Setup and select Deployment Tools for installation.

Adding deployment tools via ADK setup

Adding deployment tools via ADK setup

When this process is complete, 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).

Now provision the files that are needed for the ISO or the memory stick. This is done by running copype.cmd:

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

Adding deployment tools via ADK setup

Adding deployment tools via ADK setup

Adding packages to WIM ^

The boot.wim file can then be found in media\sources below the directory you specified above. If you want to customize Windows PE, for example by integrating language packs (WinPE is in English by default) or additional features, you mount the WIM with DISM. This is done on the command prompt from the directory you specified as the target in copype.cmd, where mount already exists:

The language files can be found by default under the following path:
%ProgramFiles(x86)%\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\<Architektur>\WinPE_OCs\.

These are added as follows:

For example, use

to set the language of the command line, the keyboard layout, and the location to Germany.

If you want to add PowerShell, the same pattern should be applied. However, you have to copy several packages in a given order. Like the language files, they are located under the directory WinPE_OCs:

  • WinPE-WMI.cab
  • WinPE-WMI_<language-code>.cab
  • WinPE-NetFx.cab
  • WinPE-NetFx_<language-code>.cab
  • WinPE-PowerShell.cab
  • WinPE-PowerShell_<language-code>.cab
PowerShell can be added to Windows PE as a package

PowerShell can be added to Windows PE as a package

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

Activating a different keyboard layout online ^

If customizing boot.wim seems to be too much work because you just want to have a different keyboard layout, you can get one like this after booting WinPE:

If you leave WinPE with the English language setting, you may still change the keyboard layout online for other languages

If you leave WinPE with the English language setting, you may still change the keyboard layout online for other languages

This example activates the German keyboard layout. The individual country codes are listed on this page. Finally, you have to call a fresh copy of cmd.exe, because the change has no effect on the current command line.

Creating ISO ^

The last step is to create the boot media for Windows PE. The following command serves this purpose:

The /ISO switch is obviously used to create a CD/DVD image, followed by the directory that you specified as the target in copype.cmd, and finally the name of the ISO file.

A USB stick is created in the same way, except that instead of the DVD, the UFD switch is required and the destination is simply the letter of the USB drive:

If you want to suppress the warning before the stick is formatted, you can add the /F switch to the command.

Join the 4sysops PowerShell group!

Your question was not answered? Ask in the forum!

5+

Users who have LIKED this post:

  • avatar
  • avatar
Share
0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2020

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