Download Windows PE Overview - Microsoft Center

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Mobile operating system wikipedia , lookup

MS-DOS wikipedia , lookup

Windows 10 wikipedia , lookup

Microsoft Windows wikipedia , lookup

Windows Mobile wikipedia , lookup

Windows Phone wikipedia , lookup

Criticism of Windows Vista wikipedia , lookup

Windows RT wikipedia , lookup

Batch file wikipedia , lookup

Windows Phone 8.1 wikipedia , lookup

Windows NT startup process wikipedia , lookup

OS/2 wikipedia , lookup

Windows 95 wikipedia , lookup

Windows NT 3.1 wikipedia , lookup

OS-tan wikipedia , lookup

Transcript
Windows Preinstallation Environment
Technical Overview
March 2004
Abstract
Microsoft® Windows® Preinstallation Environment (Windows PE) provides powerful preparation and
installation tools for Microsoft Windows XP and Microsoft Windows Server™ 2003. With Windows PE,
you can boot a subset of the Windows operating system from a removable disk, which provides network
and other resources necessary to install and troubleshoot Windows on the desktop or server. This
document is a technical overview of Windows PE and its capabilities.
© 2004 Microsoft Corporation. All rights reserved.
The information contained in this document represents the current view of Microsoft
Corporation on the issues discussed as of the date of publication. Because
Microsoft must respond to changing market conditions, it should not be interpreted
to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the
accuracy of any information presented after the date of publication.
This white paper is for informational purposes only. MICROSOFT MAKES NO
WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT.
Complying with all applicable copyright laws is the responsibility of the user. Without
limiting the rights under copyright, no part of this document may be reproduced,
stored in or introduced into a retrieval system, or transmitted in any form or by any
means (electronic, mechanical, photocopying, recording, or otherwise), or for any
purpose, without the express written permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or other
intellectual property rights covering subject matter in this document. Except as
expressly provided in any written license agreement from Microsoft, the furnishing
of this document does not give you any license to these patents, trademarks,
copyrights, or other intellectual property.
© 2004 Microsoft Corporation. All rights reserved. Microsoft, Active Directory,
ActiveX, MS-DOS, Win32, Windows, Windows NT, Windows Server, and the
Windows logo are either registered trademarks or trademarks of Microsoft
Corporation in the United States and/or other countries.
The names of actual companies and products mentioned herein may be the
trademarks of their respective owners. Microsoft Corporation • One Microsoft Way •
Redmond, WA 98052-6399 • USA
Contents
Windows PE Overview ............................................................................ 1
Windows PE Architecture ...................................................................... 3
Interactive Components
3
Windows PE Footprint
3
Windows PE Limitations
4
Interim Releases of Windows PE
5
Features Included in the Interim Versions of Windows PE
5
Benefits of Implementing Interim Versions of Windows PE
6
Windows PE Command-Line Tools ....................................................... 8
Windows PE Scenarios .......................................................................... 9
Desktop and Server Deployment
Deployment Scenarios
Maintenance and Troubleshooting
10
11
12
Windows PE Deployment ..................................................................... 13
Windows PE CDs
13
Remote Installation Service
13
Non-Removable Media
14
Windows PE Customization ................................................................. 15
Languages
15
Device Drivers
16
Mass-Storage Drivers
16
Components
17
Summary ................................................................................................ 18
For More Information ............................................................................ 19
Windows PE Overview
Microsoft® Windows® Preinstallation Environment (Windows PE) is a bootable CD that replaces the
Microsoft MS-DOS®–bootable disk in most deployment and troubleshooting processes. It’s a lightweight, 32bit and 64-bit environment that supports the same set of networking and mass-storage device drivers that
Windows XP supports and provides access to similar features, including NTFS and DFS. Windows PE
includes the following features:

Hardware independence. Windows PE is a hardware-independent Windows environment for both x86
and Itanium architectures. You can use the same preinstallation and troubleshooting environment on all
of the desktop computers and servers in your company, without creating and maintaining different
bootable disks for different hardware configurations.

APIs and scripting capabilities. Windows PE contains a subset of the Microsoft Win32® application
programming interfaces (APIs); a command interpreter capable of running batch files; and support for
adding Windows Script Host (WSH), HTML Applications (HTA), and Microsoft ActiveX® Data Objects
(ADO) to create custom tools or scripts. The scripting capabilities in Windows PE far exceed the
capabilities of MS-DOS–bootable disks. For example, the command interpreter in Windows PE supports a
more robust batch-programming language than does MS-DOS, allowing you to get more done with much
less work.

