Windows PE 2.0: a tiny version of Windows for system maintenance

Few people know it but when you boot off the Vista install DVD you’re booting into a different version of Windows altogether: Windows PE 2.0.

It’s based on the Vista kernel but it’s extremely compact. It provides read/write access to NTFS filesystems a wide range of 32- and 64-bit hardware drivers network connectivity and the ability to run both 32- and 64-bit applications.

However stripped away from the Vista installer it’s also a very versatile tool for administrators. It allows troubleshooting installation and system recovery and its small size means it can be run from CD USB key or even via network boot.

PE has actually been around since the release of XP but most administrators have avoided using it instead preferring more mature third-party management and installation tools.

The newest version of Windows PE (version 2.0) is different. Along with tools which I’ve discussed previously ImageX and System Image Manager (SIM) Windows PE 2.0 is bundled in the Windows Automated Installation Kit (WAIK) and is an integral part of both the WAIK and Vista itself.

How to get Windows PE

To use Windows PE 2.0 you need to get your hands on the Windows Automated Installation Kit (WAIK) which is a free download from Microsoft.

Finding WinPE on your machine

Once the WAIK is installed the WinPE folder structure is available in C:Program FilesWindows AIKTools. The main folders needed are the architecture folders (x86 ia64 and amd64) and the PETools and Servicing folders.

Building your own bootable WinPE 2.0 environment

The next step is to create the actual WinPE tool based on the architecture you require. This is done using the COPYPE.CMD command which resides in the PETools folder. Navigate there in a command window or just launch the “Windows PE Tools Command Prompt” link from Start Program Microsoft Windows AIK.

The COPYPE.CMD syntax is “COPYPE.CMD ” so in this case I’m using “COPYPE.CMD x86 C:Tempx86_PE”. The destination folder gets created as part of the process and shouldn’t already exist. Files are expanded and copied into the correct folder structure – the whole process takes no more than a minute or two.

The resulting x86_PE folder contains the WINPE.WIM file a MOUNT folder which you can use to mount the WIM via ImageX an ISO folder which contains all the files needed to create a WinPE ISO image and the BIN file needed to make the ISO bootable.

The ISO is created using OSCDIMG – a command-line application bundled with the WinPE tools. There are quite a few command arguments available but the most important ones are:

  • -b (specify location of boot file)
  • -n (enable long filenames)
  • -o (optimise storage by ignoring duplicate files — this is one of the cool standard features of the WIM format).

So the syntax I’m using is “OSCDIMG -n -o c:tempx86_peiso c:tempx86_pe.iso”. The process is nice and quick and the ISO is created. I used Nero to create a bootable CD and used it to fire up the Vista machine.

Booting and using Windows PE 2.0

The Windows PE 2.0 interface looks like the Vista logon screen with a command window instead of a logon box.

Here you can do pretty much anything. The real advantage with WinPE is that it is running a stripped-down version of the Vista kernel so it gives you read/write access to NTFS filesystems a wide range of 32- and 64-bit hardware drivers network access and will launch both 32- and 64-bit applications.

The WinPE system drive is created as X: drive and all the other machine drives are accessible. You can map network drives create new physical or logical drives or partition and format existing drives and reinstall Vista – all from within the WinPE kernel space.

Customising Windows PE 2.0

Because Windows PE 2.0 complies to all the WIM standards you can bundle any tools and applications you like and create a customised WinPE operating environment.

You can customise deployment options create installation menus make use of local installation media network distribution or Windows Deployment Services … anything really.

Windows PE 2.0 gives sysadmins a wonderful degree of flexibility. Sysadmins will be making much more use of it than they did of WinPE 1.0. If you’ll need to use it for Vista deployment you should start taking a look under the hood now.

The fact that PE uses Windows Imaging format (WIM) and XML standards means that Vista installation and deployment is the most streamlined and integrated of any Windows operating system yet.