Itechtics

Ultimate Guide To Creating Windows Preinstallation Environment (WinPE)

WinPE featured image

When it comes to troubleshooting , the Windows operating system has several built-in troubleshooters and multiple command-line utilities to get things up and running again. But what to do when you are unable to boot into Windows entirely? In that case, you can boot into safe mode or run the Windows Preinstallation Environment (WinPE).

The WinPE, or WindowsPE, is a command-line-based lightweight version of a Windows environment that runs on your RAM and does not require a hard drive. Its base version needs only 512 MBs of RAM to run, which can go up depending on the optional features you add.

That said, Microsoft does not provide the Windows Preinstallation Environment on a plate. Instead, you must create it yourself for the specific type of Windows version you want to troubleshoot or perform any actions on.

Today, we are going to give you the complete details and guidelines on what WinPE is, and how to create a bootable USB flash drive so you can become an IT professional.

Table of Contents

What is Windows Preinstallation Environment

The Windows Preinstallation Environment, or WindowsPE, is a miniature version of an executable Windows which runs on your system’s memory. It can be used to troubleshoot, deploy, and service a Windows image without booting into the Windows itself.

Note that WindowsPE provides a command-line interface, so it is only useful if you know the cmdlets to put into the Command Line Interface (CLI) to perform your desired action.

The Windows Preinstallation Environment looks like this:

Booted into WindowsPE

Uses of Windows Preinstallation Environment (WinPE)

The WinPE is not only used for troubleshooting purposes but also provides other functionality. It can be used for the following list of actions:

  • Set up the hard drive before installing Windows.
  • Install Windows through apps or scripts from a network or a local drive.
  • Capture and apply Windows images.
  • Modify the Windows operating system while it’s not running.
  • Set up automatic recovery tools.
  • Recover data from unbootable devices.
  • Add your own custom shell or GUI to automate the above-mentioned tasks.

Let us now continue to show you how to create a Windows Preinstallation Environment and then boot from it.

How to Create Windows Preinstallation Environment (WinPE)

Before we begin creating a WindowsPE bootable USB drive, there are a few things you might need beforehand:

  • A USB drive – will be formatted and all data will be lost.
  • Another PC (technician PC) in case you are unable to boot into your Windows PC that you want to troubleshoot. Note that the technician PC needs to be of the same Windows version.
  • An active internet connection on the PC which will be used to create the WinPE bootable flash drive to perform downloads where required.

Ensure that you have these things before we proceed.

Furthermore, creating a bootable WinPE drive requires a few steps, some of which are optional. We have divided these steps into the following headings to make things less complicated:

  • Install Windows Assessment and Deployment Kit (ADK) and WinPE Add-on .
  • Create WinPE working files .
  • Mount boot.wim file.
  • Add features.
  • Commit and dismount the boot.wim file.
  • (Conditional) Convert USB to MBR (if in GPT) and format it.
  • Install WinPE to the USB drive.

Note that these steps need to be performed in the chronological order given in the list above.

Install Windows ADK and WinPE Add-On

Firstly, you will need to install Windows Assessment and Deployment Kit (ADK) and WinPE Add-on on the computer you are using to create the WinPE USB flash drive. These are a collection of tools and features that you can combine to prepare, assess and launch image-based large-scale Windows deployments and perform other functions.

Note: If you are using Windows 10 version 1803 or earlier, then you only need to install Windows ADK since it already contains WinPE. However, if you are creating WinPE for Windows 10 version 1809 or later (including Windows 11 ), then you must install the WinPE Add-on separately, as given in the guide below

To confirm your Windows version, type in winver in the Run Command box.

Follow these steps to install Windows ADK and WinPE Add-on:

Start by downloading Windows ADK and WinPE Add-on for your Windows version from the direct download links given in this post .

When downloaded, run the “ adksetup ” file.

The Windows ADK wizard will now launch. On the first screen, select “ Install the Windows Assessment and Deployment Kit to this computer ” and click Next .

Install ADK for this computer

Now select your privacy preference and click Next .

Select privacy terms

Accept the license agreement.

Accept license agreement 1

Now select the “ Deployment Tools ” feature (while unchecking all others since they are not required) and click Install .

Install ADK deployment tools

The selected feature will now install. When it does, close the wizard.

Close ADK installer

Now run the “ adkwinpesetup ” file for WinPE that you downloaded earlier.

The WinPE setup will now run. Select “ Install the Windows Assessment and Deployment Kit Windows Preinstallation Environment Add-ons to this computer ” and click Next .

Install WinPE Addons for current computer

Now select the “ Windows Preinstallation Environment (Windows PE) ” feature and click Install .

Install WinPE

You have now successfully installed Windows ADK and the WindowsPE Add-on. It is now to move on to the next part of the process.

Create Windows Preinstallation Environment Working Files

You must now create a working set of WindowsPE files on your PC. These files can be considered a copy of the same OS you are creating the bootable WinPE USB flash drive on.

