Monday, January 26, 2015

Creating Window RE Using Windows AIK

Create Windows RE using the Windows Automated Installation Kit (AIK).

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.
  1. 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.
  2. Create a directory for the Windows PE image and a mount point
            mkdir c:\winre_image
            mkdir c:\winre_mount
  1. 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”
  1. 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.
  1. By using a text editor, create a file called winpeshl.ini that contains the following text:
    [LaunchApp]
    AppPath=x:\sources\recovery\recenv.exe
  1. 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= C:\winre_x86\mount\Windows
        Where  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


The WinRE.wim file is now ready to be deployed on the harddisk or a WDS server. 

No comments:

Post a Comment