Windows PE

Booting Windows PE Using Windows 7 AIK: A Step-by-Step Guide



šŸ› ļø Working with Windows PE: Troubleshooting Windows Offline

There are times when you need to troubleshoot or service a Windows operating system without booting into it. Certain maintenance or recovery tasks can only be performed while the system drive is offline—not in active use. If you’ve ever worked with Linux boot discs, you’ll find Windows PE (Preinstallation Environment) to be a familiar and powerful tool.

Windows PE is a lightweight version of Windows that boots from a CD/DVD or USB drive. By default, it loads into a simple Command Prompt interface šŸ–„ļø. This is where knowing your way around command-line tools really pays off.

With Windows PE, you can:

  • šŸ”§ Prepare and partition hard drives
  • šŸ“ Access and recover files
  • 🧹 Run repair tools like chkdsk (Check Disk) and sfc (System File Checker)
  • šŸ“¦ Capture and deploy Windows images
  • šŸ¤– Automate tasks using custom scripts

Many Microsoft troubleshooting guides reference Windows PE, so having a bootable version ready can be a real lifesaver in emergencies šŸš‘.

šŸ’¾ Getting Windows PE 3.0: Downloading and Setting Up Windows 7 AIK

To work with Windows PE 3.0 (based on Windows 7 SP0), you’ll need to download and install the Windows Automated Installation Kit (AIK) for Windows 7. šŸ› ļø

šŸ’” Note: Windows PE comes in various versions. If you want a newer version—like one based on Windows 8.1 Update 1—you’ll need the appropriate ADK (Assessment and Deployment Kit). For example, download the Windows ADK for Windows 8.1 Update package to get that version.

šŸ“„ Downloading the Files

Head to the links at the bottom of the page to download the files. You’ll get an ISO file named:
šŸ“€ KB3AIK_EN.iso (approx. 1.7 GB)

šŸ’» Mounting the ISO

Depending on your OS:

  • Windows 8.1 / Windows 10 / Windows 11:
    Right-click the ISO file and select ā€œMountā€. This will open it like a virtual disc—no extra software needed! āœ…
  • Windows 7:
    You’ll need third-party software to mount ISO files. I recommend using:
    šŸ”§ ImDisk Virtual Disk Driver — a lightweight, reliable tool for the job.

šŸš€ Installing Windows AIK

Once the ISO is mounted and you can see the contents:

  1. Open StartCD.exe
  2. In the launcher, click “Windows AIK Setup” on the left panel
  3. Follow the prompts to install the Windows 7 AIK

You’re now ready to start building your Windows PE 3.0 environment! šŸ—ļø


šŸ“š Accessing the Windows PE Documentation

Now that you’ve installed Windows 7 AIK, it’s time to dive into the documentation and learn how to build your Windows PE environment. šŸ› ļø

🧭 Where to Find the Guide

You can access the Windows PE User’s Guide in two ways:

šŸŒ€ Option 1: From the Start Menu

  1. Open the Start Menu
  2. Navigate to:
    āž¤ Microsoft Windows AIK
    āž¤ Select Windows PE User’s Guide

šŸ“ Option 2: From File Explorer

  1. Open File Explorer
  2. Go to: C:\Program Files\Windows AIK\Docs\CHMs
  3. Open the file: WinPE.chm

šŸ“– What to Read First

Once the guide is open:

  1. Expand:
    šŸ“‚ Windows Preinstallation Environment (Windows PE) User’s Guide
  2. Select:
    šŸ”§ Windows PE Build Environment
  3. Scroll to the section titled:
    āž¤ ā€œTo build a Windows PE Build Environmentā€

This section explains how to prepare the source files for building your custom Windows PE image. It’s a great starting point.

šŸ’” Pro Tip: Explore the rest of the documentation while you’re at it! The guide includes plenty of useful information on customization, scripting, image capture, and deployment.

šŸ“ Obtaining Windows PE Source Files with copype.cmd

Once the Windows 7 AIK is installed, the next step is to generate the source files for your Windows PE build. We’ll use the copype.cmd script to do this. 🧱

šŸ”“ Step 1: Open an Elevated Command Prompt

Make sure to open Command Prompt as Administrator. This is required to run the script successfully.

šŸ“‚ Step 2: Navigate to the PETools Directory

Run the following command to navigate to the folder containing the copype.cmd script:

BAT (Batchfile)
cd C:\Program Files\Windows AIK\Tools\PETools

šŸ›‘ Make sure to include the quotes if your folder path contains spaces.

šŸ—ļø Step 3: Run copype.cmd

Now you’ll generate the source files by specifying:

  1. The architecture (x86, amd64, or ia64)
  2. The destination folder where files should be placed

Example for creating a 32-bit (x86) build in C:\TEMP\winpe_x86:

BAT (Batchfile)
copype.cmd x86 C:\TEMP\winpe_x86