Note: These files are later used to create the bootable WindowsPE USB drive. If needed, these can also be customized to add more features to the WinPE.

To create these working files, the CopyPE cmdlet is used in Deployment and Imaging Tools Environment having the following syntax:

Note that [Architecture] and [WorkingFilesDirectory] are variables that need to be changed in accordance with what bit architecture your PC has and where you wish to create the WinPE working files directory/folder, respectively. Here are the details for these variables:

[Architecture]

Possible values:

  • amd64 – For AMD and Intel’s 64-bit BIOS or 64-bit UEFI-based systems.
  • x86 – For 32-bit UEFI, 32-bit BIOS, or 64-bit BIOS-based systems.
  • arm – for 32-bit ARM-based systems only.
  • arm64 – for 64-bit ARM-based systems only.

[WorkingFilesDirectory]

This is the complete path to a folder inside which you will create the working files.

Note: This directory cannot exist beforehand or the process will end here. This needs to be a new folder that will be automatically created after executing the CopyPE command.

Now use these steps to create the WindowsPE working files:

Search for Deployment and Imaging Tools Environment in the search box or the Start menu, right-click it, and then click Run as administrator .

Run Deployment and Imaging Tools as admin

Now run the CopyPE cmdlet as discussed above while entering the correct values.

Since we have Intel’s 64-bit architecture, we entered “amd64” and created the working files directory in the root of the C drive.

Create WindowsPE working files

This should now successfully create the working files inside the given directly in the cmdlet. You can use File Explorer to confirm this.

You should find the following 3 directories inside that folder:

WindowsPE working files directory

You may now skip the next step of customizing the WindowsPE and proceed to create a bootable WindowsPE USB drive or add optional components if needed.

Customize Windows Preinstallation Environment

Before proceeding to create a bootable WindowsPE, you can make customizations to it. Of course, this is optional.

The WindowsPE is created in the English language by default. However, you can add optional components to it, such as language packs , Windows updates , PowerShell tools, etc.

This can be achieved by mounting the boot.wim file which is located at the following location inside the WindowsPE working files directory, and then making changes to it:

Moreover, the .CAB files needed to install these optional components and languages are now available on your computer that were downloaded when you installed the “WindowsPE Add-on” for ADK earlier. There are available at the following path:

Note: “Amd64” can also be replaced with “arm64” if it fits your architecture.

Now follow these steps to make customizations to the WindowsPE:

Create a new directory using either File Explorer, an elevated Command Prompt , or the Deployment and Imaging Tools Environment CLI. Use the following cmdlet to create a new directory/folder using either CLIs:

Replace [PathToMountDirectory] with the complete path and folder name where you want to create the directory.

Create new directory to mount Boot wim

Now use the following cmdlet in either Command Prompt or Deployment and Imaging Tools Environment to mount the boot.wim file:

Replace PathToBootFile with the complete path to the boot.wim file (as discussed above) and PathToMountDirectory with the complete path to the newly-created directory in the last step above.

Mount Boot wim file

The boot.wim file will now be mounted successfully. It is now time to make changes to it as you need. To add the optional components or language packs, use this command:

Replace PathToMountDirectory where the boot.wim file is now mounted, and PathToCabFile with the complete path of the CAB file for the optional component you wish to install.

In this example, we have installed the French language pack.

Add language pack to WinPE

You can repeat this step to add more optional features.

When you have made the changes, it is then time to save the changes and unmount the wim file. To do so, run the following cmdlet:

Replace PathToMountDirectory where the boot.wim file is mounted.

Commit and dismount boot wim

You have now successfully made the optional changes to the Windows Preinstallation Environment which have been saved. It is now time to use the updated WindowsPE working files to make a bootable USB drive.

Create Bootable Windows Preinstallation Environment USB Flash Drive

Now, you must create a bootable USB drive using the WindowsPE working files. This is done using the MakeWinPEMEdia cmdlet, which has the following syntax:

The /UFD switch is used to specify a USB flash drive, whereas the /ISO switch identifies a .ISO file . You can only choose one. the /F switch is optional and used to suppress any confirmation messages.

Before we do this, we must first format the USB flash drive. Although the MakeWinPEMedia cmdlet automatically formats the drive, it often runs into errors when it is in the GPT format, and not in MBR. Therefore, we recommend that you preformat the USB flash drive in MBR format.

Follow these steps to format the USB flash drive to avoid running into errors, and then install the WindowsPE onto the USB:

Note: The following can be performed in either an elevated Command Prompt of the Deployment and Imaging Tools Environment.

Plug in the USB flash drive and then enter the drive management tool by running the following command:

Now run the following cmdlet to list down the details of the available disks:

Now select the USB disk (by matching its size) by entering its disk number instead of the hash symbol in this cmdlet:

Select disk to format

Now run the following cmdlets in the chronological order given to convert and format the USB drive:

Replace RandomName with any name for the volume and USBDriveLetter with the drive letter that you want to assign to the USB flash drive.

Convert disk to MBR and format

The USB flash drive is now formatted. It is now time to install the WindowsPE onto the USB.

Run the following cmdlet while replacing the necessary variables with the correct values to install the WindowsPE on the USB using the WinPE working files.

Replace [WorkingFilesDirectory] with the complete math of the WindowsPE working files, and [USBDriveLetter] with the drive letter that you assigned to the USB flash drive while formatting it.

Create bootable USB for WinPE

If you did not use the /F switch, then you will be asked to confirm the formatting of the USB drive. Enter Y .

This concludes the process of creating a Windows Preinstallation Environment successfully. Now, all that is left is to boot from it.

You can now boot into the WindowsPE by attaching it to the computer and then using the “One Time Boot Menu” to boot from the USB.

Boot from USB 1

Limitations of Windows Preinstallation Environment

As you would already know by now, WindowsPE is not an alternative to regular Windows installation. Not only does it lack many of the mainstream features, but it is also programmed to reboot automatically after 72 hours so that it cannot be used in production environments.

The rebooting duration cannot be changed, and all data is lost after it reboots, which means that you have to start over all the tasks.

Moreover, WindowsPE doesn’t support the following:

  • File server or Terminal Server use.
  • Joining a network domain.
  • Connecting to an IPv4 network from Windows PE on an IPv6 network.
  • Remote Desktop .
  • .MSI installation files.
  • Booting from a path that contains non-English characters.
  • Running 64-bit apps on the 32-bit version of WindowsPE.
  • Adding bundled app packages through DISM (.appxbundle packages).

Closing Thoughts

The method of creating Windows 11 or Windows 10 Preinstallation Environment is the same. However, if you wish to launch Windows Setup in WindowsPE for Windows 11, you must install the WinPE-WMI and WinPE-SecureSetup optional components , otherwise, you may encounter errors stating that you do not meet the minimum hardware requirements .

That said, having a USB flash drive ready with WinPE can be a blessing since you do not know when your system might crash. You can also use the same USB drive to store backups of your OS (using Backup and Restore ) alongside WinPE and then use those images to restore your working OS image.

Get Updates in Your Inbox

Sign up for the regular updates and be the first to know about the latest tech information

Email Address

  • Windows Environment Variables - The Ultimate Guide For All Windows Versions
  • How To Create Custom Environment Variables in Windows 10
  • How To Manage Environment Variables in Windows

winpe drive letter assignment

Leave the first comment (Cancel Reply)

Notify me of follow-up comments by email.

Notify me of new posts by email.

What Is Domain Based Message Authentication Reporting And Conformance (DMARC) Policy & Reporting

  • Remember me Not recommended on shared computers

Forgot your password?

  • AutoIt General Help and Support

USB drive letter assignment in Winpe

By Djinsanity , January 4, 2013 in AutoIt General Help and Support

Recommended Posts

Seeker

I have created a menu which will run in winpe from a USB device, to apply both imagex and Ghost images which are stored on the same device. The problem is the drive letter changes on different machines. I need to either force the usb to have a set letter or discover the drive letter and assign it to the path of the image. can anybody enlighten me on how this can be achieved? I have spent most of the day trying to find a solution.

Link to comment

Share on other sites.

Melba23

Djinsanity,

:)

Open spoiler to see my UDFs :

ArrayMultiColSort   ---- Sort arrays on multiple columns ChooseFileFolder ---- Single and multiple selections from specified path treeview listing Date_Time_Convert -- Easily convert date/time formats, including the language used ExtMsgBox --------- A highly customisable replacement for MsgBox GUIExtender -------- Extend and retract multiple sections within a GUI GUIFrame ---------- Subdivide GUIs into many adjustable frames GUIListViewEx ------ - Insert, delete, move, drag, sort, edit and colour ListView items GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView Marquee ----------- Scrolling tickertape GUIs NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes Notify ------------- Small notifications on the edge of the display Scrollbars ---------- Automatically sized scrollbars with a single command StringSize ---------- Automatically size controls to fit text Toast -------------- Small GUIs which pop out of the notification area

morrison0586

Without looking at your script I can only assume that you are trying to launch a GUI you created with AutoIT, and just need your WINPE install to call your executable. If this is correct try this out http://4sysops.com/archives/create-a-bootable-windows-pe-3-0-usb-drive-with-rescue-tools-part-2/

Will show you have to get startnet.cmd as part of your WINPE in the system32 folder. If you already have this then just edit the bat be as follows:

YourScript.exe

As long as your script is in the system32 folder there is no need to call f:yourscript.exe

Not sure if I am barking up the right tree but it sounds like a WINPE route that would be best not autoit.

If you got all that hashed out and you are just having a problem calling your wim or gho files then use the @ScriptDir&"yourimage.wim"

Hope that makes sense.

AZJIO

