Windows 7 Deployment Create WinPE Using WAIK for Windows 7
Parent Category: 7
Category: Deployment
Before you startObjectives: learn how to create WinPE CD which includes ImageX, by using WAIK for Windows 7, so you can capture and deploy Windows 7 images.
Prerequisites: you have to have WAIK tools installed on your system. You also have to know how to mount and unmount images using ImageX.
Key terms: image, winpe, iso, imagex, mount, deployment, cmd, oscdimg
Run Deployment Tools CMDAs you already know, we have to have WAIK installed on our system. WAIK contains Deployment Tools CMD which we will use to create our WinPE ISO. To run Deployment Tools CMD go to Start > All Programs > Microsoft Windows AIK > Deployment Tools Command Prompt.
Create WinPE ISODeployment Tools Command Prompt will automatically take us to the PETools folder. Here we will run 'copype' command, and specify 32bit system (with x86), and specify a folder where our WinPE will be saved (in our case C:\wpe). The command looks like this: 'copype x86 c:\wpe'.
Image 186.1 - copype Finished Successfully
Once the files are copied we are automatically transferred to the c:\wpe folder. Let's see the content of that folder using the 'dir' command.
Image 186.2 - wpe Folder Content
In our C:\wpe folder we see that we have ISO folder, which is the folder that we will burn to an image. Also we have default winpe.wim file, and we have etfsboot.com file (which is boot manager).
The next step is to open wimpe.wim image file and copy files that we want into that image. The main thing that we want to copy to winpe.wim is the ImageX tool. To do that we will open second command prompt with elevated privileges (right-click CMD, then select 'Run as administrator'). In that second CMD we will go to the 'c:\program files\windows aik\tools\' folder. Use the 'dir' command to check the content of that folder. What we need to do next is use the ImageX command to mount the c:\wpe folder. Before we do that we have to create a folder to mount it to. In our case we will create c:\wpem folder.
Image 186.3 - wpem Folder Created
ImageX for 32bit systems is located in the 'x86' folder, so we will open it. Next, we will use ImageX command with /mountrw switch. /mountrw will make our mount readable and writable. We will also choose our winpe.wim file, boot the first installation in it (option 1), and choose our output folder (c:\wpem). The final command looks like this: 'imagex /mountrw c:\wpe\winpe.wim 1 c:\wpem'.
Image 186.4 - Mounting Process
The content from the c:\wpe folder was mounted to the c:\wpem folder. When the mount is complete we can browse to the c:\wpem folder and see the content of the image.
Image 186.5 - wpem Folder
Now we have to copy ImageX from the 'C:\Program Files\Windows AIK\Tools\x86' folder to our 'c:\wpem' folder.
Image 186.6 - ImageX Copied
Now we can unmount the image and commit changes. Remember that we can also copy other data, tools, drivers or anything else that we want to have available once we boot up with that WinPE image. To unmount the image let's go to the command prompt and run the following command: 'imagex /unmount /commit c:\wpem'.
Image 186.7 - Committing Changes and Unmounting
What really happened is that the content of the c:\wpem folder (mount) was saved to the windows image. Image was then unmounted and saved to the winpe.wim file.
Next, we are going to copy c:\wpe\winpe.wim file to the c:\wpe\ISO\sources folder and change the name to boot.wim. We can do this using Windows Explorer. The 'sources' folder of every Windows 7 installation contains two important files: install.wim and boot.wim. The boot.wim is for booting the DVD and starting the installation. Install.wim stores the actuall installation files. At this poing we can create ISO image from our prepared folder. The WAIK has a tool called oscdimg (Operating System CD Image) creator which we can use to create ISO images from data on our hard drive. Let's go back to Deployment Tools Command Prompt and run the oscdimg command. We will specify -n for long file names, specify the source folder, specify destination file, and also specify the boot files which will be included in the boot sector (-b), so that our image will be bootable. The whole command is: 'oscdimg -n c:\wpe\iso c:\wpe\winpe.iso -b"c:\wpe\etfsboot.com'.
Image 186.8 - oscdimg Complete
Once the ISO image is complete we can burn it to a CD or DVD, which we can then use to boot our computer from.
Remember