如何创建 ImageUnattend.xml 安装脚本
要为 Windows Server 2008 R2 安装创建 ImageUnattend.xml 安装脚本,请执行以下步骤。生成安装脚本后,该脚本会保存到设备驱动程序系统信息库。
注 - 在此过程中,ImageUnattend.xml 安装脚本将映射到 Windows Server 2008 R2 安装映像。然后安装映像将在 Windows Server 2008 网络安装期间安装指定的设备驱动程序。
- 将 Windows Server 2008 DVD 介质插入到托管 Windows 部署服务的系统的 DVD 读取器中。
- 将所有 Windows Server 2008 目录文件复制到设备驱动程序系统信息库的 Catalogs 文件夹中,例如:
copy DVDDrive:\source\*.clg C:\Unattend\Drivers\W28R2\ Catalogs
- 启动 Windows 系统管理器应用程序并创建一个新的 ImageUnattend.xml 安装脚本:
- 单击“开始”>“所有程序”> "Microsoft Windows AIK" >“Windows 系统映像管理器”。
- 在 "Answer File"(应答文件)窗格中,右键单击并选择 "New Answer File"(新建应答文件)。
- 如果出现一条消息要求您立即打开一个新的 Windows 映像,请单击 "No"(否)。
- 指定与将要安装的 Windows Server 2008 版本(Standard、Datacenter 或 Enterprise)匹配的 Windows Server 2008 目录文件:
- 在 "Windows Image"(Windows 映像)窗格中,右键单击 "Select Windows Image"(选择 Windows 映像)。
- 在 "Files Type"(文件类型)列表框中,选择 "Catalog files (*.clg)"(目录文件 (*.clg)),然后单击 "Browse"(浏览)以指定设备驱动程序系统信息库中的 Catalogs 文件夹。
请确保选择与将要安装的 Windows Server 2008 R2 版本匹配的目录文件。
例如,对于 Windows Server 2008 R2 Datacenter,请选择:
C:\Unattend\Drivers\W2K8R2\Catalogs\ install_Windows_Server_2008_SERVERDATACENTER.clg
- 指定组件软件包 pass 2 offlineServing。
- 在 "Windows Image"(Windows 映像)窗格中,单击并展开 architecture_Microsoft-Windows-PnPCustomizationNonWinPE_version。
- 右键单击 PathAndCredentials,然后选择 "Add Setting to Pass 2 OfflineServing"(向 Pass 2 OfflineServing 添加设置)。
- 对 Windows Server 2008 安装期间要安装的每个设备驱动程序重复步骤 5。
有关将包括在 install.wim 文件中的设备驱动程序的列表,请参阅将驱动程序添加到 WIM 映像中的表格。
- 指定安装密钥值。
- 在 "Answer File"(应答文件)窗格中,单击并展开 2 offlineServicing,architecture_Microsoft-Windows-PnPCustomizationsNonWinPE_version。
- 单击并展开 PathAndCredentials,然后输入序列密钥值以及系统信息库中的 UNC 设备驱动程序路径。
例如,要添加 Sun Storage PCIe SAS RAID HBA 选件的设备驱动程序,请输入:
Key 1
Path \\wds-server\W2K8-Drivers\Lsi\1.19.2.64
- 在每个 PathAndCredentials 组件的 "Credential"(凭证)部分中,单击并展开组件以插入 UNC 域、登录名和密码(如果需要),使用这些内容可以访问系统信息库中存储的设备驱动程序。
例如:
- 域
UNC_domain
- 密码
UNC_password
- 用户名
UNC_username
- 对 Windows Server 2008 安装期间要安装的每个设备驱动程序重复步骤 7a 到步骤 7c。
- 使用 Windows 系统映像管理器应用程序验证 ImageUnattend.xml 文件:
在 Windows 系统映像管理器应用程序中,单击 "Tools"(工具)> "Validate Answer File"(验证应答文件)。
- 使用 Windows 系统映像管理器应用程序将 .xml 安装脚本另存为 ImageUnattend.xml:
- 在 Windows 系统映像管理器应用程序中,单击 "File"(文件)> "Save Answer File as"(将应答文件另存为)。
- 将设备驱动程序系统信息库中的 .xml 安装脚本另存为:
c:\Unattend\Drivers\W2K8\Catalogs\ImageUnattend.xml
退出 Windows 系统映像管理器应用程序。
已完成 ImageUnattend.xml 安装脚本的创建。
接下来的操作
对于 Windows Server 2008 R2 安装,请前进到将 ImageUnattend.xml 安装脚本映射到 Windows Server 2008 安装映像。