Windows PE 2.0 for Windows Vista Overview
Windows PE 2.0 is the core deployment foundation for Windows Vista. It is designed to make large-scale, customized deployments of the new Windows Vista operating system notably easier. With the release of Windows Vista, Windows PE 2.0 is available to all Windows business customers to assist in deployments of Windows Vista as well as downlevel operating systems such as Windows XP. Windows PE enables users to inject drivers, configure Windows Vista offline, provide recovery solutions as well as diagnose and troubleshoot system problems.
Windows PE 2.0, built for Windows Vista, is available for download as part of the Business Desktop Deployment (BDD 2007) solution, available here.
Microsoft Windows Preinstallation Environment (Windows PE) 2.0 provides powerful preparation and installation tools for the Microsoft Windows Vista operating system. With Windows PE, you can start a subset of Windows Vista from a network or removable medium, which provides network and other resources necessary to install and troubleshoot Windows Vista. This document is an introduction to Windows PE, its capabilities, and its improvements over earlier pre-installation technologies.
On This Page
Microsoft Windows Pre-installation Environment (Windows PE) 2.0 is a bootable tool from Microsoft that provides operating system features for installation, troubleshooting, and recovery. Windows PE is not a general-purpose operating system. Instead, it is designed to be used for three specific tasks:
- Installing Windows Vista. Windows PE runs every time you install Windows Vista. The graphical tools that collect configuration information during the setup phase are running within Windows PE. Additionally, information technology (IT) departments can customize and extend Windows PE to meet their unique deployment needs.
- Troubleshooting. Windows PE is also useful for both automatic and manual troubleshooting. For example, if Windows Vista fails to start because of a corrupted system file, Windows PE can automatically start and launch the Windows Recovery Environment. You can also manually start Windows PE to use built-in or custom troubleshooting and diagnostic tools.
- Recovery. Original Equipment Manufacturers (OEMs) and Independent Software Vendors (ISVs) can use Windows PE to build customized, automated solutions for recovering and rebuilding computers running Windows Vista. For example, users could start their computers from Windows PE recovery CDs or recovery partitions to automatically reformat their hard disks and re-install Windows Vista with the original drivers, settings, and applications.
This paper, which is targeted to IT professionals, describes the installation and troubleshooting capabilities of Windows PE but does not discuss how OEMs and ISVs can use Windows PE for recovery purposes.
Ultimately, creating a standardized methodology that administrators can use to efficiently track down the problem area and fix it can save precious time spent deciphering complex error logs. Administrators can reduce the time taken to fix a failed connection by using the information in this article as a tool and checklist. It will also help them to resolve issues on their own before calling Microsoft Product Support Services.
|Note: Because Windows PE is designed as a tool to configure, install, and troubleshoot Windows Vista, Windows PE is not available for purchase separately from Windows Vista.|
Using Windows PE for Installation
Microsoft has designed Windows PE to replace MS-DOS as the pre-installation environment. Windows PE is built from Windows Vista components, providing a robust, flexible, and familiar environment. In fact, Windows PE can run many Windows Vista applications, detect and enable most modern hardware, and communicate across Internet Protocol (IP) networks. Windows PE typically consumes less than 100 MB of disk space and can run entirely from Random Access Memory (RAM), enabling you to insert a second CD that contains drivers or software. These features enable Windows PE to run on computers that do not currently have a formatted hard disk or installed operating system. However, Windows PE is not a full-featured operating system like Windows Vista.
Customized Windows Vista Installations
Enterprises will appreciate Windows PE, however, because IT departments will be able to create scripts and applications to automate deployment. For example, using the process below, an IT department could configure a Windows Deployment Services remote deployment infrastructure, create a configuration script, and build a custom Windows PE image to enable a highly automated deployment process:
- When a new computer is connected to the network, the built-in Pre-boot eXecution Environment (PXE) client connects to the Windows Deployment Service server and downloads the customized Windows PE image across the network.
- The new computer loads Windows PE into memory and launches the configuration script. The script verifies that the computer’s configuration meets the IT department’s hardware requirements.
Note: Windows Deployment Server (Windows DS) is a replacement for Remote Installation Services (RIS).
- If necessary, the script backs up the user’s data to a shared folder on another computer.
- The script runs the Diskpart tool to partition and format the disk.
- The script connects to a shared folder containing the Windows Vista Setup files and runs the Windows Vista Setup program to install the operating system fully unattended.
Windows PE and the Windows Imaging Format
The most powerful and flexible way to distribute Windows PE is within a Windows Imaging Format (WIM) file. WIM is the file-based imaging format that Windows Vista uses for rapid installation on a new computer. WIM files store copies (known as images) of one or more operating systems, such as Windows Vista or Windows PE. Maintaining an operating system in a WIM file is easy, because you can add and remove drivers, updates, and Windows components offline, without ever starting the operating system. Maintaining Windows PE images in WIM files will be very similar to maintaining Windows Vista images.
Like Windows Vista, Windows PE can be contained within a WIM file. However, when you store a Windows Vista image in a WIM file, the only way to start Windows Vista is to copy the image to the computer’s hard disk. Windows PE, however, can start directly from a WIM file without being copied to a hard disk. This functionality enables you to create a WIM file, store it on bootable media such as a CD or USB flash drive, and start Windows PE directly from that medium. Microsoft uses this ability to load Windows PE into RAM and launch Windows PE when you install Windows Vista on a new computer.
Using Windows PE for Troubleshooting
Although the primary purpose of Windows PE is to install Windows Vista, you can also use Windows PE for troubleshooting. Examples of troubleshooting tasks include:
- Replacing system files. You can replace corrupted files from the original installation media. For example, if a corrupted system file is preventing a computer from starting, you can use Windows PE to start the computer, then replace the corrupted file from the Windows Vista media.
- Recovering data before reinstalling Windows. Windows PE provides full access to both FAT and NTFS file systems. In circumstances where you must replace or reformat a hard disk, you can start the computer with Windows PE first, and then copy important files to another disk or to a shared folder. Note that files encrypted with Encrypting File System (EFS) cannot be easily recovered.
- Running diagnostic and configuration tools. Windows PE includes common command-line diagnostic tools. You can also run other standard and custom Windows troubleshooting tools from within Windows PE. Built-in tools include:
- Diskpart. Diskpart is a text-mode command interpreter that allows you to manage disks, partitions, or volumes from a command prompt or script.
- Drvload. You use the drvload command to add device drivers, such as audio, video, and motherboard chipsets, to a Windows PE image. You can also use drvload to dynamically load a driver after Windows PE has started.
- Net. The Net command-line tool allows you to manage the local user database, start and stop services, and connect to shared folders.
- Netcfg. The network configuration tool configures network access. When using Windows PE as a custom deployment tool, you might use Netcfg to manually configure network settings as part of a startup script.
Windows PE Technology
To make Windows PE as versatile as possible, Microsoft has designed it to be lightweight, powerful, and flexible. The sections that follow describe these characteristics in more detail, and then describe the limitations of Windows PE.
Windows PE must be as small as possible so that it can be stored on removable media such as CDs and USB flash drives, started quickly, and stored entirely in a computer’s memory. The exact size of Windows PE can vary depending on how you customize the image, but it typically consumes less than 100 MB when compressed in WIM format. The 64-bit versions of Windows PE are larger, and customizing the Windows PE image with language packs or applications increases the size.
To help minimize memory usage, Windows PE can run from a compressed image. In other words, you can compress Windows PE within a WIM file and run it from memory without ever decompressing it. Therefore, you benefit from compression both when storing the image on a disk and after loading it into your computer’s memory.
To minimize disk storage, the WIM format stores only a single instance of duplicate files. Therefore, if you have a WIM file with two Windows PE images, files that both images share will be stored only once.
Although Windows PE is designed to be small, it contains much of the core functionality of Windows Vista. Because Windows PE supports Win32 (just like Microsoft Windows XP and Windows Vista), most Windows applications will run in Windows PE. This means that developers in your IT department can use tools such as Microsoft Visual Studio to create Win32 applications that run on Windows PE.
Windows PE also supports multithreading and multitasking, so you can run multiple tools at the same time. This capability saves both time and resources that would otherwise be required to validate and test the hardware and software images. Windows PE can also run batch files, Microsoft Visual Basic Scripting Edition (VBScript) scripts, Windows Script Host (WSH) scripts (if the optional WSH component is installed), HTML Applications (HTAs), and Microsoft ActiveX Data Objects (ADO). Because Windows PE provides RAM-based temporary space, Windows PE can run applications that require the ability to write temporary files to the hard disk even if no hard disk is available.
To minimize disk storage, the WIM format stores only a single instance of duplicate files. Therefore, if you have a WIM file with two Windows PE images, files that both images share will be stored only once.
|Note: Some applications, such as games, will not run on Windows PE—but that’s not what Windows PE is designed for. Windows PE also does not currently support the Microsoft .NET Framework.|
If Windows Vista includes drivers for your computer hardware, your hardware will probably work with Windows PE, too, because Windows PE includes most Windows Vista drivers. You can also add new drivers to a Windows PE image. In enterprise environments, you could add every driver required by any computer in your organization to a single Windows PE image so that the image will work with any of your computers.
For computers with unusual hardware, you can install a driver after Windows PE has started and immediately use the hardware without restarting the computer. For example, if you launch Windows PE and discover that it doesn’t include the correct network driver, you could insert a CD containing the required driver, and then use the Drvload command-line tool to inject the driver so that you can connect to the network. This capability is possible because Windows PE can run directly from the computer’s RAM, as discussed later in this section.
Although Windows PE includes a great deal of built-in functionality, many tools and features were made optional to keep Windows PE as lightweight as possible. For example, WSH is not included in the standard Windows PE image. However, you can easily add the WSH component if you need it to run scripts. Similarly, you can add troubleshooting tools, such as Tracert or your own custom tools, to your customized Windows PE image. You can also use the same offline image editing tools to install updates and service packs to keep Windows PE up-to-date.
Most operating systems, such as Windows XP or Windows Vista, need to run from a hard disk. You can start Windows PE from a variety of bootable media or the network (for example, by using WDS). Windows PE supports X86, X64, and IA64 architectures, so you can use the same pre-installation and troubleshooting environment for all computers in your organization. Windows PE can connect to both IPv4 networks (used by most organizations and on the Internet) and IPv6 networks. Changing the Windows PE startup settings can be done by editing the text-based Unattend.xml file.
Although you can run Windows PE directly from a hard disk or removable media, you can also choose to run Windows PE directly from memory. If you choose to run Windows PE from memory, the Windows PE boot loader first creates a virtual RAM disk in memory. Then, the boot loader copies a compressed version of Windows PE to the RAM disk. Finally, the boot loader mounts the RAM disk as if it were a disk drive and starts Windows PE. Loading Windows PE from RAM provides additional flexibility, because you remove the Windows PE media after Windows PE has started. Therefore, you could load Windows PE from a CD, and then replace the CD with a second CD containing tools or drivers. When Windows PE runs from memory, it supports writing temporary files to the virtual RAM disk, which wouldn’t be possible with read-only media such as a CD.
Windows PE Limitations
Because Windows PE is designed to be as lightweight, powerful, and flexible as possible, it has the following limitations:
- The computer must have a minimum of 256 MB of RAM.
- Windows PE doesn’t fit on floppy disks, but you can write a Windows PE image to a bootable CD.
- Windows PE requires a Video Electronics Standards Association (VESA)-compatible display device and will use the highest screen resolution it can determine is supported. If Windows PE can’t detect video settings, it uses a resolution of 640 × 480 pixels.
- Windows PE supports Distributed File System (DFS) name resolution only to stand-alone DFS roots.
- You can’t access files or folders on a computer running Windows PE from another computer. In other words, the Server service is not available within Windows PE.
- Windows PE supports both IPv4 and IPv6, but it does not support other protocols, such as Internetwork Packet Exchange/Sequenced Packet Exchange (IPX/SPX).
- Drive letter assignments aren’t persistent between sessions. After you restart Windows PE, the drive letter assignments will be in the default order.
- Windows PE doesn’t support the .NET Framework.
- Because Windows on Windows (WOW) is not supported, 16-bit applications won’t run in 32-bit versions of Windows PE, and 32-bit applications won’t run in 64-bit versions of Windows PE.
- To prevent its use as a general-purpose operating system, Windows PE automatically restarts after 24 hours from the initial bootstrap.
- Additionally, Windows PE includes only a subset of the Windows Vista Win32 application programming interfaces (APIs), including I/O (disk and network) and core Win32 APIs. Applications that require any of the following Win32 APIs will not run in Windows PE: access control, NetShow Theater Administration, OpenGL, power options, printing and print spooler, still image, tape backup, terminal services, user profile, Windows station and desktop, Windows multimedia, and the Windows shell.
Comparing Windows PE 2.0 to Earlier Technologies
If you have previously used either MS-DOS or earlier versions of Windows PE as deployment or troubleshooting tools, you are probably interested in how Windows PE improves on those technologies. The sections that follow discuss how Windows PE improves on using MS-DOS or earlier versions of Windows PE.
Windows PE 2.0 Compared to MS-DOS Boot Disks
You can use Windows PE instead of an MS-DOS-bootable disk for the following tasks and complete them in much less time and with far less frustration:
- Create and format disk partitions, including NTFS file-system partitions. Windows PE allows you to format disks with NTFS file system without using third-party utilities. Also, the file-system utilities that Windows PE provides are scriptable, so you can completely automate partitioning and formatting.
- Access network shares to run troubleshooting tools and install operating systems. Windows PE provides network client capabilities similar to Windows Vista. In fact, Windows PE provides the same network drivers that come with Windows Vista, allowing you to access the network quickly and easily. Customizing MS-DOS-bootable disks to access network shares was invariably a time-consuming and tedious process.
- Load and access 32-bit and 64-bit device drivers for audio, video, motherboard chipsets, batteries, and other devices that use WindowsVistadrivers. Windows PE provides the ability to load Windows mass-storage, networking, audio, video, and other types of drivers. With MS-DOS, you had to find 16-bit drivers, customize MS-DOS-bootable disks, and maintain different disks for different network adapters.
- Automate tasks. The scripting capabilities in Windows PE far exceed the capabilities of MS-DOS-bootable disks. For example, Windows PE uses VBScript, which is a powerful scripting language that is much easier to use than MS-DOS batch files. Windows PE supports gigabytes of memory on the system from which it runs and provides for networking support using the protected mode Transmission Control Protocol/Internet Protocol (TCP/IP) stack. You can easily add startup scripts or applications by editing a text-based Extensible Markup Language (XML) file. If you have already created scripts for MS-DOS, you can probably use them in Windows PE; otherwise, you can easily port your existing MS-DOS-based scripts to Windows PE.
- Run Win32 applications. One of the disadvantages of using MS-DOS as a pre-installation and troubleshooting operating system is that you could only run applications specifically written for MS-DOS. Windows PE can run most graphical and console-based Windows applications because Windows PE supports most of the important Microsoft Win32 APIs. Additionally, you can run multiple tools simultaneously, because Windows PE supports multithreading and multitasking.
Windows PE 2.0 Compared to Earlier Versions of Windows PE
For many Microsoft customers, Windows PE 2.0 will be their first introduction to the environment. However, if you worked with Windows PE 1.0, you might be interested in understanding how Windows PE 2.0 has improved. This section discusses notable improvements over Windows PE 1.0 for existing Windows PE users.
First, Windows PE 2.0 is based on Windows Vista components, whereas earlier versions of Windows PE were based on Windows XP or Microsoft Windows Server 2003. Therefore, Windows PE 2.0 supports Windows Vista drivers and benefits from many of the Windows Vista improvements, including the improved protection from network attacks offered by Windows Firewall. As described earlier, Windows PE 2.0 now supports driver injection, which enables you to load drivers either before or after Windows PE has launched. Now, if you start Windows PE and discover that it lacks a necessary driver, you can load the nonstandard driver from removable media and immediately use the hardware without rebooting.
For more flexibility, especially when creating pre-installation scripts, Windows PE 2.0 now includes increased Windows Management Instrumentation (WMI) support. With WMI, you can perform most configuration or management tasks from a script or at a command prompt. For more information about WMI, visit http://msdn.microsoft.com/library/en-us/dnanchor/html/anch_wmi.asp.
Many applications couldn’t run within Windows PE 1.0 because they required temporary storage space, and Windows PE was often launched from nonwriteable media such as a CD. Windows PE 2.0 now supports most applications that need to write temporary files by providing 32 MB of scratch space in the computer’s RAM. Any time an application attempts to write temporary files, no matter which folder, Windows PE redirects the changes to the scratch space in memory to simulate the presence of a hard disk. Naturally, all changes are lost when you restart the computer.
Windows PE is a bootable tool built on Windows Vista components. Unlike Windows Vista, which is a general-purpose operating system, Windows PE is designed to be used specifically for Windows Vista installation, troubleshooting, and recovery. Although every Windows Vista installation relies on Windows PE, the average user will never be aware of Windows PE’s existence.
IT departments, however, can customize and extend Windows Vista to improve the efficiency of deployment and troubleshooting. In deployment scenarios, IT departments can add custom components, drivers, and languages to Windows PE to meet their specific needs. They can also automate configuration and installation tasks to build a custom, automated Windows Vista deployment or upgrade process.
For troubleshooting scenarios, Windows PE replaces MS-DOS boot disks for troubleshooting when Windows Vista cannot start properly. In fact, Windows PE will automatically load and launch the Windows Recovery Environment if Windows Vista fails to start. IT departments can use Windows PE for manual troubleshooting, too, and can leverage either the built-in tools or add tools to the Windows PE image.
Windows PE is an important part of how Windows Vista helps make your IT infrastructure efficient and reliable. Microsoft is making Windows PE available with the goal of providing a lightweight, powerful, and flexible purpose-built tool for pre-installation configuration and troubleshooting.