Network access. Windows PE uses TCP/IP to provide network access and support for standard network
drivers for running Windows setup and copying images and test suites from the network to the computer.
You can easily add or remove network drivers from a customized version of Windows PE. In contrast,
customizing MS-DOS–bootable disks to access network shares is a time-consuming and frustrating
process. First, you must track down 16-bit device drivers for the network adapter, and then you must
customize the networking client and protocols on the bootable disk. The frustration stems from the fact
that you must usually maintain multiple disks, one for each network adapter. Windows PE alleviates this
frustration because it supports the network drivers that Windows XP Professional supports, and
Windows PE is easier to customize with additional network drivers.

Mass-storage and other device support. Windows PE includes support for all mass-storage devices
that use Windows 2000, Windows XP, and Windows Server™ 2003 drivers. Customizing an MS-DOS–
bootable disk to access atypical mass-storage devices requires tracking down and installing the 16-bit
device drivers. However, Windows PE supports many of these mass-storage devices out of the box—as
new devices become available, you can easily add or remove drivers into a customized version of
Windows PE. And customizing Windows PE to support additional mass-storage devices is easier
because it uses standard Windows device drivers that are readily available.

NTFS management. Windows PE includes native support for creating, deleting, formatting, and
managing NTFS file system partitions. Also, Windows PE provides full, unrestricted access to NTFS file
systems, allowing you to easily recover data on failed systems.
Windows Preinstallation Environment Technical Overview
1

Hardware diagnostics. Windows PE supports hardware diagnostics that can load and test specific
hardware drivers. With the inclusion of Windows Management Instrumentation (WMI) support, access to
over 47 providers across 1,500 classes of hardware are now accessible and supported.

Support for Preboot eXecution Environment (PXE) protocol. If the computer supports PXE-booting,
you can start it automatically from a Windows PE image located on a Remote Installation Server (RIS)—
and the Windows PE image isn’t installed on the computer’s hard disk. Starting Windows PE from the
network makes it a convenient tool to use in deployment and recovery scenarios.
Windows PE Documentation
The Windows PE CD you receive from Microsoft contains complete documentation for using and customizing
Windows PE. You can find the Windows Preinstallation Environment User’s Guide (Winpe.chm) compiled
Help file in the CD’s DOCS folder. This file describes how to use Windows PE, and it includes documentation
for many of the useful command-line tools that are available.
Windows Preinstallation Environment Technical Overview
2
Windows PE Architecture
Windows PE leverages the code base of Windows XP and Windows Server 2003, delivering a 32-bit
deployment and troubleshooting environment. It delivers a subset of the Windows functionality, even though it
leverages the code from the full operating system, which minimizes the space and resource requirements that
Windows PE requires.
To better understand Windows PE, the following sections describe how it works:

Interactive Components. Describes the commands that run when Windows PE boots.

Windows PE Footprint. Describes the size of Windows PE on disk and in memory.

Windows PE Limitations. Describes Windows PE’s limitations.
Interactive Components
CMD.EXE executes the STARTNET.CMD batch file at startup. This file loads the networking processes and
runs any custom commands that you want to implement. The default STARTNET.CMD file looks like this:
factory -winpe
The –winpe command-line option processes the WINBOM.INI file, creates a unique computer name for the
Windows PE session, installs the network card, and then processes the remainder of the Winbom.ini file.
Windows PE Footprint
The size of Windows PE on disk ranges from 120 (for the 32-bit version of Windows PE) to 220 MB (for the
64-bit version of Windows PE), as Table 1 shows (sizes include networking services), without customizations.
You have the option to reduce the size of Windows PE on disk to approximately 81 MB by removing
nonessential files using a script provided in the online help files.
If you customize Windows PE, which you learn about later in this document, its size varies. For example,
localized versions of Windows can vary in size between 300 to 370 MB, depending on the language. Other
factors that affect the size of Windows PE can be the set of device drivers that you include and additional
components in your Windows PE image.
Table 1. Windows PE Footprint
Platform
32-bit versions of Windows PE
64-bit versions of Windows PE
On-disk size
About 140 MB
About 250 MB
Windows Preinstallation Environment Technical Overview
In-memory size
About 40 MB
About 42 MB
3
Windows PE Limitations
Windows PE has the following limitations:

Windows PE doesn’t fit on floppy disks, but you can write a Windows PE image to a bootable CD.

Windows PE supports DFS name resolution to standalone DFS roots.

To prevent its use as a general purpose operating system, Windows PE automatically reboots after 24
hours from the initial bootstrap.

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 TCP/IP and NetBIOS over TCP/IP for network connectivity, but it doesn’t support
other protocols, such as 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 requires a VESA-compatible display device and will use the highest screen resolution it can
determine is supported. If the operating system can’t detect video settings, it uses a resolution of 640 by
480 pixels.

You can build custom versions of Windows PE from Windows XP Professional Edition and
Windows Server 2003 products but not Windows XP Home Edition.

