Building WinPE with Windows 7 AIK

I was having problems getting the new AIK for Win7 working,
there were a few bugs to work around, so I have documented my process here, with
all my notes.

To create a WinPE CD for Windows 7 follow these
directions. This is for an x86 version.

Start by creating a place to store some scripts and config files called c:\WinPE-tools

mkdir c:\WinPE-tools

Copy and paste this into a file called c:\WinPE-tools\startnet.cmd

@Echo OFF

wpeutil InitializeNetwork

ping localhost

net use z: <server share> <password> /user:<domain\user-id>




Copy and paste this into a file called c:\WinPE-tools\wimscript.ini





"System Volume Information"








Now, let's create your WinPE image:

Open the Deployment Tools Command Prompt.

copype.cmd x86 c:\winpe_x86

You should be at c:\winpe_x86 when it completes.

Mount the image.

DISM.exe /Mount-Wim /WimFile:C:\winpe_x86\winpe.wim
/index:1 /MountDir:C:\winpe_x86\mount

Copy the winpe.wim to the iso source as boot.wim

copy C:\winpe_x86\winpe.wim C:\winpe_x86\iso\sources\boot.wim

If you want to add additional packages, they are located at: c:\program
files\windows aik\PE Tools\x86\WinPE_OCs\ the .cab files are locted here.

Make sure all the package paths are lowercase! The "c:\" and file names must be
lowercase! (This is an RTM DISM AIK bug)

For example, to use an HTA GUI frontend you will need to add the hta packages:

Dism /image:C:\winpe_x86\mount
/Add-Package /PackagePath:"c:\Program Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\"

Dism /image:C:\winpe_x86\mount /Add-Package /PackagePath:"c:\Program
Files\Windows AIK\Tools\PETools\x86\WinPE_FPs\en-us\”

To verify installation of packages, you can type:

dism /image:c:\winpe x86\mount\ /get-packages

OK, while the image is mounted, you will want to include imageX.

Copying it to system32 will allow you to run imagex without having to navigate
to it.

So copy imageX.exe and your files you made to the Windows\system32 directory of
your mounted image:

copy "c:\program files\windows aik\tools\x86\imagex.exe"

copy "c:\WinPE-tools\wimscript.ini" c:\winpe_x86\mount\windows\system32

copy "c:\WinPE-tools\startnet.cmd" c:\winpe_x86\mount\windows\system32 /Y

copy "c:\WinPE-tools\startnet.cmd" C:\winpe_x86\mount\Windows\winsxs\x86_microsoft-windows-winpe_tools_31bf3856ad364e35_6.1.7600.16385_none_fad5f90498336010

Now it's time to unmount WinPE.

dism.exe /unmount-wim /mountdir:c:\winpe_x86\mount

If you made mistakes, use this:

dism.exe /unmount-wim /mountdir:c:\winpe_x86\mount

If you want to create a bootable .iso CD:

oscdimg -n -bc:\winpe_x86\ c:\winpe_x86\iso

Exit Deployment Tools Command Prompt and burn your .iso to CD


If you are capturing Windows 7 you want to capture d: not c: (From WinPE the c:\
is a reserved system folder)


WS2000 said…
Thanks for the advice, its helped me a lot today.

Popular posts from this blog

Add your Office 2016 KMS Keys to your Volume Activation Server

Solving WinRM Host connection errors in SCVMM - System Center Virtual Machine Manager 2012 R2

How to setup Google Authenticator 2FA with a Watchguard SSL VPN Client for FREE!