Deploying Windows XP, Using the Windows PE Page 2

By Marcin Policht (Send Email)
Posted Feb 15, 2008


Enter WinPE

Discuss this article in the ServerWatch discussion forum

Unsure About an Acronym or Term?
Search the ServerWatch Glossary
 

Fortunately, the majority of the issues described above can be resolved by employing a technology called Preinstallation Environment (or simply Windows PE or WinPE), which Microsoft has recently made available. It is a stripped-down version of the Windows operating system designed specifically for deployment scenarios.

Windows PE includes built-in features intended to prevent its use as a client operating system (and thus ward off licensing violations), such as forced reboot after 24 hours of uptime and a significantly limited feature set (which also resulted in faster and more compact code). In particular, Microsoft decided not to include a number of programming interfaces, such as the Active Directory Services Interface, DirectX, and OpenGL. Missing also is support for applications developed with the .NET Framework or 16-bit code relying on the WOW32 subsystem.

This is because the standard version of WinPE is implemented in 32-bit code based on the Windows XP Professional kernel (although there is also a 64-bit Itanium version) and as such, it natively supports only 32-bit programs. On the other hand, this also means it works with the same set of network and mass storage device drivers as its full-featured counterpart, which eliminates the need for the lengthy process of updating bootable media to connect to a server containing installation source files or to access a local hard drive, as it is the case with floppy-based installations. Note, however, that some modifications might be needed when dealing with hardware that requires vendor-specific drivers.

Connectivity must be established via TCP/IP and is limited to outgoing connections only (resource sharing is disabled).

WinPE is part of the Microsoft Windows XP OEM Preinstallation Kit (OPK), which, besides the WindPE CD, includes a number of supplemental utilities, including Setup Manager and System Preparation Tool (these are full-featured versions, considerably more enhanced than their counterparts located in the DEPLOY.CAB file included with the retail Windows products). They enable the full automation of the process of installing Windows 2000, 2003, and XP. You can use the original CD to load the operating system, connect to a network share containing Windows XP, 2000, or 2003, and launch their installation. However, to fully realize the power and flexibility of Windows PE, you must customize its content.

The initial steps required to accomplish this are described in the Microsoft Knowledge Base article How to create a custom startup WinPE CD-ROM in Windows XP and involve copying WinPE source files to a local folder, placing Windows XP Professional (or Windows 2003 Server) CD in a CD-ROM drive, and running the MKIMG batch file (included with WinPE) with parameters, which designate their paths. The resulting files are stored in the same location as the original copy of WinPE (it is also possible to generate an ISO image that can be used to burn a custom-bootable CD). If you intend to further modify WinPE by adding any type of 32-bit utilities, batch files, or scripts, you must store them in the same location. At that point, you will probably also want to enable support for Windows Script Host, Windows Management Instrumentation, ActiveX Data Objects, or HTML Applications by running the BuildOptionalComponents.vbs script included with WinPE.

To take advantage of additional software and scripting capabilities, modify the content of STARTNET.CMD (since this is the first batch file that is loaded when the WinPE operating system starts). This file invokes other batch files, scripts, and utilities. For example, FACTORY.EXE is responsible for plug-and-play enumeration and configuration of networking settings, which, in turn, rely on values stored in the WinBOM.ini file (alternatively, network settings can be managed with the NETCFG utility). Other common changes include adding or removing network adapter and mass storage controller drivers.

For more detailed information on these (and other) WinPE utilities, refer to the "Windows Preinstallation Environment User's Guide," which is in the WinPE.chm help file stored in the Docs folder on the original installation CD).

Once all customizations are completed, you must execute OSCDIMG.EXE utility, which generates a new ISO image (providing the source for another bootable CD). Following this procedure, you can perform unattended installation of an operating system using Windows PE in one of three ways:

  • Booting from a Windows PE CD (or DVD) which contains a copy of the operating system source files.
    This method has one major drawback, which is in the area of change management. Practically every modification to the installation process forces you to replace existing source media with new ones, making version control difficult and time consuming. It is, however, the only option that can be used with stand-alone systems or the ones on the remote end of a slow network link (although it is also possible to use a variation of this method, involving a USB or FireWire-attached external bootable hard drive).

  • Booting from a Windows PE CD and connecting to a network share where target operating system files are stored.
    This approach eliminates issues inherent to the one listed above, since majority of changes can be made on the server containing operating system files (and other custom components) while the boot media can remain the same. In addition, you are not limited to the capacity of a single CD (although if your computers have bootable DVD drives, this is probably not a relevant factor). On the other hand, this method is not suitable for stand-alone computers or systems in remote locations connected via slow WAN links.

  • Using PXE functionality to connect to a RIS server containing a WinPE-based image.
    This provides a superior degree of automation and ease of maintenance, since installation can be triggered by simply rebooting a target computer (which can be done remotely, providing that Wake-on-LAN functionality is supported), and all files are stored on an installation server, where they can be easily modified. On the other hand, this solution is subject to the previously discussed limitations inherent to Remote Installation Services, such as dependencies on Active Directory infrastructure and PXE-compliant network adapters. It, too, cannot be used to install an operating system on stand-alone computers.

Regardless of which approach is taken, the installation process is significantly improved compared with solutions discussed earlier. This results in the following changes:

  • Significantly increased bootable media size (in the case of network-based installation) removes the capacity limit of a floppy disk (the downside, however, is WinPE cannot be used on systems that do not boot from CD-ROM drives).
  • Increased installation speed renders MS-DOS-based installations slower due to a number of factors, such as a 16-bit execution environment, the need for additional reboots, and use of WINNT.EXE (instead of WINNT32.EXE) for launching Windows installation.
  • Hardware support is inherent, as Windows PE and Windows XP use the same set of network adapter and mass storage device drivers. This means that the need to include additional drivers should be relatively rare.
  • Enhanced scripting capabilities are available in addition to the out-of-the-box capability to process standard Windows batch files (and some of Windows XP utilities, such as DISKPART, which allows you to automate disk management tasks). Windows PE can be configured (as mentioned earlier) to support WSH (Windows Scripting Host), WMI (Windows Management Instrumentation), and ADO (ActiveX Data Objects) object models as well as HTA (HTML Applications) functionality.

Unfortunately, Windows PE has one major drawback. It is available only through Microsoft Authorized Distributors — although it is provided by default to Enterprise Agreement (EA) and Software Assurance Membership (SAM) customers. Licensing for it is also included in the Operating System Deployment Feature Pack, which in turn is free of charge for current Microsoft Systems Management Server users. For more information on licensing requirements of WinPE, refer to the Volume Licensing section of the Microsoft Web site.

Original date of publication, 06/01/2005

Page 2 of 2


Comment and Contribute

Your name/nickname

Your email

(Maximum characters: 1200). You have characters left.