Windows PE doesn’t support the Microsoft .NET framework.

The Windows on Windows 32 (WOW32) subsystem allows 16-bit applications to run on the 32-bit
Windows platform. Similarly, a new 32-bit subsystem called Windows on Windows 64 (WOW64) is in
Windows XP 64-bit versions. It provides all the 32-bit Windows services needed for 32-bit applications to
run properly. The WOW32 and WOW64 subsystems aren’t available in Windows PE, however, so 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 reduce its size, Windows PE includes only a subset of the available Win32 APIs. Included are I/O (disk
and network) and core Win32 APIs. The following categories of Win32 APIs aren’t available in Windows PE
(applications that require these APIs will not run in Windows PE):

Access Control

NetShow Theater Administration

OpenGL

Power Options

Printing and Print Spooler

Still Image

Tape Backup
Windows Preinstallation Environment Technical Overview
4

Terminal Services

User Profile

Window Station and Desktop

Windows Management Instrumentation (WMI)

Windows Multimedia

Windows Shell
Interim Releases of Windows PE
Microsoft has created two interim releases of Windows PE: Windows Preinstallation Environment, Version
2004, for Windows XP Service Pack (SP) 2 and Windows Preinstallation Environment, Version 2005, For
Windows Server 2003 SP1. These releases are stand-alone products that will also be included in the OPK;
they can be licensed directly from Microsoft by OEMs, ODMs, IHVs, and ISVs.
Microsoft created the interim versions of Windows PE in response to system, device, software
manufacturer’s, and enterprise customer’s needs to deploy Windows PE in their factories earlier in the
operating system ship cycle. Using these interim versions of Windows PE, OEMs and System Builders have
additional time to migrate their legacy MS-DOS–based tools and retrofit their factories ahead of the next
operating system release, and will be ready to ship when Microsoft Windows Vista™ is released.
The interim versions of Windows PE include features and capabilities that eliminate dependencies on
MS-DOS–based tools (such as test and diagnostics tools), and provides an infrastructure within Windows PE
to install images and perform required tasks in the factory. The interim versions of Windows PE also include
capabilities for IHVs and ISVs to port their MS-DOS–based test, diagnostic, and support tools, and also retail
sale applications, such as virus-scanning utilities.
The new features included in the interim versions of Windows PE will also be included in all future versions of
Windows PE.
Features Included in the Interim Versions of Windows PE
Operating system
Available features
Windows XP SP2

WMI Support for diagnostic access, including many providers and
even more classes of hardware

Driver Injection of 32-bit and 64-bit device drivers with Plug and
Play Boot support

Updates to formal documentation for application debugging, and
for Win32 and Win64 APIs that are not supported within
Windows PE platform

Built in Windows Firewall Support enabled by default
Windows Preinstallation Environment Technical Overview
5
Operating system
Available features
Windows Server 2003 SP1

WMI Support for diagnostic access, including many providers and
even more classes of hardware

Driver Injection of 32-bit and 64-bit device drivers with Plug and
Play Boot support

Updates to formal documentation for application debugging, and
for Win32 and Win64 APIs that are not supported within
Windows PE platform

Built in Windows Firewall Support enabled by default

RAMDisk support for HD, CD, DVD, and PXE

Windows PE Boot support on USB Flash Drives (UFDs) for OEM
and IHV only
Benefits of Implementing Interim Versions of Windows PE
The interim Windows PE releases include built-in features that provide as much parity as possible with
MS-DOS system regarding direct hardware access for both read and write operations.
The interim Windows PE platforms provide the following benefits:
Replace legacy MS-DOS–based utilities. Because Microsoft will not license MS-DOS after 2005, it is
important for the industry to move forward with 32-bit and 64-bit computing solutions. Beginning with the
interim versions of Windows PE, companies will have a process to migrate off of MS-DOS–based tools and
utilities and receive comparable operating system features and functionality.
Streamline factory processes by consolidating tools around a single operating system platform.
Windows PE provides the ability to cut costs by tool consolidation, operating system consolidation, and
factory efficiency gains, which in turn will increase the factory throughput and increase the number of PCs
shipped or sold that can be achieved at any given time.

Streamlined factory processes. Beginning with the interim versions of Windows PE, currently required
factory build steps can be eliminated. Today, most factory processes require several sets of tools,
including those that run on MS-DOS and those that run on either Windows or Windows PE. At the same
time, many companies use a variety of support tools, both in their factory and for delivery to customers for
support purposes.
In contrast, the interim versions of Windows PE provide a one-time boot process into just one operating
system (the Windows PE platform) to perform all of the testing listed above, saving critical and costly
minutes per PC.