$a = DriveGetDrive ( 'ALL' ) $m = 'W:' If FileExists ( $m ) Then     MsgBox ( 0 , 'Message' , 'Drive ' & $m & ' already exists' )     Exit EndIf For $i = 1 To $a [ 0 ]     If FileExists ( $a [ $i ] & '\Label' ) Then         Run ( 'subst.exe ' & $m & ' ' & $a [ $i ] & '\' , @SystemDir , @SW_HIDE )         ExitLoop     EndIf Next If $i > $a [ 0 ] Then MsgBox ( 0 , 'Message' , 'Label not found' )

My other projects or all

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Already have an account? Sign in here.

Recently Browsing    0 members

  • No registered users viewing this page.
  • Existing user? Sign In
  • Forum Rules

AutoIt Resources

  • Create New...

How-to: Windows Recovery Environment (WinRE), Safe mode and Win PE.

A successor to the Windows Recovery Console, Windows Recovery Environment (WinRE) is a set of tools based on Windows Preinstallation Environment (Win PE). Windows PE utility ( Wpeutil ) is a command-line tool that enables you to run commands during a Windows PE session

Boot to Safe Mode

When dealing with a Blue Screen of Death or other critical errors - one option is to boot into Safe Mode . On the Windows sign-in screen, press and hold SHIFT while you select Power ➞ Restart. After the PC restarts to the Choose an option screen, Troubleshoot ➞ Advanced options ➞ Startup Settings ➞ Restart. You may be asked to enter your BitLocker recovery key. After your PC restarts, you'll see a list of options. Select 4 or F4 to start your PC in safe mode. Or if you'll need to use the Internet, select 5 or F5 for Safe Mode with Networking. From safe mode you can run a system restore with %systemroot%\system32\restore\rstrui.exe

Boot to Windows Recovery Environment (winRE).

To do this, you will repeatedly turn your device off, then on:
  • Hold down the power button for 10 seconds to turn off your device.
  • Press the power button again to turn on your device.
  • On the first sign that Windows has started (for example, some devices show the manufacturer’s logo when restarting) hold down the power button for 10 seconds to turn off your device.
  • When Windows restarts, hold down the power button for 10 seconds to turn off your device.
  • Allow your device to fully restart. You will enter winRE and have access to Bootrec .

Boot to Windows PE

WinPE most often runs from an external USB device like a memory stick. This can be used to disable services or replace system files until you are able to boot into safe mode. Connect the device. Turn on the PC, and use the boot menus to select the Windows PE drive. Typically this requires pressing a hardware button or a key, such as the Esc key. For UEFI-based PCs, you might need to find an option to manually select the UEFI boot files, for example, USBDrive01\EFI\BOOT\BOOTX64.EFI. Windows PE starts automatically. After the command window appears, the wpeinit command runs automatically. This might take a few minutes.

WinPE drive letter assignments change each time you boot

myscript.cmd @echo off For %%G in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do ( if exist %%G:\ myscript .cmd ( Echo WinPE is running on drive: %%G REM other commands ) )

Setup local account security questions on Windows 10

To Set or Reset your local account password or security questions on Windows 10: Settings ➞ Accounts ➞ Sign-in options ➞ Password ➞ Update your security questions.

How to sign in using security questions/answers

Attempt to Sign-in using an incorrect password. Click OK and click Reset Password. Type the correct answer to each of the security questions and press Enter. Type a new password and press Enter.

Create a new Admin account and password.

On machines with Windows Defender, this procedure may not work, see here for an alternative using SAFE mode and RoboCopy.
  • Boot from a Windows 10 bootable DVD or USB . (Alternatively boot into into Windows PE if setup.)
  • If the computer does not have BitLocker, when WINDOWS SETUP appears, press SHIFT+F10 to launch a CMD window. If the computer has BitLocker, start the SETUP and choose REPAIR, it will ask you for the BitLocker recovery key and then let you open a command prompt.
  • Type: REN d:\windows\system32\utilman.exe utilman.exe.bak and press the ENTER key.
  • Type: COPY d:\windows\system32\cmd.exe d:\windows\system32\utilman.exe and press the ENTER key.
  • Exit the Windows 10 setup (power down) and Boot normally to your hard drive.
  • At the Login Screen click the EASE OF ACCESS icon (beside the Power icon in the bottom right corner of the screen). Because of step 4, this will launch a CMD window.
  • Type NET user ss64 password1 /add and press the ENTER key
  • Type NET localgroup administrators ss64 /add and press the ENTER key. Press ALT+F4 to close the CMD prompt. This creates a local administrator named ss64.
  • Type wpeutil reboot to reboot the machine (alternatively click the Power icon (bottom right) and select RESTART.
  • Sign in as ss64 with the password password1 .
  • If you are on a domain use the username .\ss64.
  • Once logged in, replace the original file type: REN d:\windows\system32\utilman.exe.bak utilman.exe and press the ENTER key.

“When a deep injury is done us, we never recover until we forgive” ~ Alan Paton

Related commands

Q12415 - Recovery options in Windows 10. BCDBOOT - Create or repair a system partition. BCDEDIT - Manage Boot Configuration Data. BOOTREC - Repair or replace a partition boot sector (WinRE). SYSPREP - (Generalize) a Windows installation. WPEUTIL - Run commands during a Windows Preinstallation Environment (WinPE) Recovery /Reset options in Windows - Microsoft support. WinPE Intro - Microsoft help page. Windows Recovery - Create a new Admin user. List of Windows Services

MSFN

  • Remember me Not recommended on shared computers

Forgot your password?

drive letter assignment & unattended install & diskpart

darksimoon

By darksimoon November 24, 2008 in Windows PE

Recommended Posts

:)

i want to install xp unattended by winpe2.0 from usb flash disk. i put the setup files in WXP86 folder which resides at the

1) after booting to winpe, i go to wxp86 folder and call autorun1.cmd manually. how can i make it automatic or is there any shorter way doing so than manually and with my interfere that is with "install" or "dont install" option ?

