使用Windows AIK构建静默安装镜像

网友投稿 850 2022-05-29

1   前言

1.1         文档目标

本文档主要记录了使用Windows AIK工具构建静默安装镜像的步骤,供需要实现Windows自动安装的用户借鉴。

在Windows AIK工具的安装包中的Docs/Whitepapers/StepByStep_ITPro.htm文件中提供了使用AIK工具构建静默安装镜像的基础步骤,十分详细,本文档大多数内容均参考该文档编写。

1.2         文档读者

本文档的主要读者是需要实现Windows自动安装的用户。

2   Windows AIK简介

Windows 自动安装工具包(Windows AIK)设计用于帮助原始设备制造商(OEM)、系统构建者以及企业 IT专业人士将 Windows 部署到新硬件上。Windows AIK 是一个支持 Windows 最新版本的部署工具集。

利用此工具可以:

1、允许您署名和自定义任何Windows产品。

2、允许您安装非Windows操作系统组成部分的应用程序和设备驱动程序。

3、提供灵活的方法和工具来帮助您优化制造过程,无论您每月组装 10 台还是 10,000 台计算机,等等。

3   Windows AIK的安装

Windows AIK的安装包在Microsoft官网可以下载到,安装步骤也很简单,在此不多赘述。

下载链接:http://www.microsoft.com/en-us/download/details.aspx?id=5753

4   构建静默安装镜像

4.1         生成Autounattend.xml文件

Autounattend.xml文件中记录了Windows安装过程需要进行配置的信息,Windows安装程序正是通过对该文件进行解析,从而避免了与用户进行交互,实现静默安装。

使用AIK生成Autounattend.xml文件的步骤如下:

1 将Windows安装镜像中的Sources\Install.wim文件解压出来。

2 打开AIK工具中的Windows System Image Manager,点击文件->选择Windows镜像,然后选择刚才的Install.win文件。

3 在弹出的镜像选择界面上,选择需要进行安装的镜像。

4 系统提示会创建一个catalog文件,点击确定。

5 点击文件->创建新的Answer File,在Answer File窗口上出现一个空的Answer File。

6 在Windows Image窗口展开Components,选择下面表格中的组件,添加到右侧Answer File中。

Component

Configuration pass

Microsoft-Windows-Deployment\Reseal

oobeSystem

Microsoft-Windows-International-Core-WinPE\SetupUILanguage

windowsPE

Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition

windowsPE

Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition

windowsPE

Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition

windowsPE

Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition

windowsPE

Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo

windowsPE

Microsoft-Windows-Setup\UserData

windowsPE

Microsoft-Windows-Shell-Setup\OOBE

oobeSystem

Optional: Microsoft-Windows-IE-InternetExplorer

specialize

其中,CreatePartition和ModifyPartition进行了两次,说明在磁盘中创建了两个分区。

7 在Answer File窗口进行属性配置,将上述每个组件中的属性按下表所示进行配置。

Configuration pass

Component

Value

1 WindowsPE

Microsoft-Windows-International-Core-WinPE

InputLocale =  For example, en-US

SystemLocale =  For example, en-US

UILanguage =  For example, en-US

UserLocale =  For example, en-US

1 WindowsPE

Microsoft-Windows-International-Core-WinPE\SetupUILanguage

UILanguage =  For example, en-US

1 WindowsPE

Microsoft-Windows-Setup\DiskConfiguration

WillShowUI = OnError

1 WindowsPE

Microsoft-Windows-Setup\DiskConfiguration\Disk

DiskID = 0

WillWipeDisk = true

1 WindowsPE

Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition

Order = 1

Size = 200

Type = Primary

1 WindowsPE

Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\CreatePartition

Extend = true

Order = 2

Type = Primary

1 WindowsPE

Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition

Active = true

Format = NTFS

Label = System

Order = 1

PartitionID = 1

1 WindowsPE

Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ModifyPartition

Format = NTFS

Label = Windows

Order = 2

PartitionID = 2

1 WindowsPE

Microsoft-Windows-Setup\ImageInstall\OSImage

InstallToAvailablePartition = false

WillShowUI = OnError

1 WindowsPE

Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo

DiskID = 0

PartitionID = 2

1 WindowsPE

Microsoft-Windows-Setup\UserData

AcceptEula = true

1 WindowsPE

Microsoft-Windows-Setup\UserData\ProductKey

Key = 

WillShowUI = OnError

4 Specialize

Optional: Microsoft-Windows-IE-InternetExplorer

Home_Page = 

7 oobeSystem

Microsoft-Windows-Deployment\Reseal

ForceShutdownNow = false

Mode = Audit

8 点击工具->验证Answer File,检验生成的Answer File是否可用。

使用Windows AIK构建静默安装镜像

9 点击文件->保存Answer File,保存Answer File。

4.2         构建静默安装镜像

本小节使用UltraISO工具将4.1节中生成的Autounattend.xml文件打入到镜像根目录中。

1 使用UltraISO打开Windows安装镜像。

2 将Autounattend.xml文件拖拽到镜像根目录中。

3 保存镜像即可。

注:官网文档称Autounattend.xml文件不一定要打入到镜像文件中才生效,Windows安装程序在启动时会在所有的可挂载目录的根目录中检索Autounattend.xml文件。因此可以选择将原生安装镜像挂载到光驱中,然后将Autounattend.xml文件通过U盘挂载到系统中的方式进行静默安装,从而免去将Autounattend.xml文件打入到安装镜像这一步。但是由于本人采用的FC平台无法实现该功能,因此没有进行验证。

windows

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Survey | 多任务学习综述
下一篇:R 实现及相关文本挖掘 English participle
相关文章