Consolidated toolsets. Windows PE provides the ability to consolidate these tools to a single operating
system platform, reducing—and in some cases eliminating—time-consuming reboots in the factory or
within the factory preinstall process. Windows PE also provides the capability to consolidate multiple
toolsets to a single toolset that can be used for both internal and external consumption. The ability to write
a support tool once and use it across multiple internal and external usage scenarios can save your
company time and resources.
Windows Preinstallation Environment Technical Overview
6
The single platform beginning with the interim versions of Windows PE provides many benefits over the
current system of managing multiple toolsets that must be maintained and deployed independently:

Enhanced support through a regular process of hotfixes, QFEs, and future releases of Windows PE
(through the licensing program).

Time and cost savings realized through a single, portable toolset for testing, diagnostic, and support
processes, which can be used to synchronize deployment processes across internal factories and
vendors and customers alike.

Reduced costs and process management load for maintaining only one toolset, while deploying
multiple operating systems and applications, in labs, in factories, and in retail solutions.
Windows Preinstallation Environment Technical Overview
7
Windows PE Command-Line Tools
The following command-line tools are available when preinstalling an operating system or using Windows PE:

DiskPart. DiskPart is a text-mode command interpreter that enables you to manage objects (disks,
partitions, or volumes) by using scripts or direct input from a command prompt. With DiskPart, you can
create and remove volumes; assign drive letters, and so on.

Drvinst. This command enables you to add device drivers, such as audio, video, and motherboard
chipsets, to a Windows PE image. Drvinst.exe automatically copies .inf and driver files from the path that
you specify to the corresponding directories in your Windows PE image. The drivers will bind (through
Plug and Play) to the hardware that is present in the system, enabling you to write applications that take
advantage of the specific driver and hardware combination.

Factory. Use the Factory tool to update drivers, run Plug and Play enumeration, install applications, test,
configure the computer with customer data, or make other configuration changes in your factory
environment. For companies that use disk imaging (or cloning) software, efficient use of Factory.exe can
reduce the number of images you require.

Mkimg. This command builds the file set for Windows PE from any Windows XP or Windows Server 2003
product CD except Windows XP Home Edition, and Windows .NET Datacenter Server. It optionally
creates an ISO image of the files. You can then burn that ISO file to a CD by using any CD-burning
software that supports ISO-9660. The CD image creation process takes several minutes, and then the
files are placed in the same location as where you run the Mkimg command.

Netcfg. The network configuration tool configures network access. When you preinstall Windows, it is
most commonly used in a script that runs during when Windows PE boots.

Oscdimg. This is a command-line tool that creates an ISO image file of a customized 32-bit or 64-bit
version of Windows PE. You can then burn that ISO image file to a CD.

Sys. You can use Windows PE to preinstall Microsoft Windows 95, Microsoft Windows 98, and Microsoft
Windows Millennium Edition. In these cases, the hard disk needs the boot sector common to these
operating systems. Use the Sys utility to write the boot sectors for these operating systems.
See the Windows Preinstallation Environment User’s Guide (Winpe.chm on the Windows PE CD) for more
information about these tools. Winpe.chm includes detailed documentation for each command-line option that
these tools support.
Windows Preinstallation Environment Technical Overview
8
Windows PE Scenarios
You can think of Windows PE as a powerful replacement for MS-DOS in your deployment and
troubleshooting processes. Windows PE is a minimal Windows system that provides limited services based
on the Windows XP Professional and the Windows Server 2003 kernels. It also provides the minimal set of
features required to run Windows Setup, access and install operating systems from the network, script basic
repetitive tasks, and validate hardware. You can use Windows PE with both desktops and servers to work
faster and smarter in the following ways:
1. Automation. The deployment process becomes more streamlined because you can automate the process
by using the Windows PE platform and toolsets.
2. Toolsets. The maintenance and troubleshooting tools are far more powerful in Windows PE than in
MS-DOS. Windows PE provides the ability to run multiple tools at the same time using the built-in
multithreading and multitasking support. This capability saves both time and resources that would
otherwise be required to validate and test the hardware and software images.
3. Deployment. You don’t have to spend time building and maintaining MS-DOS–bootable disks for
deployment preparation. Windows PE provides the ability to boot from a variety of media types, including
USB Flash Drive (UFD), DVD, CD, and the network, using the PXE remote-boot ROMs and Remote
Install servers.
For example, 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. Formatting disks with NTFS
by using an MS-DOS–bootable disk required third-party utilities. Windows PE replaces the MS-DOS–
bootable disk in this scenario, allowing you to format disks with NTFS without using third-party utilities.
Also, the file-system utilities that Windows PE provides are scriptable, so you can completely automate
the HD preparation process.