2) below is my autorun1.cmd, partinfo.txt but unfortunately i get the error as in the picture. (saying that "the drive you

specified (C:) is too small to hold the required the temporary setup files...")

autorun1.cmd

-------------

DISKPART /s partinfo.txt

SET CDROM=%~d0

%CDROM%\WXP86\i386\winnt32.exe /syspart:c: /tempdrive:C /unattend:"%CDROM%\WXP86\i386\winnt.sif" /makelocalsource

--------------

partinfo.txt

------------

:(

but what i need is a batch file /partinfo.txt that selects my UFD and assign letter U; then select the first partition at disk 0 (HDD)format it assign letter C active for system installation. so that the installation gets realized on HDD/C partition and i dont get the above error.

better option would be a batch file that checks the HDD if there are any partition if so let the above begin. if not let it create a partition C (lets say 30GB) for system install and partition D for data.

post-58042-1227526597_thumb.png

Link to comment

Share on other sites.

jaclaz

http://www.msfn.org/board/index.php?showtopic=126142&hl=

You meed a migrate.inf file to pre-assign drive letters.

http://www.msfn.org/board/install-usb-driv...OS-t122505.html

http://www.911cd.net/forums//index.php?showtopic=19663

http://www.911cd.net/forums//index.php?showtopic=21682

http://www.msfn.org/board/index.php?showtopic=125945

:unsure:

so let me ask like this. Can i assign UFD letter as "U" by diskpart commands ? if yes even this part of the answer is great favour for me. if not i will search for alternate solutions as in your answer (migrate.inf)
you catched me while doing laziness but this time at least i know where to start and i'm on my way. jaclaz you give me some links and they lead to other links then i find myself lost In real life my ocupation is banking. computing is a hoppy but i am found of it.

If you boot the PE from the UFD, it would be easier to use the MOUNTVOL command, there are a couple of threads about ways to identify drives through batch or .vbs:

http://www.msfn.org/board/index.php?showtopic=124539&hl=

http://www.msfn.org/board/index.php?showtopic=125992&hl=

http://www.msfn.org/board/index.php?showtopic=126069&hl=

i have heard of someting like bootsect.exe. can't we use it for giving a fixed drive letter to usb when booting ? for example when making usb bootable for winpe we use diskpart command and make the usb disk active. then can we use bootsect /nt52 U command to give the U letter to usb disk ?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Already have an account? Sign in here.

Recently Browsing    0 members

  • No registered users viewing this page.
  • Existing user? Sign In
  • Unread Content
  • Content I Started
  • My Activity Streams
  • All Activity
  • Leaderboard
  • Create New...

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

WinPE: Store or split images to deploy Windows using a single USB drive

  • 7 contributors

If your PC only has one USB port, you can still deploy Windows

The default Windows Preinstallation Environment (WinPE) drive format, FAT32, is used to boot UEFI-based PCs. FAT32 has limitations that you'll have to work around when working with most Windows images:

FAT32 has a maximum file size of 4GB in size. Most customized Windows images are over 4GB.

FAT32 has a maximum partition size of 32GB. Some Windows images are larger than 32GB.

(You can still use a 64GB or 128GB USB key, but you have to format it to use only uses 32GB of its space.)

Below are several ways to work around these limitations.

Option 1: Create a multiple partition USB drive

You can create multiple partitions on USB drives. To work with a USB drive with multiple partitions, both your technician PC and WinPE have to be Windows 10, Version 1703, or later.

Create a USB drive with WinPE and data partitions

These steps require you to have the Windows Assessment and Deployment kit and WinPE add-on installed on your PC.

Open a Command prompt as administrator.

Run Diskpart:

Use Diskpart to reformat the drive and create two new partitions for WinPE and for your images:

Copy the WinPE files to the WinPE partition:

Copy your Windows image file to the Images partition:

Option 2: Store the image on a separate USB drive

If your PC only has one USB port, you can deploy Windows using two separate USB keys:

Boot to WinPE.

  • After WinPE has fully booted, remove the WinPE USB drive.
  • Plug in a separate storage drive with your image and apply it to the device .

Option 3: Apply an image that's stored on a network location

Copy the image to a server on your network, for example, \\server\share\install.wim

Connect a network drive using a drive letter, for example, N.

Apply the image from the network.

Option 4: Split the image

You can split a .wim file into smaller files that will be combined when you apply your image to a device.

Limitations:

  • Applying split image (.swm) files is only supported when all of the .swm files are in the same folder, as shown in these steps.
  • You can't modify a split .wim file.
  • When using a FAT-32 drive, you can format it to only use 32GB of space.
  • For images larger than 32GB, you need a second USB key because of the FAT32 partition size limitation.

From your technician PC, create your WinPE key. See WinPE: Create USB Bootable drive .

Open a Command prompt as adminstrator.

Split the Windows image into files smaller than 4GB each:

  • C:\images\install.wim is the name and the location of the image file that you want to split.
  • C:\images\split\install.swm is the destination name and the location for the split .wim files.
  • 4000 is the maximum size in MB for each of the split .wim files to be created.

In this example, the /split option creates an install.swm file, an install2.swm file, an install3.swm file, and so on, in the C:\Images directory.

Copy the files to the WinPE key.

On the destination PC, boot to WinPE, and then apply the image using DISM /Apply-Image with /ImageFile and /SWMFile options, as shown:

Related topics

WinPE: Identify drive letters with a script

Split a Windows image file (.wim) for FAT32 media or to span across multiple DVDs

DISM Image Management Command-Line Options

Additional resources

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

How to put Win PE on a USB Thumb drive?

How can I make a USB Thumb drive (32gb) into a bootable Win PE?

  • usb-flash-drive

Yair's user avatar

4 Answers 4

Check out this tutorial for WinPE 3.0 (Windows 7):

Create a bootable USB drive Before you get started, you have to make your flash drive bootable. I have already described this procedure in my post about the Windows 7 USB/DVD Download Tool. For your convenience here is the command sequence, which you should run on a command prompt with admin rights: diskpart list disk select disk # clean create partition primary select partition 1 active format quick fs=fat32 assign exit Replace ‘#’ with the drive number of your USB drive. Be careful to choose the right disk in 3 because this procedure will erase the whole drive! 2. Copy the WinPE 3.0 files to the USB drive WinPE 3.0 is part of the Windows Automated Installation Kit (WAIK) for Windows 7, which you can download here. Once you have installed the WAIK, you’ll find a folder of the Windows AIK on the Windows Start Menu. Launch the Deployment Tools Command Prompt and enter this command: copype.cmd x86 c:\winpe_x86 Then, copy winpe.wim to the correct folder: copy c:\winpe_x86\winpe.wim c:\winpe_x86\ISO\sources\boot.wim Now, copy WinPE to your USB drive: xcopy C:\winpe_x86\iso\*.* /e G:\ In this example, ‘G:’ is the drive letter of your flash drive. Now you should be able to boot from your WinPE 3.0 USB drive. In my next post, I will outline the interesting part—that is, how to prepare your USB drive so that you can add new tools without starting again from scratch.

In another article, he shows how to add tools to the drive, and he also has a list of WinPE compatible tools.

http://4sysops.com/archives/build-a-bootable-windows-pe-3-0-usb-drive-with-rescue-tools-part-1/

For WinPE 4.0 (Windows 8), see this tutorial.

ChrisN's user avatar

  • I'm using windows 8, is that a problem, is it this same instructions? –  Yair Jan 7, 2013 at 2:01
  • I'm stuck at this point: >>Launch the Deployment Tools Command Prompt and enter this command: I am using windows 8. I don't know what is the name of this program to run. ?? –  Yair Jan 7, 2013 at 4:34
  • I updated my answer for Windows 8 also. –  ChrisN Jan 7, 2013 at 22:14
  • ChrisN, I don't understand what you mean. What I am saying is that I follow your instructions. But at the point where you say "Once you have installed the WAIK, you’ll find a folder of the Windows AIK on the Windows Start Menu. Launch the Deployment Tools Command Prompt and enter this command:" I don't know what do here. Of course using win8 there is not Start Menu. But when I go into the folders where it is installed i don't see anything that is Development Tools app. –  Yair Jan 8, 2013 at 16:54
  • I just Googled "build windows pe 4.0 flash drive" and that was the first tutorial that popped up... –  ChrisN Jan 8, 2013 at 21:38

As I struggled with the same problem, how to make a winpe 4.0 on windows 8 with the ADK (assessment and deployment kit) - this works on windows 7 also - and put it on a usb-stick, here is the answer : http://gverswijvel.wordpress.com/ Read from the beginning, as the preparation is : how to open the command prompt as administrator. Then you read this section : "Manually making the winpe 4.0 step by step with commands in command prompt"

You will need commands 1* till 10* (or 10A* if you want to make a bootable winpe on usb with the command "makewinpemedia......")

I hope this helps you.

user194351's user avatar

If you have the ISO file, then using windows 7 usb/dvd download tool ( https://wudt.codeplex.com/ ) will be a lot easier. This tool will handle the file copying, so you don't have to meddle with command lines (except the following line).

As this tool formats the USB thumb drive in NTFS, one extra step might be needed:

“X:” is the drive letter of your USB stick.

Reference: https://4sysops.com/archives/windows-7-usbdvd-download-tool-wudt-is-unable-to-copy-files/

Shaohua Li's user avatar

First Download:

  • Bootable USB-Drive Utility
  • WinUSB_FULL Patche r
  • Extract Bootable USB-Drive
  • Open Config_SourcePath.cmd
  • REM set SourcePath=”..\BartPE”
  • set SourceCD=G: where G: the cd-rom drive is with the BartPE CD
  • Start BOOTABLE_USB-DRIVE.cmd
  • Format and create the USB drive
  • Close the utillity en extract de WinUSB_FULL Patcher
  • the patcher on the USB drive (root)

Source: http://blog.wapnet.nl/2011/11/create-a-bartpe-bootable-usb-stick/

JamesBarnett's user avatar

  • That's for BartPE, not WinPE. –  ChrisN Jan 7, 2013 at 2:06
  • WinUSB_FULL Patcher link is not working –  Yair Jan 7, 2013 at 2:15

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged usb-flash-drive winpe ..

  • The Overflow Blog
  • Developers with AI assistants need to follow the pair programming model
  • How do mixture-of-experts layers affect transformer models?
  • Featured on Meta
  • New Focus Styles & Updated Styling for Button Groups
  • Upcoming initiatives on Stack Overflow and across the Stack Exchange network
  • Google Cloud will be Sponsoring Super User SE

Hot Network Questions

  • AIC model selection is keeping a variable with p = 0.47
  • Where can I find hardware details for the Philips VG-5000?
  • Is multiplication of two complex numbers that are inside a complex regular polygon still in this polygon?
  • PCB Edge connector: nipples on each finger?
  • Tire tube is preventing tire from sitting properly
  • Winning chance in coins game with fixing
  • Staying out of the blind spot of a truck that doesn't have mirrors?
  • Dual Criminality for weapons?
  • How could I speed up this tensor product?
  • init.lua - Remove default mapping recursively
  • In "Silent Enemy", why didn't they just drop Echo Three?
  • What would be the criteria for comparing basis set?
  • Advice on Picking Grad School with Goal of Getting Academic Job at Small College
  • Why doesn't "selecting similar faces by area" work in my case?
  • On American Jury Duty and Doctors' Letters to the Contrary
  • How to rotate an electron mathematically?
  • Odds for second smallest prime factor
  • Does it matters who your thesis examiner is?
  • Embossed date markings on old Kodachrome slide frame
  • LARP weapons - plastidip wrinkles
  • Serious device for making hummus at home
  • How can tiny MOSFETs be rated for relatively high current?
  • Will it be possible to prevent cancer by introducing ECC on genome?
  • Can Neutron Star merger remnants solve the black hole mass gap? Why can't we observe them?

winpe drive letter assignment

IMAGES

  1. How to change/assign a drive letter in Windows 10

    winpe drive letter assignment

  2. Steps to Change Drive Letter Assignment in Windows

    winpe drive letter assignment

  3. Winpe to os drive letter assignment

    winpe drive letter assignment

  4. 3 Simple Ways to Assign a Drive Letter in Windows 10/8/7

    winpe drive letter assignment

  5. How to assign permanent letters to drives in Windows

    winpe drive letter assignment

  6. How to assign permanent letters to drives on Windows 10

    winpe drive letter assignment

VIDEO

  1. Letter Sounds Assignment

  2. Why is Windows in the C:/ Drive?

  3. English 495 review of research letter assignment

  4. Si fudud ku samey

  5. Adding a drive letter

  6. border assignment #assingment #letter #pencildrawing #satisfyingvideo #easydrawing #satisfying

COMMENTS

  1. WinPE: Identify drive letters with a script

    In this article. WinPE drive letter assignments change each time you boot, and can change depending on which hardware is detected. You can use a script to figure out which drive letter is which by searching for a file or folder.

  2. WinPE 5

    diskpart. select disk 0. select partition 1. assign letter=S. exit. keep in mind, I'm not sure how your disk and partition numbers will appear. You will need to find that out to put in your script. And "S" ofcourse can be any letter you choose. EDIT: If not within startnet.cmd, then possibly a separate script and just add it as a [launchapp ...

  3. How to change BCD internal drive letter assignment

    1. The easiest way would be to open a command prompt, either in Automatic Repair, or in WinPE. Assign drive letters to the System partition (e.g. D:) and to the OS/Windows partition assign the letter (C:). Then used BOOTREC to rebuild the BCD store. then. Reboot the system and hopefully it should start. Thank you very very much, the above ...

  4. How can I detect the drive letter of a booted USB drive from script?

    If you are not booting Windows Deployment Services, the best way to determine where Windows PE booted from is to first check for PEBootRamdiskSourceDrive registry key. If it is not present, scan the drives of the correct PEBootType and look for some kind of tag file that identifies the boot drive.

  5. Batch to reassign drive letter based on volume name

    I have a "WINPE" volume and I am trying to get a batch script that will assign it drive letter "Z:" Someone gave me the script below but it does not work for /f %%D in ('wmic volume get ... I am trying to run a script from within a bootable WINPE drive I mounted the boot.wim and made a bat with for /f %%D in ('wmic volume get DriveLetter ...

  6. Drive letters assigned to restored or cloned partitions

    Note: When restoring using the Windows PE rescue media, the letters assigned to restored partitions are temporary for that Windows PE session only. When you boot into the restored system, drive letter assignments will be exactly the same as they were when the image was created.

  7. Ultimate Guide To Creating Windows Preinstallation Environment (WinPE)

    Select " Install the Windows Assessment and Deployment Kit Windows Preinstallation Environment Add-ons to this computer " and click Next. Now select your privacy preference and click Next. Accept the license agreement. Now select the " Windows Preinstallation Environment (Windows PE) " feature and click Install.

  8. USB drive letter assignment in Winpe

    I have created a menu which will run in winpe from a USB device, to apply both imagex and Ghost images which are stored on the same device. The problem is the drive letter changes on different machines. I need to either force the usb to have a set letter or discover the drive letter and assign it...

  9. Windows PE Permanent Drive Letter or Environment Variable?

    When you have the USB in the computer, go to Computer Management\Disk Management and right-click on the drive that contains the USB. Change the drive letter and that USB should always go to the drive letter you chose. #EDIT #. This is in Windows 7. I do no know the Windows PE equivalent.

  10. Recovery Recovery Environment, Safe mode and Win PE

    Turn on the PC, and use the boot menus to select the Windows PE drive. Typically this requires pressing a hardware button or a key, such as the Esc key. For UEFI-based PCs, you might need to find an option to manually select the UEFI boot files, for example, USBDrive01\EFI\BOOT\BOOTX64.EFI. ... WinPE drive letter assignments change each time ...

  11. drive letter assignment & unattended install & diskpart

    hello friends i want to install xp unattended by winpe2.0 from usb flash disk. i put the setup files in WXP86 folder which resides at the root of UFD. there are the happenings and my demand for help 1) after booting to winpe, i go to wxp86 folder and call autorun1.cmd manually. how can i make it ...

  12. WinPE: Store or split images to deploy Windows using a single USB drive

    Option 1: Create a multiple partition USB drive. Option 2: Store the image on a separate USB drive. Option 3: Apply an image that's stored on a network location. Option 4: Split the image. Related topics. If your PC only has one USB port, you can still deploy Windows. The default Windows Preinstallation Environment (WinPE) drive format, FAT32 ...

  13. winpe

    Replace '#' with the drive number of your USB drive. Be careful to choose the right disk in 3 because this procedure will erase the whole drive! 2. Copy the WinPE 3.0 files to the USB drive. WinPE 3.0 is part of the Windows Automated Installation Kit (WAIK) for Windows 7, which you can download here.

  14. Manually assigning a drive letter using CMD/Diskpart

    Procedure. Open up a command prompt (CMD/PowerShell). Type "diskpart" to start up diskpart. You will see the prompt change to "DISKPART>". Type "list vol" to list all available volumes. You can identify the drive by size and file system. Additionally, the volume doesn't currently have a drive letter. Select the volume using "sel vol <number>".

  15. WinPE to OS

    Greetings, I have two scenarios that appear to be similar but operate radically differently when it comes to drive letter assignment after the OS has installed. Scenario 1 - Rebuild existing laptop Our Laptops have the following configuration - 1 x cd/dvd, 1 physical disk with three partitions ... · After exhaustive testing, it appears that WinPE and ...

  16. Changing drive letters when I switch between operating system and winpe

    Hi, I need to have 2 primary partition on my hard disk and 3 logical partitions. I will create the partition using diskpart and assign primary partition 1 as drive letter H: and primary partition 2 as drive letter C: I will boot from my USB/DVD and deploy a customized winpe image on my first ... · Hi Saifan, I had the same problem. Simply, Win7 boot is ...

  17. Odd -- WinPE volume letters are different : r/SCCM

    A full Windows client OS is conditioned not to automatically assign a drive letter to system partitions such as the recovery partition, system reserved partition and efi system partition. This is to prevent unknowing users from messing with them. WinPE just assigns driveletters to whatever drives it sees in series.