从 DVD 启动Boot from a DVD

在新硬件上安装 Windows 的最简单方法是使用名为 Autounattend.xml 的答案文件直接从 Windows 产品 DVD 启动。The simplest way to install Windows on new hardware is to start directly from the Windows product DVD by using an answer file that is named Autounattend.xml. 当不能访问网络或您只构建几台计算机时,此方法可提供很大的灵活性。This method provides flexibility when network access is not available or when you are building only a few computers. 您可以使用此相同的方法在基于映像的部署方案(通常称为 " 主安装")中生成初始映像。You can use this same method to build an initial image in an image-based deployment scenario, typically known as a master installation.

通过使用应答文件,您可以自动执行 Windows 安装程序的全部或部分。By using the answer file, you can automate all or parts of Windows Setup. 可以使用 Windows 系统映像管理器 (Windows SIM) 创建答案文件。You can create an answer file by using Windows System Image Manager (Windows SIM). 有关详细信息,请参阅 创建或打开答案文件For more information, see Create or Open an Answer File.

先决条件Prerequisites

若要完成此演练,需要满足以下条件:To complete this walkthrough, you need the following:

  • 可移动媒体上的答案文件 (CD 或 DVD-ROM) 或 u 盘。An answer file on removable media (CD or DVD-ROM) or a USB flash drive. 答案文件必须命名为 Autounattend.xml。The answer file must be named Autounattend.xml. 答案文件必须位于媒体的根目录中。The answer file must be located at the root of the media.

  • Windows 产品 DVD。A Windows product DVD.

从 Windows 产品 DVD 安装 WindowsTo install Windows from the Windows product DVD

  1. 启动新计算机。Turn on the new computer.

    注意Note
    此示例假设硬盘驱动器为空。This example assumes that the hard disk drive is blank.

  2. 将 Windows 产品 DVD 和包含应答文件的可移动媒体插入到新计算机中。Insert both the Windows product DVD and the removable media that contains your answer file into the new computer.

    注意Note
    使用 USB 闪存驱动器时,请将驱动器直接插入计算机的主要 USB 端口集。When you use a USB flash drive, insert the drive directly into the primary set of USB ports for the computer. 对于台式计算机,这通常位于计算机的背面。For a desktop computer, this is typically in the back of the computer.

  3. 通过按 CTRL + ALT + DEL 键来重新启动计算机。Restart the computer by pressing the CTRL+ALT+DEL keys. Windows 安装程序 ( # A0) 会自动启动。Windows Setup (Setup.exe) starts automatically.

    默认情况下,Windows 安装程序在驱动器的根目录和其他位置(如可移动介质)搜索名为 Autounattend.xml 的答案文件。By default, Windows Setup searches at the root of a drive and other locations, such as removable media, for an answer file that is named Autounattend.xml. 即使没有显式指定答案文件,也会出现这种情况。This occurs even if you do not explicitly specify an answer file. 有关详细信息,请参阅 Windows 安装程序自动化概述中的 "隐式搜索应答文件" 和 "隐式答案文件搜索顺序"。For more information, see “Implicitly Searching for an Answer File” and “Implicit Answer File Search Order” in Windows Setup Automation Overview.

  4. 安装程序完成后,验证 Windows 是否应用了所有自定义项,然后通过使用 sysprep 命令以及 /generalize 选项来重新封装计算机。After the Setup program is finished, validate that Windows applied all customizations, and then reseal the computer by using the sysprep command together with the /generalize option.

    Sysprep 工具会删除所有系统特定的信息,并重置计算机。The Sysprep tool removes all system-specific information and resets the computer. 下次计算机启动时,你的客户可以接受 Microsoft 软件许可条款并添加特定于用户的信息。The next time that the computer starts, your customers can accept the Microsoft Software License Terms and add user-specific information.

    可选:若要在安装后自动运行 Sysprep 工具,请设置 Microsoft Windows 部署 |重新封装答案文件中的组件设置 ( # A0) ,如下所示:Optional: To automatically run the Sysprep tool after the installation, set the Microsoft-Windows-Deployment | Reseal component setting in your answer file (Autounattend.xml) as follows:

    ForceShutdownNow = true, Mode =OOBE

    可选:若要从正在运行的操作系统中手动运行 Sysprep 工具,请在命令提示符下键入以下命令:Optional: To run the Sysprep tool manually from a running operating system, type the following at a command prompt:

    c:\windows\system32\sysprep /oobe /shutdown

有关详细信息,请参阅 Sysprep (系统准备) 概述For more information, see Sysprep (System Preparation) Overview.

后续步骤Next Steps

此演练演示无需用户输入的基本无人参与安装。This walkthrough illustrates a basic unattended installation that requires no user input. 您可以手动将多个自定义项添加到新安装的操作系统。You can manually add more customizations to the newly installed operating system. 如果这是要用于映像部署的主安装或安装,请关闭计算机。If this is a master installation or an installation that you will use for image deployment, shut down the computer. 然后,使用部署映像服务和管理 (DISM) 工具或任何第三方映像软件捕获安装映像。Then, capture an image of the installation by using the Deployment Image Servicing and Management (DISM) tool or any third-party imaging software.

重要说明Important
在将 Windows 映像移动到新计算机之前,必须先运行 sysprep/generalize 命令,方法是使用任何方法。You must run the sysprep /generalize command before you move a Windows image to a new computer by any method. 这些方法包括映像、硬盘复制和其他方法。These methods include imaging, hard disk duplication, and other methods. 不支持在不运行 sysprep/generalize 命令的情况下将 Windows 映像移动或复制到其他计算机,即使新计算机具有相同的硬件配置。Moving or copying a Windows image to a different computer without running the sysprep /generalize command is not supported, even if the new computer has the same hardware configuration. 将映像通用化会删除 Windows 安装中的唯一信息,以便可以在不同的计算机上应用该映像。Generalizing the image removes unique information from the Windows installation so that you can apply that image on different computers.

下次启动 Windows 映像时,将运行 specialize 配置阶段。The next time that you boot the Windows image, the specialize configuration pass runs. 在此配置阶段中,许多组件会执行在新计算机上启动 Windows 映像时必须执行的操作。During this configuration pass, many components perform actions that must occur when you boot a Windows image on a new computer. 有关详细信息,请参阅 配置通过如何工作For more information, see How Configuration Passes Work.

相关主题Related topics

Windows 安装程序技术参考Windows Setup Technical Reference

将配置集用于 Windows 安装程序Use a Configuration Set with Windows Setup

部署自定义映像Deploy a Custom Image

使 Windows 启动进入审核模式或 OOBEBoot Windows to Audit Mode or OOBE

在 Windows 安装程序期间将设备驱动程序添加到 WindowsAdd Device Drivers to Windows During Windows Setup

将自定义脚本添加到 Windows 安装程序Add a Custom Script to Windows Setup