Access network shares to run troubleshooting tools, install operating systems, and so on.
Windows PE provides network access comparable to Windows XP. In fact, Windows PE provides the
same network drivers that come with Windows XP, allowing you to access the network quickly and easily.
Customizing MS-DOS–bootable disks to access network shares was usually a time-consuming and
tedious process that drew you away from other tasks.

Load and access 32-bit and 64-bit device drivers for audio, video, motherboard chipsets, batteries,
and a host of other devices that use Microsoft Windows 2000, Windows XP Professional, or
Windows Server 2003 drivers. Windows PE provides the ability to inject in mass-storage, networking,
audio, video and other types of device drivers directly into an existing copy of Windows PE, so you don’t
need to customize MS-DOS–bootable disks. This capability is another example of where the Windows PE
platform reduces the time you need to spend on maintaining MS-DOS–bootable disks and allows you to
focus on more critical tasks. This applies for Intel Itanium-based systems that run 64-bit versions of
Windows.
Windows Preinstallation Environment Technical Overview
9

Customize Windows PE by using techniques and technologies that are already familiar. Because
Windows PE is based on Windows XP Professional and Windows Server 2003, you don’t have to learn
new techniques and tools used to customize Windows PE. You can customize it for a variety of
scenarios, including the most common—deployment, test and diagnostic, recovery, and other supportrelated tasks.
Replacing MS-DOS–bootable disks with Windows PE in the deployment and recovery processes allows you
to take advantage of a known, standard environment. You can quickly use Windows PE without customizing
MS-DOS for your company’s environment or needing 16-bit device drivers. Most of the MS-DOS–based
scripts that you use to prepare computers for deployment or recover data from failed installations can be used
in Windows PE; otherwise, you can easily port your existing MS-DOS–based scripts to Windows PE.
In addition, if memory is an issue on your MS-DOS–based disks, Windows PE has access to gigabytes of
memory on the system it runs from, and provides for networking support using the protected mode TCPIP
stack.
Desktop and Server Deployment
If you’ve used MS-DOS–bootable disks to handle system configuration, prepare computers for installation,
and then install the operating system on the computer. MS-DOS–bootable disks can be difficult to configure
and maintain for this purpose. First, you must track down the 16-bit device drivers required and then
customize the disks to connect to the network. Each type of network adapter requires a unique disk, too,
escalating the amount of work involved in maintain these MS-DOS–bootable disks. Add to that the computer
systems with atypical mass-storage devices that require you to customize disks with mass-storage device
drivers, and the number of combinations that you maintain grows quickly.
spending addition to the time spent building and maintaining MS-DOS–bootable disks, MS-DOS provides
minimal scripting capabilities—and the utilities it provides are only the bare essentials. For example, after you
start computers with an MS-DOS–bootable disk, you must usually perform many tasks manually before
starting the Windows installation instead of moving on to the next computer to install Windows.
Microsoft developed Windows PE specifically to address desktop and server deployment scenarios. Windows
PE gives you a lightweight 32-bit environment that leverages the same device drivers as Windows XP
Professional. You have access to a similar set of basic features that Windows XP Professional provides,
including the NTFS file system and DFS shares. And deployment can be fully automated, so that you can
move on to the next computer quicker.
Beginning with the interim versions of Windows PE, you have additional deployment resources and
capabilities:

Boot, load, and run Windows PE using a RAMDisk on a client PC using the network, hard disk (such as a
USB Flash Drive), CD or DVD.

Run tests and diagnostics remotely from a server or locally from media.

Eliminate disk cleanup tasks, such as removing Windows PE-based tools and diagnostic partitioning.

Run other programs while Windows PE is deploying (to support processes such as CD swapping for
recovery media).
Windows Preinstallation Environment Technical Overview
10
Deployment Scenarios
In deployment scenarios, there are a variety of ways you can use Windows PE, including the following
examples:

Customized, installing from the network. You can customize Windows PE in a variety of ways, such as
adding device drivers, components, and other utilities, and then create a new Windows PE CD or ISO
image for use with RIS based servers. You use the Windows PE image to connect to the network and
install an operating system from a customized network share. This scenario might look like the following:
1. The user boots the computer by using the Windows PE image from CD, DVD, PXE, and or a UFD.
(This capability is supported only in the version of Windows PE that is available with Windows Server
2003 Service Pack 1.)
2. Windows PE starts and processes STARTNET.CMD to load the network services and then passes
control to a custom batch file, which you learn about later in this document.
3. The custom batch file maps a drive letter to the network share containing the operating system that
you’re installing.
4. The custom batch file inspects the computer’s configuration to make sure that it matches the
requirements for the operating system that you’re installing.
5. The custom batch file backs up the user’s data to the network, which is possible because Windows
PE has full access to NTFS-formatted partitions.
6. The custom batch file runs DISKPART to partition the disk and format the partitions.
7. The custom batch file runs the setup program from the network share to install the operating system
fully unattended. Alternatively, the batch file can run a third-party disk-imaging utility to restore an
operating system image from the network share to the hard disk.

