如何使用 sysprep unattend.xml 激活 Windows 7?

如何使用 sysprep unattend.xml 激活 Windows 7?

如何使用 unattend.xml 文件通过 SysPrep 激活通过映像部署的 Windows 7?

这是迄今为止我编写的代码:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend"
    xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<settings pass="generalize">
    <component name="Microsoft-Windows-PnpSysprep"
            processorArchitecture="amd64"
            publicKeyToken="31bf3856ad364e35"
            language="neutral" versionScope="nonSxS">
        <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
    </component>
</settings>
<settings pass="specialize">
    <component name="Microsoft-Windows-Deployment"
            processorArchitecture="amd64"
            publicKeyToken="31bf3856ad364e35"
            language="neutral" versionScope="nonSxS">
        <RunSynchronous>
            <RunSynchronousCommand wcm:action="add">
                <Description>Disable create user account</Description>
                <Path>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\OOBE /v UnattendCreatedUser /t REG_DWORD /d 1 /f</Path>
                <Order>1</Order>
            </RunSynchronousCommand>
        </RunSynchronous>
    </component>
    <component name="Microsoft-Windows-Shell-Setup"
            processorArchitecture="amd64"
            publicKeyToken="31bf3856ad364e35"
            language="neutral" versionScope="nonSxS">
        <RegisteredOwner>NetLiteracy</RegisteredOwner>
        <RegisteredOrganization>NetLiteracy</RegisteredOrganization>
        <TimeZone>Eastern Standard Time</TimeZone>
    <ProductKey>**ValidProductKey**</ProductKey>
        <Computername>*</Computername>
        <OOBE>
            <HideEULAPage>true</HideEULAPage>
            <NetworkLocation>Other</NetworkLocation>
            <ProtectYourPC>2</ProtectYourPC>
            <SkipUserOOBE>true</SkipUserOOBE>
        </OOBE>
    </component>
</settings>
<settings pass="oobeSystem">
    <component name="Microsoft-Windows-International-Core"
            processorArchitecture="amd64"
            publicKeyToken="31bf3856ad364e35"
            language="neutral" versionScope="nonSxS">
        <InputLocale>en-US</InputLocale>
        <SystemLocale>en-US</SystemLocale>
        <UILanguage>en-US</UILanguage>
        <UserLocale>en-US</UserLocale>
    </component>
</settings>
</unattend>

答案1

听起来好像您正在直接编辑应答文件的 XML - 我强烈建议您安装 Windows 自动安装工具包(可从 Microsoft这里)并使用其中的 Windows 系统映像管理器工具以更用户友好的方法编辑您的应答文件,如 Microsoft 文档所述这里

具体来说,您正在寻找ProductKey组件中的值amd64_Microsoft-Windows-Shell-Setup_neutral,该值应在专门化阶段(阶段 4)添加到此实例中。

相关内容