![Windows 应答文件未激活产品密钥](https://linux22.com/image/725292/Windows%20%E5%BA%94%E7%AD%94%E6%96%87%E4%BB%B6%E6%9C%AA%E6%BF%80%E6%B4%BB%E4%BA%A7%E5%93%81%E5%AF%86%E9%92%A5.png)
我正在尝试使用应答文件启用 Windows Server 的产品密钥。应答文件是使用 Windows 系统映像管理器创建的。正在完成应答文件,没有错误,但当我检查产品密钥时,我必须手动激活它。
以下是 WSIM 创建的 XML
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<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">
<AutoLogon>
<Enabled>true</Enabled>
<LogonCount>2</LogonCount>
<Username>administrator</Username>
<Domain>test</Domain>
</AutoLogon>
<UserAccounts>
<AdministratorPassword>
<Value></Value>
<PlainText>false</PlainText>
</AdministratorPassword>
</UserAccounts>
</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>en-US</InputLocale>
<SystemLocale>nl-NL</SystemLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</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">
<AutoLogon>
<Password>
<Value></Value>
<PlainText>false</PlainText>
</Password>
<LogonCount>2</LogonCount>
<Username>administrator</Username>
<Enabled>true</Enabled>
<Domain>test</Domain>
</AutoLogon>
<OOBE>
<HideEULAPage>true</HideEULAPage>
</OOBE>
<UserAccounts>
<AdministratorPassword>
<Value></Value>
<PlainText>false</PlainText>
</AdministratorPassword>
</UserAccounts>
<TimeZone>W. Europe Standard Time</TimeZone>
</component>
</settings>
<settings pass="generalize">
<component name="Microsoft-Windows-PnpSysprep" 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">
<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
</component>
</settings>
<settings pass="windowsPE">
<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">
<UserData>
<ProductKey>
<WillShowUI>Never</WillShowUI>
<Key>XXXX-XXXX-XXX</Key>
</ProductKey>
<AcceptEula>true</AcceptEula>
</UserData>
</component>
<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>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>en-US</InputLocale>
<UILanguage>en-US</UILanguage>
<UILanguageFallback>en-US</UILanguageFallback>
<UserLocale>en-US</UserLocale>
</component>
</settings>
<settings pass="offlineServicing">
<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">
<OfflineUserAccounts>
<OfflineAdministratorPassword>
<Value></Value>
<PlainText>false</PlainText>
</OfflineAdministratorPassword>
</OfflineUserAccounts>
<ComputerName>test</ComputerName>
</component>
</settings>
<cpi:offlineImage cpi:source="wim:c:/users/temp/desktop/adk/install.wim#Windows Server 2016 SERVERSOLUTION" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
在 PowerShell 中使用以下命令测试答案文件
C:\Windows\System32\Sysprep\sysprep.exe /generalize /reboot /oobe /unattend:C:\Untitled.xml