来自于---http://blog.donews.com/digivelop/
Windows PE 2.0 for Windows Vista 概述
发布者 Tony Northrup
Windows PE 2.0 是 Windows Vista 的核心部署基础。它旨在使新 Windows Vista 操作系统的大规模自定义部署变得特别容易。当 Windows Vista 启动时,所有 Windows Vista 公司客户都将可以使用 Windows PE 2.0。(Windows PE for Windows XP 仍为拥有 Microsoft 的“软件担保”(SA) 协议的客户所独有。)Windows PE 使用户可以注入驱动程序、离线配置 Windows Vista、提供恢复解决方案以及对系统问题进行诊断和故障排除。
在 2006 年 2 月,对于参与 Windows Vista 预发行版本程序的所有公司客户,将可获得一个为 Windows Vista 生成的 Windows PE 2.0 的预发行版本,用于下载和测试。
摘要
Microsoft Windows Preinstallation Environment (Windows PE) 2.0 为 Windows Vista 操作系统提供了强大的准备和安装工具。利用 Windows PE,您可以从网络或可移动媒体(提供安装 Windows Vista 和排除其故障所必需的网络和其他资源)启动 Windows Vista 的子集。本文介绍 Windows PE、其功能以及早期预安装技术的改进。
本页内容
简介
使用 Windows PE 进行安装
使用 Windows PE 进行故障排除
Windows PE 技术
Windows PE 2.0 与早期技术的对比
摘要
简介
Microsoft Windows Pre-installation Environment (Windows PE) 2.0 是 Microsoft 开发的一个引导工具,它提供用于安装、故障排除和恢复的操作系统功能。Windows PE 不是通用的操作系统,而是专用于三个特殊任务:
• 安装 Microsoft Windows Vista。每次安装 Windows Vista 时,Windows PE 都会运行。在安装阶段,收集配置信息的图形工具在 Windows PE 内运行。此外,信息技术 (IT) 部门可以自定义 Windows PE 并将其扩展,以满足他们的独特部署需求。
• 故障排除。Windows PE 还有助于自动和手动进行故障排除。例如,如果由于一个损坏的系统文件而导致 Windows Vista 启动失败,Windows PE 可以自动启动“Windows 恢复环境”。您还可以手动启动 Windows PE,以使用内置或自定义的故障排除和诊断工具。
• 恢复。“原始设备制造商”(OEM) 和“独立软件供应商”(ISV) 可使用 Windows PE 生成自定义、自动化的解决方案,以恢复和重新生成正在运行 Windows Vista 的计算机。例如,用户可以从 Windows PE 恢复 CD 或恢复分区启动他们的计算机,以自动重新格式化其硬盘,并重新安装带有原始驱动程序、设置和应用程序的 Windows Vista。
本文面向 IT 专业人员,描述了 Windows PE 的安装和故障排除功能,但不讨论 OEM 和 ISV 如何使用 Windows PE 来进行恢复。
基本上,创建一个管理员可用来有效跟踪问题区域并进行修复的标准化方法可节省花费在解释复杂错误日志上的宝贵时间。管理员可以将本文中的信息用作工具和检验清单,以减少花费在解决失败连接上的时间。在寻求“Microsoft 产品支持服务”的帮助之前,它还可帮助管理员解决自己的问题。
注意:由于 Windows PE 被专门设计成一个用于配置、安装 Windows Vista 和排除其故障的工具,故不可将 Windows PE 与 Windows Vista 分开单独购买。
返回页首
使用 Windows PE 进行安装
Microsoft 已将 Windows PE 设计作为预安装环境以代替 MS-DOS。Windows PE 以 Windows Vista 组件为基础而构建,从而提供了一个强大、灵活而又熟知的环境。事实上,Windows PE 可以运行许多 Windows Vista 应用程序,检测和启用大部分现代硬件,并通过“Internet 协议”(IP) 网络进行通信。Windows PE 通常占用不到 100 MB 的磁盘空间,并可完全从“随机存取存储器”(RAM) 运行,从而使您可以插入第二张包含驱动程序或软件的 CD 来使用。这些功能使 Windows PE 可以在当前未格式化硬盘或未安装操作系统的计算机上运行。然而,和 Windows Vista 不同,Windows PE 并不是一个功能齐全的操作系统。
自定义 Windows Vista 安装
但无论如何,企业都会感激 Windows PE 的出现,因为 IT 部门将能够创建脚本和应用程序以使部署自动化。例如,IT 部门可使用以下流程配置一个“Windows 部署服务”远程部署基础结构,创建一个配置脚本,并生成一个自定义 Windows PE 映像,以启用高度自动化的部署流程:
1.
当一台新计算机连接到网络时,内置的“预引导执行环境”(PXE) 客户端连接到“Windows 部署服务”服务器,并通过网络下载自定义的 Windows PE 映像。
2.
新计算机将 Windows PE 载入内存,并启动配置脚本。该脚本验证计算机的配置是否满足 IT 部门的硬件要求。
注意:“Windows 部署服务器”(Windows DS) 替代了“远程安装服务”(RIS)。
3.
如果必要,该脚本会将用户数据备份到另一台计算机上的一个共享文件夹中。
4.
该脚本运行 Diskpart 工具将磁盘分区并格式化。
5.
该脚本连接到一个包含“Windows Vista 安装”文件的共享文件夹,并运行“Windows Vista 安装”程序,以在完全无人参与的情况下安装操作系统。
Windows PE 和 Windows 映像格式
分发 Windows PE 的最强大和灵活的方法是利用“Windows 映像格式”(WIM) 文件。WIM 是基于文件的映像格式,Windows Vista 采用这种格式在新计算机上进行快速安装。WIM 文件存储一个或多个操作系统(如 Windows Vista 或 Windows PE)的副本(称为映像)。使用 WIM 文件维护操作系统很容易,因为您可以在未启动操作系统的情况下,离线添加和删除驱动程序、更新内容以及 Windows 组件。利用 WIM 文件维护 Windows PE 映像与维护 Windows Vista 映像非常相似。
与 Windows Vista 相似,Windows PE 可包含在一个 WIM 文件内。但是当您在 WIM 文件中存储一个 Windows Vista 映像时,启动 Windows Vista 的唯一方法是将映像复制到计算机的硬盘中。不过,Windows PE 可直接从一个未复制到硬盘的 WIM 文件启动。该功能使您可以创建一个 WIM 文件,并将其存储在可引导媒体(如 CD 或 USB 闪存驱动器)中,然后直接从该媒体启动 Windows PE。当您在新计算机上安装 Windows Vista 时,Microsoft 使用此功能将 Windows PE 加载到 RAM 中并启动 Windows PE。
返回页首
使用 Windows PE 进行故障排除
尽管 Windows PE 的主要用途是安装 Windows Vista,但您还可以使用 Windows PE 进行故障排除。故障排除任务的示例包括:
• 替换系统文件。您可以替换原始安装媒体上的损坏文件。例如,如果损坏的系统文件妨碍了计算机启动,则可以使用 Windows PE 来启动计算机,然后替换 Windows Vista 媒体中的损坏文件。
• 在重新安装 Windows 之前恢复数据。Windows PE 提供对 FAT 和 NTFS 文件系统的完全访问权限。在您必须更换或重新格式化硬盘的情况下,您可以首先用 Windows PE 启动计算机,然后将重要文件复制到另一个磁盘或共享文件夹中。请注意,利用“加密文件系统”(EFS) 加密的文件不易被恢复。
• 运行诊断和配置工具。Windows PE 包括常用的命令行诊断工具。您还可以在 Windows PE 内运行其他标准和自定义 Windows 故障排除工具。内置工具包括:
• Diskpart。Diskpart 为文本模式的命令解释程序,它允许您通过命令提示符或脚本来管理磁盘、分区或卷。
• Drvload。您可使用 drvload 命令将设备驱动程序(如音频、视频和母板芯片集)添加到 Windows PE 映像中。在 Windows PE 已经启动后,您还可使用 drvload 动态加载驱动程序。
• Net。Net 命令行工具允许您管理本地用户数据库、启动和停止服务以及连接共享文件夹。
• Netcfg。该网络配置工具可配置网络访问。当将 Windows PE 作为自定义部署工具使用时,您可能会使用 Netcfg 将网络设置作为部分启动脚本来手动配置。
返回页首
Windows PE 技术
为使 Windows PE 尽可能通用,Microsoft 已将其设计得轻巧、强大且灵活。以下部分将更详细地描述这些特征,然后描述 Windows PE 的局限性。
轻巧
Windows PE 必须尽可能小,以便能存储在可移动媒体(如 CD 和 USB 闪存驱动器)中,还必须能够快速启动并可完全存储在计算机的内存中。Windows PE 的确切大小因自定义映像的方式而异,但采用 WIM 格式压缩时,它通常占用不到 100 MB 的空间。64 位版本的 Windows PE 大一些,使用语言包或应用程序自定义 Windows PE 映像增加了其大小。
要帮助最小化内存的使用,可从压缩的映像运行 Windows PE。换言之,您可以在 WIM 文件内压缩 Windows PE,并在未解压的情况下从内存运行它。因此,无论是在磁盘上存储映像时还是在将其加载到计算机内存后,您都将因采用了压缩而受益匪浅。
为了最小化磁盘存储,WIM 格式仅存储多个重复文件的单个实例。因此,如果您有含两个 Windows PE 映像的 WIM 文件,将只存储一次两个映像所共享的文件。
强大
尽管 Windows PE 被设计得很小,但它包含 Windows Vista 的大量核心功能。因为 Windows PE 支持 Win32(就像 Microsoft Windows XP 和 Windows Vista 一样),所以大多数 Windows 应用程序都能在 Windows PE 中运行。这意味着 IT 部门的开发人员可以使用 Microsoft Visual Studio 这样的工具来创建在 Windows PE 上运行的 Win32 应用程序。
Windows PE 还支持多线程和多任务处理,因此您可以同时运行多个工具。此功能节省了采用其他技术时需要用来验证和测试硬件和软件映像的时间和资源。Windows PE 还可以运行批处理文件、Microsoft Visual Basic Scripting Edition (VBScript) 脚本、Windows Script Host (WSH) 脚本(如果已安装可选的 WSH 组件)、HTML 应用程序 (HTA) 和 Microsoft ActiveX 数据对象 (ADO)。因为 Windows PE 提供基于 RAM 的临时空间,所以 Windows PE 可以运行那些需要具有将临时文件写入硬盘(既便没有可用硬盘)的功能的应用程序。
为了最小化磁盘存储,WIM 格式仅存储多个重复文件的单个实例。因此,如果您有含两个 Windows PE 映像的 WIM 文件,将只存储一次两个映像所共享的文件。
注意:一些应用程序(如游戏)不能在 Windows PE 上运行,但这不是 Windows PE 的设计意图。Windows PE 当前还不支持 Microsoft .NET Framework。
灵活
如果 Windows Vista 包含计算机硬件的驱动程序,那么您的硬件也将能使用 Windows PE,这是因为 Windows PE 包含了多数 Windows Vista 驱动程序。您还可以将新驱动程序添加到一个 Windows PE 映像中。在企业环境中,您可以将组织中任何计算机所需的每个驱动程序添加到一个单独的 Windows PE 映像中,以使该映像能与您的计算机共用。
对于使用特殊硬件的计算机,您可以在 Windows PE 启动后安装一个驱动程序,并立即使用该硬件而不必重新启动计算机。例如,如果您启动 Windows PE 并发现它不包含正确的网络驱动程序,您可以插入一张包含所需驱动程序的 CD,然后使用 Drvload 命令行工具来注入驱动程序,以使您可以连接网络。此功能是可以实现的,因为 Windows PE 可以直接从计算机的 RAM 运行,如本部分的后面所述。
尽管 Windows PE 包括大量内置功能,但许多工具和功能均为可选,以使 Windows PE 尽可能轻巧。例如,在标准 Windows PE 映像中不包括 WSH。但如果您需要 WSH 组件以运行脚本,可以很容易地进行添加。同样,您可将故障排除工具(如 Tracert 或您自己的自定义工具)添加到自定义的 Windows PE 映像中。您还可使用同一离线映像编辑工具来安装更新内容和服务包,以使 Windows PE 保持最新。
大多数操作系统(如 Windows XP 或 Windows Vista)需要从硬盘运行。您可从多种引导媒体或网络(例如,使用 WDS)来启动 Windows PE。Windows PE 支持 X86、X64 和 IA64 体系结构,因此,您可将相同的预安装和故障排除环境用在您组织的所有计算机中。Windows PE 既可以连接到 IPv4 网络(由大多数组织使用以及在 Internet 上使用),又可以连接到 IPv6 网络。通过编辑基于文本的 Unattend.xml 文件,可以更改 Windows PE 的启动设置。
尽管您可以直接从硬盘或可移动媒体运行 Windows PE,但您也可以选择直接从内存运行 Windows PE。如果您选择从内存运行 Windows PE,Windows PE 引导载入程序将首先在内存中创建一个虚拟 RAM 磁盘。然后,引导载入程序将压缩版本的 Windows PE 复制到 RAM 磁盘。最后,引导载入程序安装 RAM 磁盘,就好像它是一个磁盘驱动器一样,并启动 Windows PE。从 RAM 加载 Windows PE 可提供附加的灵活性,因为您可在 Windows PE 启动后移去 Windows PE 媒体。因此,您可从一张 CD 加载 Windows PE,然后用包含工具或驱动程序的第二张 CD 替换该 CD。当从内存运行 Windows PE 时,它支持将临时文件写入虚拟 RAM 磁盘,此虚拟 RAM 磁盘不可使用只读媒体(如 CD)。
Windows PE 的局限性
由于 Windows PE 被设计为尽可能轻巧、强大而且灵活,因此它具有以下局限性:
• 计算机必须有最低 256 MB 的 RAM。
• Windows PE 不适合在软盘中提供,但您可将 Windows PE 映像写入到可引导 CD 中。
• Windows PE 需要一个与“视频电子标准协会”(VESA) 兼容的显示设备,并将使用它能确定支持的最高屏幕分辨率。如果 Windows PE 不能检测视频设置,它将使用 640 × 480 像素的分辨率。
• Windows PE 仅对独立 DFS 根目录支持“分布式文件系统”(DFS) 名称解析。
• 您不能从另一台计算机访问运行 Windows PE 的计算机上的文件或文件夹。换言之,Windows PE 不提供服务器功能。
• Windows PE 既支持 IPv4 又支持 IPv6,但它不支持其他协议,如网间分组交换/顺序分组交换 (IPX/SPX) 协议。
• 会话间的驱动器符号分配是不固定的。重新启动 Windows PE 后,将按默认顺序分配驱动器符号。
• Windows PE 不支持 .NET Framework。
• 因为不支持 Windows on Windows (WOW),所以在 32 位版本的 Windows PE 中不能运行 16 位应用程序,而在 64 位版本的 Windows PE 中不能运行 32 位应用程序。
• 为防止将 Windows PE 作为通用操作系统使用,在初始引导程序启动 24 小时后,将自动重新启动 Windows PE。
此外,Windows PE 仅有一个 Windows Vista Win32 应用程序编程接口 (API) 的子集,其中包括 I/O (磁盘和网络)和核心 Win32 API。需要下述任意一个 Win32 API 的应用程序将不能在 Windows PE 中运行:访问控制、NetShow Theater Administration、OpenGL、电源管理选项、打印和打印假脱机系统、静止图像、磁带备份、终端服务、用户配置文件、Windows 站和桌面、Windows 多媒体以及 Windows shell。
返回页首
Windows PE 2.0 与早期技术的对比
如果您曾经将 MS-DOS 或以前版本的 Windows PE 作为部署或故障排除工具使用,您可能会对 Windows PE 如何改进这些技术发生兴趣。以下部分将讨论 Windows PE 如何对 MS-DOS 或以前版本的 Windows PE 的使用进行改进。
Windows PE 2.0 与 MS-DOS 引导盘的对比
您可以使用 Windows PE 代替 MS-DOS 引导盘执行以下任务,并在更短的时间内更顺利地完成:
• 创建和格式化磁盘分区,包括 NTFS 文件系统分区。Windows PE 允许您使用 NTFS 文件系统格式化磁盘,而无需使用第三方实用程序。而且,Windows PE 提供的文件系统实用程序可脚本化,因此您完全可以进行自动化分区和格式化。
• 访问网络共享以运行故障排除工具和安装操作系统。Windows PE 提供与 Windows Vista 类似的网络客户端功能。事实上,Windows PE 提供的网络驱动程序与 Windows Vista 随附的网络驱动程序相同,允许您快速、轻松地访问网络。相比而言,自定义 MS-DOS 引导盘以访问网络共享的过程却总是既浪费时间,又单调乏味。
• 加载和访问 32 位和 64 位设备驱动程序,用于音频、视频、母板芯片集、电池和其他使用 Windows Vista 驱动程序的设备。Windows PE 提供加载 Windows 大容量存储器、网络连接、音频、视频和其他类型驱动程序的功能。而如果使用 MS-DOS,您就必须找到 16 位驱动程序,自定义 MS-DOS 引导盘并维护用于不同网络适配器的不同磁盘。
• 自动化任务。Windows PE 中的脚本编写功能远远超出 MS-DOS 引导盘的功能。例如,Windows PE 使用 VBScript,它是一种功能强大的脚本编写语言,比 MS-DOS 的批处理文件更容易使用。Windows PE 在其运行的系统上支持千兆字节的内存,并使用受保护模式的“传输控制协议/Internet 协议”(TCP/IP) 堆栈提供网络连接支持。通过编辑一个基于文本的“可扩展标记语言”(XML) 文件,您可以轻松地添加启动脚本或应用程序。如果您已经创建了用于 MS-DOS 的脚本,您或许能在 Windows PE 中使用它们;否则,您可以轻松地将现有的基于 MS-DOS 的脚本导入到 Windows PE 中。
• 运行 Win32 应用程序。将 MS-DOS 用作预安装和排除操作系统故障的一个缺点是您只能运行专为 MS-DOS 编写的应用程序。由于 Windows PE 支持多数重要的 Microsoft Win32 API,所以 Windows PE 可以运行大部分图形和基于控制台的 Windows 应用程序。此外,由于 Windows PE 支持多线程和多任务处理,您还可以同时运行多个工具。
Windows PE 2.0 与以前版本的 Windows PE 的对比
对于许多 Microsoft 客户,Windows PE 2.0 将是他们采用的第一个环境。但如果您曾使用过 Windows PE 1.0,您可能对了解 Windows PE 2.0 如何改进感兴趣。本部分讨论对现有 Windows PE 用户而言对 Windows PE 1.0 进行的明显改进。
首先,Windows PE 2.0 基于 Windows Vista 组件,而早期版本的 Windows PE 则是基于 Windows XP 或 Microsoft Windows Server 2003。因此,Windows PE 2.0 支持 Windows Vista 驱动程序并受益于许多 Windows Vista 的改进(包括通过 Windows 防火墙提供的防网络攻击方面的改进)。如前所述,Windows PE 2.0 现在支持驱动程序注入,这使您在启动 Windows PE 之前或之后都可以加载驱动程序。现在,如果您启动 Windows PE 并发现它缺少一个必需的驱动程序,您就可以从可移动媒体加载非标准驱动程序,并立即使用该硬件而无需重新启动计算机。
为了更具灵活性,尤其是在创建预安装脚本时,Windows PE 2.0 现在包含已增加内容的“Windows 管理规范”(WMI) 支持。使用 WMI,您可以通过脚本或命令提示符执行大多数配置或管理任务。有关 WMI 的详细信息,请访问
http://msdn.microsoft.com/library/en-us/dnanchor/html/anch_wmi.asp。
过去,许多应用程序不能在 Windows PE 1.0 中运行,因为这些程序需要临时存储空间,并且 Windows PE 经常从不可写入的媒体(如 CD)启动。现在,通过在计算机的 RAM 中提供 32 MB 刻录空间,Windows PE 2.0 可支持大部分需要对临时文件执行写操作的应用程序。每当应用程序试图对临时文件(无论哪个文件夹)执行写操作时,Windows PE 都会将更改内容重定向到内存中的刻录空间,以模拟硬盘。当然,当您重新启动计算机后,所有更改都将丢失。
返回页首
摘要
Windows PE 是一个以 Windows Vista 组件为基础的引导工具。Windows PE 与 Windows Vista 不同,它不是一个通用的操作系统,而是专用于 Windows Vista 的安装、故障排除和恢复。尽管每一个 Windows Vista 安装都依赖于 Windows PE,但一般用户将永远不会知道 Windows PE 的存在。
但是,IT 部门可以自定义和扩展 Windows Vista 以提高部署和故障排除的效率。在部署方面,IT 部门可以将自定义组件、驱动程序和语言添加到 Windows PE 中,以满足他们的特殊需求。他们还可以将配置和安装任务自动化,以生成一个自定义、自动化的 Windows Vista 部署或升级过程。
在故障排除方面,当 Windows Vista 不能正常启动时,Windows PE 将代替 MS-DOS 引导盘进行故障排除。事实上,如果 Windows Vista 无法启动,Windows PE 将自动加载并启动“Windows 恢复环境”。IT 部门还可以使用 Windows PE 进行手动故障排除,并可以利用内置工具或将工具添加到 Windows PE 映像中。
在 Windows Vista 对您的 IT 基础结构的高效性和可靠性所起到的帮助作用中,Windows PE 占据了重要部分。Microsoft 使 Windows PE 尽其所用,目标是为预安装配置和故障排除提供一个轻巧、强大而灵活的特制工具。
From: http://blog.donews.com/digivelop/
Overview of Windows PE 2.0 for Windows Vista
Publisher: Tony Northrup
Windows PE 2.0 is the core deployment foundation of Windows Vista. It is designed to make large-scale custom deployment of the new Windows Vista operating system particularly easy. When Windows Vista starts, all Windows Vista corporate customers will have access to Windows PE 2.0. (Windows PE for Windows XP remains exclusive to customers with Microsoft's "Software Assurance" (SA) agreement.) Windows PE allows users to inject drivers, configure Windows Vista offline, provide recovery solutions, and diagnose and troubleshoot system problems.
In February 2006, a pre-release version of Windows PE 2.0 generated for Windows Vista will be available for download and testing for all corporate customers participating in the Windows Vista pre-release program.
Summary
Microsoft Windows Preinstallation Environment (Windows PE) 2.0 provides powerful preparation and installation tools for the Windows Vista operating system. With Windows PE, you can boot a subset of Windows Vista from a network or removable media, providing the network and other resources necessary for installing and troubleshooting Windows Vista. This article describes Windows PE, its features, and improvements over earlier pre-installation technologies.
Page Content
Introduction
Installing with Windows PE
Troubleshooting with Windows PE
Windows PE Technology
Comparison of Windows PE 2.0 with Early Technologies
Summary
Introduction
Microsoft Windows Pre-installation Environment (Windows PE) 2.0 is a boot tool developed by Microsoft that provides operating system functionality for installation, troubleshooting, and recovery. Windows PE is not a general-purpose operating system but is dedicated to three specific tasks:
• Installing Microsoft Windows Vista. Every time Windows Vista is installed, Windows PE runs. During the installation phase, graphical tools that collect configuration information run within Windows PE. Additionally, information technology (IT) departments can customize and extend Windows PE to meet their unique deployment needs.
• Troubleshooting. Windows PE also helps with automatic and manual troubleshooting. For example, if Windows Vista fails to start due to a corrupted system file, Windows PE can automatically start the "Windows Recovery Environment". You can also manually start Windows PE to use built-in or customized troubleshooting and diagnostic tools.
• Recovery. "Original Equipment Manufacturers" (OEMs) and "Independent Software Vendors" (ISVs) can use Windows PE to create custom, automated solutions to recover and regenerate computers running Windows Vista. For example, users can boot their computers from a Windows PE recovery CD or recovery partition to automatically reformat their hard drive and reinstall Windows Vista with original drivers, settings, and applications.
This article is intended for IT professionals and describes the installation and troubleshooting features of Windows PE but does not discuss how OEMs and ISVs use Windows PE for recovery.
Basically, creating a standardized method that administrators can use to effectively track problem areas and make repairs saves valuable time spent interpreting complex error logs. Administrators can use the information in this article as tools and checklists to reduce the time spent on resolving failed connections. It can also help administrators solve their own problems before seeking help from "Microsoft Product Support Services".
Note: Since Windows PE is specifically designed as a tool for configuring, installing, and troubleshooting Windows Vista, Windows PE cannot be purchased separately from Windows Vista.
Back to Top
Installing with Windows PE
Microsoft has designed Windows PE as a pre-installation environment to replace MS-DOS. Windows PE is built on top of Windows Vista components, providing a powerful, flexible, and familiar environment. In fact, Windows PE can run many Windows Vista applications, detect and enable most modern hardware, and communicate over the "Internet Protocol" (IP) network. Windows PE typically occupies less than 100 MB of disk space and can run entirely from "Random Access Memory" (RAM), allowing you to insert a second CD containing drivers or software for use. These features enable Windows PE to run on computers with currently unformatted hard drives or no operating system installed. However, unlike Windows Vista, Windows PE is not a fully functional operating system.
Customizing Windows Vista Installation
Nonetheless, enterprises will appreciate the emergence of Windows PE because IT departments will be able to create scripts and applications to automate deployment. For example, an IT department can use the following process to configure a "Windows Deployment Services" remote deployment infrastructure, create a configuration script, and generate a custom Windows PE image to enable a highly automated deployment process:
1.
When a new computer connects to the network, the built-in "Pre-Boot Execution Environment" (PXE) client connects to the "Windows Deployment Services" server and downloads the custom Windows PE image over the network.
2.
The new computer loads Windows PE into memory and starts the configuration script. The script verifies that the computer's configuration meets the IT department's hardware requirements.
Note: "Windows Deployment Server" (Windows DS) replaces "Remote Installation Services" (RIS).
3.
If necessary, the script backs up user data to a shared folder on another computer.
4.
The script runs the Diskpart tool to partition and format the disk.
5.
The script connects to a shared folder containing "Windows Vista Installation" files and runs the "Windows Vista Installation" program to install the operating system in completely unattended mode.
Windows PE and Windows Image Format
The most powerful and flexible way to distribute Windows PE is by using the "Windows Image Format" (WIM) file. WIM is a file-based image format that Windows Vista uses for fast installation on new computers. A WIM file stores copies (called images) of one or more operating systems, such as Windows Vista or Windows PE. Maintaining an operating system using a WIM file is easy because you can add and remove drivers, update content, and Windows components offline without booting the operating system. Maintaining a Windows PE image using a WIM file is very similar to maintaining a Windows Vista image.
Similar to Windows Vista, Windows PE can be included in a WIM file. But when you store a Windows Vista image in a WIM file, the only way to boot Windows Vista is to copy the image to the computer's hard drive. However, Windows PE can boot directly from a WIM file that has not been copied to the hard drive. This feature allows you to create a WIM file and store it on a bootable media, such as a CD or USB flash drive, and then boot Windows PE directly from that media. When installing Windows Vista on a new computer, Microsoft uses this feature to load Windows PE into RAM and start Windows PE.
Back to Top
Troubleshooting with Windows PE
Although the main use 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 on the original installation media. For example, if a corrupted system file prevents the computer from booting, you can use Windows PE to start the computer and then replace the corrupted file in the Windows Vista media.
• Restoring data before reinstalling Windows. Windows PE provides full access to FAT and NTFS file systems. In cases where you must replace or reformat the hard drive, you can first boot the computer with Windows PE and then copy important files to another disk or shared folder. Note that files encrypted with the "Encrypting File System" (EFS) are not easily recoverable.
• Running diagnostic and configuration tools. Windows PE includes common command-line diagnostic tools. You can also run other standard and custom Windows troubleshooting tools within Windows PE. Built-in tools include:
• Diskpart. Diskpart is a text-mode command interpreter that allows you to manage disks, partitions, or volumes via the command prompt or scripts.
• Drvload. You can use the drvload command to add device drivers (such as audio, video, and motherboard chipset) to the Windows PE image. You can also use drvload to dynamically load drivers 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. This 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 boot script.
Back to Top
Windows PE Technology
To make Windows PE as universal as possible, Microsoft has designed it to be lightweight, powerful, and flexible. The following sections describe these features in more detail, followed by a description of the limitations of Windows PE.
Lightweight
Windows PE must be as small as possible to be stored on removable media, such as CDs and USB flash drives, and must be able to start quickly and run entirely from the computer's memory. The exact size of Windows PE varies depending on how the image is customized, but when compressed in WIM format, it typically occupies less than 100 MB of space. The 64-bit version of Windows PE is larger, and customizing the Windows PE image with language packs or applications increases its size.
To help minimize memory usage, run Windows PE from a compressed image. In other words, you can compress Windows PE within a WIM file and run it from memory without decompressing it. Therefore, you benefit from compression both when storing the image on disk and after loading it into the computer's memory.
To minimize disk storage, the WIM format stores only a single instance of multiple duplicate files. So if you have a WIM file with two Windows PE images, the files shared by the two images will be stored only once.
Powerful
Although Windows PE is designed to be small, it contains a large number of core features of Windows Vista. Because Windows PE supports Win32 (just like Microsoft Windows XP and Windows Vista), most Windows applications can run in Windows PE. This means that developers in IT departments can use tools like 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 simultaneously. This feature saves time and resources that would otherwise be needed to verify and test hardware and software images using other technologies. 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 (HTA), and Microsoft ActiveX Data Objects (ADO). Because Windows PE provides RAM-based temporary space, Windows PE can run applications that need to write temporary files to the hard drive (even if there is no available hard drive).
To minimize disk storage, the WIM format stores only a single instance of multiple duplicate files. So if you have a WIM file with two Windows PE images, the files shared by the two images will be stored only once.
Note: Some applications, such as games, cannot run on Windows PE, but this is not the intended design of Windows PE. Windows PE currently does not support the Microsoft .NET Framework.
Flexible
If Windows Vista includes drivers for the computer hardware, your hardware will also be able to use Windows PE because Windows PE includes most Windows Vista drivers. You can also add new drivers to a Windows PE image. In an enterprise environment, you can add every driver required by any computer in your organization to a separate Windows PE image so that the image can be used with your computers.
For computers using special hardware, you can install a driver after Windows PE starts and immediately use the hardware without restarting the computer. For example, if you boot Windows PE and find that it does not contain the correct network driver, you can 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 feature is possible because Windows PE can run directly from the computer's RAM, as described later in this section.
Although Windows PE includes a large number of built-in features, many tools and features are optional to keep Windows PE as lightweight as possible. For example, WSH is not included in the standard Windows PE image. But if you need the WSH component to run scripts, it can be easily added. Similarly, you can add troubleshooting tools, such as Tracert or your own custom tools, to a custom Windows PE image. You can also use the same offline image editing tool to install updates and service packs to keep Windows PE up to date.
Most operating systems, such as Windows XP or Windows Vista, require running from the hard drive. You can boot Windows PE from a variety of boot media or network (for example, 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. The boot settings of Windows PE can be changed by editing the text-based Unattend.xml file.
Although you can run Windows PE directly from the hard drive or removable media, you can also choose to run it directly from memory. If you choose to run Windows PE from memory, the Windows PE boot loader will first create a virtual RAM disk in memory. Then, the boot loader copies the 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 can remove the Windows PE media after Windows PE starts. Therefore, you can load Windows PE from a CD and then replace that CD with a second CD containing tools or drivers. When running Windows PE from memory, it supports writing temporary files to the virtual RAM disk, which is not possible with read-only media, such as a CD.
Limitations of Windows PE
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 is not suitable for providing on a floppy disk, but you can write the Windows PE image to a bootable CD.
• Windows PE requires a "Video Electronics Standards Association" (VESA) compatible display device and will use it to determine the highest supported screen resolution. If Windows PE cannot detect the video settings, it will use a resolution of 640 × 480 pixels.
• Windows PE only supports "Distributed File System" (DFS) name resolution for independent DFS roots.
• You cannot access files or folders on a computer running Windows PE from another computer. In other words, Windows PE does not provide server functionality.
• Windows PE supports both IPv4 and IPv6, but it does not support other protocols, such as the Internetwork Packet Exchange/Sequenced Packet Exchange (IPX/SPX) protocol.
• Drive letter assignment between sessions is not fixed. After restarting Windows PE, drive letters are assigned in the default order.
• Windows PE does not support the .NET Framework.
• Because Windows on Windows (WOW) is not supported, 16-bit applications cannot run in the 32-bit version of Windows PE, and 32-bit applications cannot run in the 64-bit version of Windows PE.
• To prevent Windows PE from being used as a general-purpose operating system, Windows PE will automatically restart after 24 hours of the initial boot loader start.
In addition, Windows PE only has a subset of the Windows Vista Win32 application programming interface (API), 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 management options, printing and print spooler system, still image, tape backup, terminal services, user profiles, Windows stations and desktops, Windows multimedia, and Windows shell.
Back to Top
Comparison of Windows PE 2.0 with Early Technologies
If you have ever used MS-DOS or previous versions of Windows PE as a deployment or troubleshooting tool, you may be interested in how Windows PE improves these technologies. The following sections discuss how Windows PE improves the use of MS-DOS or previous versions of Windows PE.
Comparison of Windows PE 2.0 with MS-DOS Boot Disks
You can use Windows PE instead of an MS-DOS boot disk to perform the following tasks and complete them more smoothly in less time:
• Creating and formatting disk partitions, including NTFS file system partitions. Windows PE allows you to format a disk with the NTFS file system without using a third-party utility. Moreover, the file system utilities provided by Windows PE are scriptable, so you can fully automate partitioning and formatting.
• Accessing network shares to run troubleshooting tools and install the operating system. Windows PE provides network client functionality similar to Windows Vista. In fact, the network drivers provided by Windows PE are the same as those included with Windows Vista, allowing you to quickly and easily access the network. In contrast, customizing an MS-DOS boot disk to access network shares is always time-consuming and tedious.
• Loading and accessing 32-bit and 64-bit device drivers for audio, video, motherboard chipset, battery, and other devices that use Windows Vista drivers. Windows PE provides the ability to load Windows mass storage, network connections, audio, video, and other types of drivers. With MS-DOS, you would have to find 16-bit drivers, customize an MS-DOS boot disk, and maintain different disks for different network adapters.
• Automating tasks. The scripting capabilities in Windows PE far exceed those of MS-DOS boot disks. For example, Windows PE uses VBScript, a powerful scripting language that is easier to use than MS-DOS batch files. Windows PE supports gigabytes of memory on the system it runs on and provides network connection support using a 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 might be able to use them in Windows PE; otherwise, you can easily import existing MS-DOS-based scripts into Windows PE.
• Running Win32 applications. One disadvantage of using MS-DOS as a pre-installation and operating system troubleshooting tool is that you can only run applications written specifically for MS-DOS. Because Windows PE supports most important Microsoft Win32 APIs, Windows PE can run most graphical and console-based Windows applications. Additionally, because Windows PE supports multithreading and multitasking, you can run multiple tools simultaneously.
Comparison of Windows PE 2.0 with Previous Versions of Windows PE
For many Microsoft customers, Windows PE 2.0 will be the first environment they adopt. But if you have used Windows PE 1.0, you may be interested in learning how Windows PE 2.0 improves. This section discusses the obvious improvements to Windows PE 1.0 for existing Windows PE users.
First, Windows PE 2.0 is based on Windows Vista components, while 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 improvements in Windows Vista, including improvements in network attack prevention provided by Windows Firewall. As mentioned earlier, Windows PE 2.0 now supports driver injection, which allows you to load drivers before or after starting Windows PE. Now, if you boot Windows PE and find that it is missing a required driver, you can load a non-standard driver from a removable media and immediately use the hardware without restarting the computer.
For greater flexibility, especially when creating pre-installation scripts, Windows PE 2.0 now includes enhanced "Windows Management Instrumentation" (WMI) support. Using WMI, you can perform most configuration or management tasks via scripts or the command prompt. For more information about WMI, visit
http://msdn.microsoft.com/library/en-us/dnanchor/html/anch_wmi.asp.
In the past, many applications could not run in Windows PE 1.0 because these programs required temporary storage space and Windows PE often booted from a non-writable media, such as a CD. Now, by providing 32 MB of burn space in the computer's RAM, Windows PE 2.0 can support most applications that need to perform write operations on temporary files. Whenever an application attempts to write to a temporary file (regardless of which folder), Windows PE redirects the changes to the burn space in memory to simulate a hard drive. Of course, all changes are lost when you restart the computer.
Back to Top
Summary
Windows PE is a boot tool based on Windows Vista components. Unlike Windows Vista, Windows PE is not a general-purpose operating system but is dedicated to the installation, troubleshooting, and recovery of Windows Vista. Although every Windows Vista installation relies on Windows PE, the average user will never know that Windows PE exists.
However, IT departments can customize and extend Windows Vista to improve the efficiency of deployment and troubleshooting. In terms of deployment, 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 generate a custom, automated Windows Vista deployment or upgrade process.
In terms of troubleshooting, when Windows Vista fails to start normally, Windows PE will replace the MS-DOS boot disk for troubleshooting. In fact, if Windows Vista fails to boot, Windows PE will automatically load and start the "Windows Recovery Environment". IT departments can also use Windows PE for manual troubleshooting and can utilize built-in tools or add tools to the Windows PE image.
Windows PE plays an important part in the efficiency and reliability that Windows Vista provides to your IT infrastructure. Microsoft makes the most of Windows PE with the goal of providing a lightweight, powerful, and flexible specialized tool for pre-installation configuration and troubleshooting.