Creating Window RE Using Windows AIK
We have been getting many questions on how to create Windows RE using the Windows Automated Installation Kit (AIK). So I thought I would publish the updated instructions here. The instructions listed below are accurate as of Windows Vista RTM.
These instructions are also included in the Windows AIK. Please note that the ReadMe file that accompanies the Windows AIK contains an important update to the instructions.
Note: If you install Windows RE using the Windows OPK, please continue to follow the instructions in the Windows OPK. Those instructions remain unchanged. Use these instructions only if you do not have access to the Windows OPK.
Step 1: Copy Windows PE from the Installation Media
The version of Windows PE that ships with the Windows AIK does not contain the components required to support Windows RE. However every Windows installation disk contains Windows RE that can be used for recovery of Windows Vista. Therefore, we will use the Windows RE from the Windows installation media.
- On your technician computer, click Start, point to All Programs, then Windows AIK, and then click Windows PE Tools Command Prompt.
The menu shortcut opens a command prompt window and automatically sets environment variables to point to all the necessary tools.
- Create a directory for the Windows PE image and a mount point
- Copy the Windows PE image from the installation media using ImageX
imagex.exe /export /boot e:\sources\boot.wim 2 c:\winre_image\winre.wim “Windows Recovery Environment”
- Mount the image using ImageX
imagex /mountrw c:\winre_image\winre.wim 1 c:\winre_mount
Step 2: Add Windows RE shell script
The Windows PE we copied in step 1, does not launch Windows RE automatically. In this step, we will create a script called winpeshl.ini that will launch the Windows RE shell at startup.
- By using a text editor, create a file called winpeshl.ini that contains the following text:
- Copy this file to \Windows\System32 directory in your mounted Windows RE directory. For example,
copy winpeshl.ini c:\winre_mount\Windows\System32
Step 3: Add mass-storage drivers (optional)
If necessary, you can include third-party drivers (.inf) in your Windows RE image by using the peimg.exe /inf command. For example,
peimg.exe /inf= <path> C:\winre_x86\mount\Windows
Where <path> is the location of the. inf file.
Step 4: Add custom tools to Windows RE (optional)
You can customize Windows RE shell by creating an .xml file called WinREConfig.xml. WinREConfig.xml enables you to define custom support and diagnostic tools within Windows RE. This step is optional. For more information, refer to the Windows RE documentation in the Windows AIK.
Step 5: Save changes to the image
Unmount the image by using ImageX. For example,
imagex.exe /unmount /commit c:\winre_mount
That's it! The WinRE.wim file is now ready to be deployed on the harddisk or a WDS server. Let us know if these updated instructions do not work for you.