Customized, installing from boot media. You can create a Windows PE image that contains both
Windows PE and the operating system you’re installing and then customize the image so that it
automatically installs the operating system when the Windows PE image starts. Because more powerful
scripting capabilities are available with Windows PE than with MS-DOS, you’re more able to completely
automate the process. You can then distribute the CD to users so that they can automatically install the
operating system. Temporary labor is also able to install the operating system, freeing full-time associates
to focus on other tasks. This scenario might look like the following:
1. The user boots the computer by using the Windows PE image from CD, DVD, PXE, or a UFD. (This
capability is supported only in the version of Windows PE that is available with Windows Server 2003
Service Pack 1.)
2. Windows PE starts and processes STARTNET.CMD to load the network services and then passes
control to a custom batch file, which you learn about later in this document.
3. The custom batch file inspects the computer’s configuration to make sure that it matches the
requirements for the operating system that you’re installing.
Windows Preinstallation Environment Technical Overview
11
4. The custom batch file backs up the user’s data to the network, which is possible because Windows
PE has full access to NTFS-formatted partitions.
5. The custom batch file runs DISKPART to partition the disk and format the partitions.
6. The custom batch file runs the setup program to install the operating system fully unattended.
Alternatively, the batch file can run a third-party disk-imaging utility to restore an operating system
image to the hard disk.
If you have a Microsoft Windows Active Directory® environment with RIS installed, you can become even
more productive by loading the Windows PE CDs mentioned in the previous bullets in to RIS. Then, rather
than starting computers with physical CDs, you start Windows PE remotely by using RIS. Contrast starting a
Windows installation in a few seconds to the several minutes required when using an MS-DOS–bootable disk.
Maintenance and Troubleshooting
The second scenario in which Windows PE can make your job easier is maintenance and troubleshooting.
Specifically, Windows PE is an invaluable tool for recovering data from failed computers as well as diagnosing
and repairing them. Examples include the following:

Replace system files. You can replace corrupted files from the original installation media. For example,
if a corrupted system file is preventing a server from starting, you can start the computer by using
Windows PE and then replace the file from a Windows product CD or from the network.

Run 32-bit diagnostic tools. The tools that Windows PE provides are far more powerful than the tools
that MS-DOS provides. In fact, as the disks on most computers that are running Windows XP
Professional are formatted using NTFS, MS-DOS tools can’t even access them. Windows PE can.

Recover data before reinstalling Windows. Windows PE provides full access to NTFS file systems.
When you’ve decided to reinstall the operating system on the computer, you can start it with Windows PE
first and then copy important data files off of it.
Windows PE allows you to access the NTFS file system without regard to the access control lists placed on
the file system. As a result, if you can physically access a Windows PC with Windows PE, you can circumvent
the NTFS permissions on the file system. If your system contains sensitive data, it is recommended that you
investigate Encrypting File System (EFS) to help protect the data from unauthorized access. See the
Distributed Systems Guide in the Windows 2000 Server Resource Kit for more information about
implementing EFS.
Windows Preinstallation Environment Technical Overview
12
Windows PE Deployment
You can deploy Windows PE on removable media, nonremovable media, and RIS. Table 2 compares the
different deployment methods, and the sections following this one describe them in more detail.
Table 2. Windows PE Deployment Methods
Disconnected PCs
Networked PCs
Active Directory
64-bit Windows
Third-Party Tools
Removable Media
Yes
Not recommended
Not required
Yes
Not required
RIS
No
Yes
Required (by RIS)
No
Not required
Nonremovable Media
Yes
Not recommended
Not required
Yes
Useful
Windows PE CDs
When you build a customized Windows PE image, a process you learn more about later in this document, the
result is an ISO image that you can write to a CD by using most popular CD-burning programs that support
burning ISO-9660 images. Or you can use that ISO image with third-party PXE or RIS servers for
downloading over a network. Customizing, building, and burning the ISO image to a CD is a cycle that you
can repeat.
Remote Installation Service
To speed the deployment process, you can start the target computer with Windows PE by using RIS, an
optional component of Microsoft Windows 2000 Server and Windows Server 2003. The benefit of starting
Windows PE from the network is that you don’t need to start the computer manually by using a bootable CD.
This method is available for the 32-bit versions of Windows PE but not the 64-bit version. For more
information about the requirements for using RIS, see the Technical Guide to Remote Installation Services.
Also, running Windows PE from Windows 2000 RIS servers requires you to install an update for Risetup.exe.
The Knowledge Base article 304314 describes how to install this update.
The following prerequisites are required for starting Windows PE from RIS:

A Windows product CD and Windows PE CD with the same build number