šŸ“ This command will create the winpe_x86 directory (if it doesn’t exist) and populate it with the essential files needed for a Windows PE environment.

šŸ” Step 4: Inspect the Output

Navigate to the output folder:

BAT (Batchfile)
cd C:\TEMP\winpe_x86

You’ll see a basic folder structure, but there’s a critical piece missing: the boot image.

šŸ“¦ What’s Missing? The boot.wim File

Although copype.cmd gives us most of what we need, it doesn’t automatically place the boot.wim file into the ISO\sources folder.

Here’s what you need to know:

  • Inside the output folder, under winpe_x86\ISO\sources, you’ll notice there’s no boot.wim yet.
  • However, in the parent folder, you’ll find a file named:
Plaintext
winpe.wim

āœ… This is your boot.wim! Simply:

  1. Copy and rename winpe.wim to boot.wim
  2. Place it into: C:\TEMP\winpe_x86\ISO\sources\

šŸ–¼ļø Why this extra step? The idea is that you may customize the image—by injecting drivers, tools, scripts, or even changing the Windows PE background—before it’s finalized as a bootable image.


šŸŽØ Customizing Windows PE

If you prefer a graphical method for modifying your Windows PE image, you can use 7-Zip—a powerful, free compression tool—to open and edit .wim files directly. 🧩

šŸ”§ Modifying the Background Image

  1. Open winpe.wim with 7-Zip
    Navigate to the winpe_x86 folder and right-click on winpe.wim. Choose Open with → 7-Zip File Manager.
  2. Navigate to the BMP File
    Inside 7-Zip, go to: Windows\System32\winpe.bmp
  3. Replace the Background Image
    • Delete the existing winpe.bmp
    • Drag and drop your own custom image into the same location
    • šŸ–¼ļø Make sure your image has the same name (winpe.bmp) and is in .bmp format

šŸŽØ This image will be used as the boot-time background when Windows PE loads into RAM.


šŸ“¦ Finalizing the Modified Image

Once you’re done customizing the contents of winpe.wim:

  1. Copy and Rename the File
    Move your updated winpe.wim to the ISO\sources folder and rename it to boot.wim:
Plaintext
From:  C:\TEMP\winpe_x86\winpe.wim  
To:    C:\TEMP\winpe_x86\ISO\sources\boot.wim

āœ… Your customized Windows PE image is now ready to be packaged into a bootable ISO!

šŸ’æ Generate a Bootable Windows PE ISO with Oscdimg.exe

You don’t need third-party software like ImgBurn to create a bootable ISO—Windows 7 AIK includes a built-in command-line utility called Oscdimg.exe that does the job perfectly. āš™ļø


šŸ“ Where to Find Oscdimg.exe

Oscdimg.exe is located in the AIK Tools directory under architecture-specific folders:

C:\Program Files\Windows AIK\Tools\x86\
C:\Program Files\Windows AIK\Tools\amd64\
C:\Program Files\Windows AIK\Tools\ia64\

šŸ’” Use the version that matches the architecture of your PE build (e.g., x86 for a 32-bit build).


🧾 Example Command to Create the ISO

Open Command Prompt as Administrator, navigate to the appropriate folder, and run:

BAT (Batchfile)
Oscdimg.exe -bC:\TEMP\winpe_x86\ISO\boot\etfsboot.com -p00 -u1 -udfver102 C:\TEMP\winpe_x86\ISO C:\TEMP\winpe_x86.iso

šŸ” Command Breakdown

Let’s break down what each part of the command does:

OptionPurpose
-b<path>Specifies the boot sector file. For BIOS, use etfsboot.com.
-p00Sets the platform ID to BIOS (00). Use EF for UEFI systems.
-u1Uses UDF file system format (Unicode support, long filenames).
-udfver102Sets UDF version to 1.02, ensuring compatibility.
C:\TEMP\winpe_x86\ISOThe folder containing all files to be packaged into the ISO.
C:\TEMP\winpe_x86.isoThe output ISO file that will be created.

ā— UEFI Note

UEFI boot requires:

  • Platform ID: EF
  • Boot file: efisys.bin

However, Windows PE based on Windows 7 x86 does not support UEFI, so:

  • You won’t find efisys.bin in your x86 AIK folder
  • Stick with BIOS mode using etfsboot.com

āœ… Once the command completes, your bootable ISO will be ready at:


āœ… Conclusion

With the steps we’ve covered—installing Windows AIK, generating and customizing your Windows PE environment, and creating a bootable ISO—you now have a powerful tool at your disposal for offline Windows troubleshooting, imaging, and recovery. Whether you’re adding scripts, drivers, or simply changing the background, Windows PE can be tailored to fit almost any technical workflow.

🌿 Final Thoughts

Mastering Windows PE is like unlocking a hidden Swiss Army knife for Windows systems. It’s lightweight, flexible, and immensely useful—especially when you need full control outside the confines of a live operating system. Once you’re comfortable with it, you’ll wonder how you ever managed without it.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

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