几天来,我一直在尝试获取适用于 Windows 7 的正确且可用的 Unattended.xml 应答文件。尝试创建完全无人值守的 Windows 7 安装,技术人员可以插入 USB 驱动器,从中启动,然后等待安装完成。我正在使用的映像已经使用无人值守应答文件进行了系统准备,并且此后每次更改都是如此。这是一个耗时的过程,因为 WDS/Server 安装不是一种选择,只有这种预先映像 USB 设备的方法。
我浏览过 technet、Serverfault(和其他 StackExchange 网站)、随机博客和此类网站,尝试过不同的应答文件选项,这些选项可以(应该/据称)创建一个完全无人值守的安装。
使用 WSIM 来管理/写入/修改/检查答案文件,使用 DISM 来管理图像。
无论我在 WinPE 中输入什么选项,总是会发生以下情况:
- PE 要求输入语言/区域设置/
- PE 显示 EULA 协议
- 始终显示 PE 磁盘配置,提示进行分区
我需要设置开始、处理并完成,而无需询问用户任何事情
我拥有的最新的 XML 应答文件如下:
<?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="x86" 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>en-us</UILanguage>
</SetupUILanguage>
<UILanguage>en-us</UILanguage>
<InputLocale>0409:00000409</InputLocale>
<SystemLocale>en-us</SystemLocale>
<UserLocale>en-us</UserLocale>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DiskConfiguration>
<WillShowUI>OnError</WillShowUI>
<Disk wcm:action="add">
<DiskID>0</DiskID>
<WillWipeDisk>true</WillWipeDisk>
<CreatePartitions>
<CreatePartition wcm:action="add">
<Order>1</Order>
<Size>100</Size>
<Type>Primary</Type>
</CreatePartition>
<CreatePartition wcm:action="add">
<Order>2</Order>
<Type>Primary</Type>
<Extend>true</Extend>
</CreatePartition>
</CreatePartitions>
<ModifyPartitions>
<ModifyPartition wcm:action="add">
<Format>NTFS</Format>
<Label>System</Label>
<Order>1</Order>
<Active>true</Active>
<PartitionID>1</PartitionID>
</ModifyPartition>
<ModifyPartition wcm:action="add">
<Format>NTFS</Format>
<Label>OS</Label>
<Order>2</Order>
<PartitionID>2</PartitionID>
</ModifyPartition>
</ModifyPartitions>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/INDEX</Key>
<Value>1</Value>
</MetaData>
</InstallFrom>
<WillShowUI>OnError</WillShowUI>
</OSImage>
</ImageInstall>
<UserData>
<AcceptEula>true</AcceptEula>
<ProductKey>
<Key>----</Key>
<WillShowUI>----</WillShowUI>
</ProductKey>
<FullName>----</FullName>
<Organization>----</Organization>
</UserData>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CopyProfile>true</CopyProfile>
<TimeZone>----</TimeZone>
<ProductKey>----</ProductKey>
<RegisteredOrganization>----</RegisteredOrganization>
<RegisteredOwner>----</RegisteredOwner>
</component>
<component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Path>net user administrator /active:yes</Path>
<Order>1</Order>
</RunSynchronousCommand>
</RunSynchronous>
</component>
<component name="Microsoft-Windows-International-Core" processorArchitecture="x86" 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>0409:00000409</InputLocale>
<SystemLocale>en-us</SystemLocale>
<UILanguage>en-us</UILanguage>
<UserLocale>en-us</UserLocale>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
</OOBE>
<RegisteredOrganization>----</RegisteredOrganization>
<RegisteredOwner>----</RegisteredOwner>
<TimeZone>TZ</TimeZone>
<UserAccounts>
<AdministratorPassword>
<Value>aBcDe</Value>
<PlainText>false</PlainText>
</AdministratorPassword>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value>aBcDe</Value>
<PlainText>false</PlainText>
</Password>
<Description>Local Administrator</Description>
<DisplayName>Administrator</DisplayName>
<Group>Administrators</Group>
<Name>Administrator</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<AutoLogon>
<Password>
<Value>aBCdE</Value>
<PlainText>false</PlainText>
</Password>
<Enabled>true</Enabled>
<LogonCount>5</LogonCount>
<Username>administrator</Username>
<Domain></Domain>
</AutoLogon>
</component>
<component name="Microsoft-Windows-International-Core" processorArchitecture="x86" 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>0409:00000409</InputLocale>
<SystemLocale>en-us</SystemLocale>
<UserLocale>en-us</UserLocale>
<UILanguage>en-us</UILanguage>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:wimfile#Windows 7 Professional" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
是否有其他人遇到过这种情况,或者知道如何纠正我的答案文件以使其真正无人看管?
答案1
您是否尝试过下载多学科治疗kit,所以您不必手动编辑 xml 文件?
答案2
当我开始使用 Win 7 映像时,我使用了本指南并发现它非常有用: http://theitbros.com/sysprep-a-windows-7-machine-%E2%80%93-start-to-finish
如果我没记错的话,当你进行 sysprep 时,它会将 xml 复制到 system32 文件夹中的某个位置,并将该副本用于其余的设置。
发布了我的电话,如果电话断了请见谅。
答案3
我通过将 unattend.xml 放在 USB 驱动器的根目录下并将其重命名为 autounattend.xml 解决了此问题。进行此更改后,Windows 7 安装程序将以无人值守的方式继续进行,正如我所认为的那样,unattend.xml 位于 install.wim 的 sysprep 目录中。