使用说明
除了安装系统时手动分区外,其他都自动,安装后首次自动进入用户桌面。
创建步骤
下载并安装ADK
注意:制作Windows 7 应答文件的AIK里面的“Windows 系统映像管理器”打开Windows 10的install.wim会报错。生成Windows 10应答文件必须安装Windows ADK。
最新版的ADK在这:
https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-install
下载的安装包默认是Online安装,可以选择离线安装;
离线安装方法:
参考:https://docs.microsoft.com/en-us/windows-hardware/get-started/adk-offline-install
- 下载adksetup.exe,在一台可上网电脑上运行adksetup.exe
- 选择“下载 评估和部署工具包 以在单独计算机上进行安装”,例如保存在D:\Downloads\Windows Kits\10\ADK;
- 离线安装包下载完成后,运行下载的D:\Downloads\Windows Kits\10\ADK\adksetup.exe;
- 安装时,只选择“部署工具” 进行安装;
自定义应答文件
- 准备一个Windows 10 Enterprise LTSC 2019光盘镜像“cn_windows_10_enterprise_ltsc_2019_x64_dvd_2efc9ac2.iso”;
- 用虚拟光驱挂载(Win10不用装虚拟光驱,直接双击挂载),将光盘中sources目录下的install.wim复制出来(检查复制出的文件是否已经去掉只读属性);
- 打开 开始菜单 程序 Windows Kits 下面的 “Windows 系统映像管理器”;
- 在 Windows System Image Manager 程序窗口,文件 -> 选择Windows镜像;
- 选择刚才复制出来的install.wim,加载需要几分钟,加载后按提示创建编录文件(catalog file);
- 在 Windows System Image Manager 程序窗口,文件 -> 新建应答文件;
- 添加哪些Components,以及设置哪些值,可以参考网上链接,但更推荐的是查阅微软的官方文档,经过测试,下面的图片展示需要添加哪些到应答文件。
- 详细设置参考下面的xml文件(AutoUnattend.xml),按需修改后用UltraISO或其他iso编辑工具,将AutoUnattend.xml放到Win10光盘根目录,然后刻录光盘或U盘就可以了;
- 如需添加脚本让Win10装完后自动安装常用软件,则需要:
A、在光盘中sources目录下面添加 O E M OEM OEM$1\Apps子目录;
B、在Apps中写脚本,自动安装常用软件;
B、在AutoUnattend.xml文件的oobe段增加FirstLogonCommands,让系统在首次登陆后调用App下安装脚本。
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>zh-CN</UILanguage>
</SetupUILanguage>
<InputLocale>0804:{81D4E9C9-1D3B-41BC-9E6C-4B40BF79E35E}{F3BA9077-6C7E-11D4-97FA-0080C882687E}</InputLocale>
<SystemLocale>zh-CN</SystemLocale>
<UILanguage>zh-CN</UILanguage>
<UserLocale>zh-CN</UserLocale>
<UILanguageFallback>en-US</UILanguageFallback>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserData>
<ProductKey>
<Key>M7XTQ-FN8P6-TTKYV-9D4CC-J462D</Key>
</ProductKey>
<AcceptEula>true</AcceptEula>
<FullName>user</FullName>
<Organization>Dell</Organization>
</UserData>
<ImageInstall>
<OSImage>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/image/name</Key>
<Value>Windows 10 Enterprise LTSC 2019</Value>
</MetaData>
</InstallFrom>
</OSImage>
</ImageInstall>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserAccounts>
<AdministratorPassword>
<Value>P@ssw0rd4Test</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value>P@ssw0rd4Test</Value>
<PlainText>true</PlainText>
</Password>
<DisplayName>User</DisplayName>
<Group>Administrators</Group>
<Name>user</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<OOBE>
<ProtectYourPC>2</ProtectYourPC>
<HideEULAPage>true</HideEULAPage>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
</OOBE>
<TimeZone>China Standard Time</TimeZone>
<AutoLogon>
<Password>
<Value>P@ssw0rd4Test</Value>
<PlainText>true</PlainText>
</Password>
<LogonCount>1</LogonCount>
<Enabled>true</Enabled>
<Username>user</Username>
</AutoLogon>
</component>
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SystemLocale>zh-CN</SystemLocale>
<UILanguage>zh-CN</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>zh-CN</UserLocale>
<InputLocale>0804:{81D4E9C9-1D3B-41BC-9E6C-4B40BF79E35E}{F3BA9077-6C7E-11D4-97FA-0080C882687E}</InputLocale>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipAutoActivation>true</SkipAutoActivation>
</component>
<component name="Microsoft-Windows-SQMApi" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CEIPEnabled>0</CEIPEnabled>
</component>
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>0804:{81D4E9C9-1D3B-41BC-9E6C-4B40BF79E35E}{F3BA9077-6C7E-11D4-97FA-0080C882687E}</InputLocale>
<SystemLocale>zh-CN</SystemLocale>
<UILanguage>zh-CN</UILanguage>
<UserLocale>zh-CN</UserLocale>
<UILanguageFallback>en-US</UILanguageFallback>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ComputerName>PC-</ComputerName>
<OEMInformation>
<Manufacturer>Dell</Manufacturer>
</OEMInformation>
</component>
</settings>
<settings pass="offlineServicing">
<component name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<EnableLUA>false</EnableLUA>
</component>
</settings>
<settings pass="generalize">
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipRearm>1</SkipRearm>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:e:/software/os/diy/win10/sources/install.wim#Windows 10 Enterprise LTSC 2019" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
参考
https://www.windowscentral.com/how-create-unattended-media-do-automated-installation-windows-10