A properly configured Windows 2000 Service Pack 2 or Windows Server 2003 RIS server

A client computer that includes a PXE-enabled NIC or a NIC that supports the RIS boot disk
Windows Preinstallation Environment Technical Overview
13
Nonremovable Media
You can install a customized version of Windows PE on a hard disk, which is useful for preinstalling an
operating system or creating a hard disk-based recovery solution, particularly for laptop computers. For
example, you can install Windows PE on a small partition and the operating system on another partition. This
configuration supports disaster recovery scenarios by preventing the need for boot media to start the PC and
source files for reinstalling the operating system, recovering data from the computer, or repairing the
configuration. This scenario requires you manipulate the boot entries in the Master Boot Record to activate
each volume and hide the volume containing Windows PE. This scenario usually requires a third-party utility.
Windows Preinstallation Environment Technical Overview
14
Windows PE Customization
The Windows PE CD that you receive from Microsoft contains scripts for creating either a 32-bit version of
Windows PE or a 64-bit version of Windows PE. It’s likely that you’ll want to customize Windows PE for
different purposes, such as building an Image for 64-bit computers or including additional device drivers. To
support customizing Windows PE, the CD you received from Microsoft includes a collection of scripts and
utilities. The process of building a customized version of Windows PE works similar to the following example
(for detailed instructions, see the Windows Preinstallation Environment User’s Guide—Winpe.chm on the
Windows PE CD):
1. Copy the Winpe folder from the Windows PE CD to a folder on your hard disk and customize it as
described in the sections following this one.
2. Do one of the following:
o
Place the 32-bit Windows product CD in the drive.
o
Place the 64-bit Windows product CD in the drive and insert a floppy disk in drive A, which the build
process uses for temporary storage.
3. Run the command mkimg.cmd source destination [image] in the folder to which you copied the
Windows PE CD. Source is the location of the Windows product CD without a trailing slash (use D: and
not D:\). Destination is the folder in which temporary files will be stored. Mkimg.cmd creates this folder if
it doesn’t already exist. Image is the path and file name of the ISO image you want to create.
The entire process takes several minutes, and creates a directory structure of the Windows PE files; you can
choose to have it create an ISO image file that you can burn to a CD or DVD, or use with third-party RIS- or
PXE-based servers.
You can build a custom version of Windows PE by using any version of Windows XP or Windows Server
2003, except for Windows XP Home Edition or Windows Datacenter Server 2003. However, be aware that in
order to obtain the latest features included with the interim versions of Windows PE, you will need to create
the custom version of Windows PE from either Windows XP Service Pack 2 or Windows Server 2003 Service
Pack 1.
Languages
Windows PE doesn’t support multilanguage builds—only individual-language localized builds. However, you
can use a single set of tools to build multiple, localized Windows PE images in various languages without
needing localized Windows PE tools for each one of those languages.
You use the RegionalSettings section in the Config.inf file to add support for multiple languages. You must
always match the Language value to the language of the Windows product CD that you’re using to build the
Windows PE image. Then, you use the LanguageGroup value to specify the languages of both the Windows
PE tools and the Windows product CD. For a list of the specific languages that correspond to particular
language groups, see the Microsoft Global Software Development Web site.
Windows Preinstallation Environment Technical Overview
15
For example, to create a Japanese Windows PE image by using a Japanese Windows product CD, set
LanguageGroup=1,7 and Language=0x0411 in the RegionalSettings section of Config.inf. The language
group ID for Western Europe and United States is 1, and 7 is the language group ID for Japanese. The local
ID (LCID) for Japanese is 0x0411, which matches the local of the Windows product CD. Adding 1 to the
LanguageGroup value ensures that you can use the English preinstallation tools.
Device Drivers
Windows PE supports network, audio, video, motherboard chipsets, battery, mass-storage, and a variety of
other 32-bit and 64-bit device drivers. Windows PE supports all the network drivers included on the Windows
product CD. When customizing a Windows PE image, you can add, remove, or replace network drivers as
necessary. And beginning with the interim versions of Windows PE, you can inject in 32-bit and 64-bit device
drivers with Plug and Play Boot support.
For example, you can remove unnecessary network drivers to reduce the size of the image and the time
required to boot. After completing the following two steps, the factory command in STARTNET.MCD
automatically identifies the network drivers that you add:
1. Copy the driver’s .inf files to %SYSTEMROOT%\Inf (the matching catalog file isn’t necessary).
2. Copy the driver’s .sys and related files to %SYSTEMROOT%\System32\drivers.
In addition to adding, removing, and replacing network drivers, you can limit the number of network adapters
that the factory command scans by using the netcards section of the Winbom.ini file. When this command
runs from the STARTNET.CMD batch file, it will only scan for the network adapters in this section, resulting in
a faster boot time. In order to add network adapters to this section, you must know the adapter’s Plug and
Play ID and the path of its .inf file. The following example shows the values necessary to specify the adapter’s
specific Plug and Play ID as well as its more generic ID, which ensures that it matches any network adapter
supported by the driver:
[NetCards]
PCI\VEN_10B7&DEV_9200&SUBSYS_100010B7&REV_78\3&61AAA01&0&78=%systemroot%\nic\netel90b.inf
PCI\VEN_10B7&DEV_9200&SUBSYS_100010B7=%systemroot%\nic\netel90b.inf
Mass-Storage Drivers
Configuring a limited set of mass-storage drivers can reduce the boot time of Windows PE. Instead of loading
the entire set of mass-storage drivers that the Windows product CD natively supports, Windows PE just loads
the drivers that you specify in the Winpeoem.sif file, which is in %SYSTEMROOT%\System32. You can also
configure this file to support additional mass-storage drivers that the Windows product CD doesn’t natively
support. The Winpeoem.sif file has the following three sections for controlling mass-storage drivers:

MassStorageDrivers.Append. Specifies one or more third-party mass-storage drivers that a custom
version of Windows PE loads in addition to the entire set of drivers that the Windows product CD
supports. You copy the driver files to the %SYSTEMROOT%\System32\Drivers folder and copy
supporting files to the appropriate locations as specified in the driver’s .inf file.

MassStorageDrivers.Replace. Specifies one or more third-party mass-storage drivers that a custom
version of Windows PE loads instead of the entire set of drivers that the Windows product CD supports.
You copy the driver files to the %SYSTEMROOT%\System32\Drivers folder and copy supporting files to
the appropriate locations as specified in the driver’s .inf file.
Windows Preinstallation Environment Technical Overview
16

OEMDriverParams. Specifies non–Plug and Play drivers for Windows PE to load in addition to the drivers
that Windows XP natively supports. See the Windows Preinstallation Environment User’s Guide
(Winpe.chm on the Windows PE CD) for detailed instructions about using this section.
The F6 option to add mass-storage drivers will still work when starting Windows PE.
Components
You can add the following components to a customized Windows PE image:

ActiveX Data Objects. ADO enables your client applications to access and manipulate data from a
database server through an OLE DB provider. Its primary benefits are ease of use, high speed, low
memory overhead, and a small disk footprint. ADO supports key features for building client/server and
Web-based applications. Windows PE doesn’t support ADO access to Active Directory and ADSI.

HTML Applications. HTML Applications (HTAs) are full-fledged applications. These applications are
trusted and display only the menus, icons, toolbars, and title information that the Web developer creates.
In short, HTAs include all the power of Microsoft Internet Explorer—its object model, performance,
rendering power, protocol support, and channel-download technology—without enforcing the strict
security model and user interface of the browser. You can use the HTML and Dynamic HTML (DHTML)
that you already know to create HTAs.

Windows Scripting Host Technologies. Windows Scripting Host (WSH) is a language-independent
host that allows you to run any script engine on the Windows operating system. Windows PE provides
support for adding in Windows Scripting Host, which will provide support for both

Other applications and components. To install other applications and components, you will need to
experiment with registering the various companion DLLs and using several tools to understand the
dependencies of the application. Microsoft doesn’t make any guarantees or maintain a list of applications
that will or will not function in Windows PE. The vendor must supply support for an application in this
environment. You will find it useful to have the following tools, which are included on the Windows product
CD, available to help you with the process:
o
Windiff.exe from the Windows Support Tools
o
Depends.exe from the Windows Support Tools
o
File Monitor (FileMon from Sysinternals)
o
Registry Monitor (RegMon from Sysinternals)
Windows Preinstallation Environment Technical Overview
17
Summary
All Enterprise Agreement, Software Assurance Membership, School Agreement, and Campus Agreement
customers will receive Windows PE. By taking advantage of it, you’re better able to deploy and support
Windows desktops and servers. First, the deployment process becomes more streamlined because you’re
better able to automate it by using Windows PE. Second, the maintenance and troubleshooting tools are far
more powerful in Windows PE than in MS-DOS. Last, rather than wasting countless hours building and
maintaining MS-DOS–bootable disks for deployment preparation, you can focus on more important tasks. The
bottom line is that using Windows PE will make you more productive than continuing with the legacy methods
we all have relied on in the past.
Windows Preinstallation Environment Technical Overview
18
For More Information

Software Assurance Membership

Technical Guide to Remote Installation Services

Windows Preinstallation Environment

Windows Scripting Host Code Samples on MSDN

Windows Preinstallation Environment User’s Guide (Winpe.chm on the Windows PE CD)
Windows Preinstallation Environment Technical Overview
19