Принять условия лицензии с sysprep и unattend.xml Windows Server 2016

Я пытаюсь создать шаблон Windows Server 2016 Datacentre для облачного развертывания с помощью sysprep и unattend.xml. После syspreping при первом входе в систему я все еще получаю экран условий лицензии, где я должен принять условия Экран принятия условий лицензии

Это создает проблему, поскольку я не могу подключиться к серверу по протоколу RDP до принятия условий, а это значит, что мне нужно пройти через консоль.

Вот мой файл unattend.xml:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-International-Core" processorArchitecture="wow64" 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-GB</InputLocale>
            <SystemLocale>en-GB</SystemLocale>
            <UILanguage>en-GB</UILanguage>
            <UILanguageFallback>en-GB</UILanguageFallback>
            <UserLocale>en-GB</UserLocale>
        </component>
        <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>
            </OOBE>
            <FirstLogonCommands>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>cscript //b c:\windows\system32\slmgr.vbs /ato</CommandLine>
                    <Description>Force Windows Activation</Description>
                    <Order>1</Order>
                    <RequiresUserInput>false</RequiresUserInput>
                </SynchronousCommand>
                <SynchronousCommand wcm:action="add">
                    <Order>2</Order>
                    <CommandLine>reg add &quot;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update&quot; /v AUOptions /t REG_DWORD /d 00000004 /f</CommandLine>
                    <Description>Turn on automatic updates</Description>
                    <RequiresUserInput>false</RequiresUserInput>
                </SynchronousCommand>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>reg add &quot;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update&quot; /v ElevateNonAdmins /t REG_DWORD /d 00000001 /f</CommandLine>
                    <Description>Allow all users (regardless of admin) to manage updates</Description>
                    <Order>3</Order>
                    <RequiresUserInput>false</RequiresUserInput>
                </SynchronousCommand>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>reg add &quot;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update&quot; /v IncludeRecommendedUpdates /t REG_DWORD /d 00000001 /f </CommandLine>
                    <Description>Include Recommended as well as important</Description>
                    <Order>4</Order>
                    <RequiresUserInput>false</RequiresUserInput>
                </SynchronousCommand>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>reg add &quot;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update&quot; /v ScheduledInstallDay /t REG_DWORD /d 00000000 /f</CommandLine>
                    <Description>Install every day</Description>
                    <Order>5</Order>
                    <RequiresUserInput>false</RequiresUserInput>
                </SynchronousCommand>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>reg add &quot;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update&quot; /v ScheduledInstallTime /t REG_DWORD /d 00000003 /f</CommandLine>
                    <Description>3am installation</Description>
                    <Order>6</Order>
                    <RequiresUserInput>false</RequiresUserInput>
                </SynchronousCommand>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>reg add &quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SNMP\Parameters\ExtensionAgents&quot; /v snmptools /t REG_SZ /d &quot;SOFTWARE\snmptools\CurrentVersion&quot; /f</CommandLine>
                    <Description>Registry entry for snmp monitoring</Description>
                    <Order>7</Order>
                    <RequiresUserInput>false</RequiresUserInput>
                </SynchronousCommand>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>reg add &quot;HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\snmptools\currentversion&quot; /v counters /t REG_SZ /d &quot;%PROGRAMFILES(x86)%\SnmpTools\counter.ini&quot; /f</CommandLine>
                    <Description>Registry entry for snmp monitoring</Description>
                    <Order>8</Order>
                    <RequiresUserInput>false</RequiresUserInput>
                </SynchronousCommand>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>reg add &quot;HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\snmptools\currentversion&quot; /v debug /t REG_SZ /d &quot;0&quot; /f</CommandLine>
                    <Description>Registry entry for snmp monitoring</Description>
                    <Order>9</Order>
                    <RequiresUserInput>false</RequiresUserInput>
                </SynchronousCommand>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>reg add &quot;HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\snmptools\currentversion&quot; /v pathname /t REG_SZ /d &quot;%systemroot%\snmptools.dll&quot; /f</CommandLine>
                    <Description>Registry entry for snmp monitoring</Description>
                    <Order>10</Order>
                    <RequiresUserInput>false</RequiresUserInput>
                </SynchronousCommand>
                <SynchronousCommand wcm:action="add">
                    <CommandLine>cmd /c mkdir &quot;%PROGRAMFILES(x86)%\SnmpTools&quot; &amp; type NUL &gt; &quot;%PROGRAMFILES(x86)%\SnmpTools\counter.ini&quot;</CommandLine>
                    <Description>Create snmp counter file and folder</Description>
                    <Order>11</Order>
                    <RequiresUserInput>false</RequiresUserInput>
                </SynchronousCommand>
            </FirstLogonCommands>
            <UserAccounts>
                <AdministratorPassword>
                    <Value>ADMINPASSWORD</Value>
                    <PlainText>false</PlainText>
                </AdministratorPassword>
            </UserAccounts>
        </component>
    </settings>
    <settings pass="offlineServicing">
        <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">
            <ComputerName>*</ComputerName>
        </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">
            <ComputerName></ComputerName>
            <CopyProfile>true</CopyProfile>
            <ProductKey>PRODUCTKEY</ProductKey>
        </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>
                <AcceptEula>true</AcceptEula>
            </UserData>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="wim:c:/users/USER/documents/tasks/windows%202016%20template%20task/install.wim#Windows Server 2016 SERVERDATACENTER" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>

Кто-нибудь сталкивался с этой проблемой раньше? Есть идеи, как это решить? Любая помощь будет принята с благодарностью.

3
задан 8 February 2017 в 12:12
4 ответа

Это заставит вашего пользователя установить пароль администратора и обойти все другие параметры настройки:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="specialize">
        <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">
            <ShowWindowsLive>false</ShowWindowsLive>
            <TimeZone>Central Standard Time</TimeZone>
        </component>
        <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>
    </settings>
    <settings pass="oobeSystem">
        <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>en-US</SystemLocale>
            <UILanguage>en-US</UILanguage>
            <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">
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
            </OOBE>
        </component>
    </settings>
</unattend>
0
ответ дан 3 December 2019 в 07:58

В моем случае это работает должным образом:

<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State Jump " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance Jump ">
  <UserData>
        <AcceptEula>true</AcceptEula>
        <FullName>AdminAccount</FullName>
        <Organization>OrgName</Organization>
  </UserData>
  <EnableFirewall>false</EnableFirewall>
  <EnableNetwork>true</EnableNetwork>
</component>
0
ответ дан 3 December 2019 в 07:58

Слегка не по теме, но запуск setup.exe в командной строке с аргументом / auto update также должен пропускать условия лицензии экран подтверждения для тех, кто выполняет обновления через RDP :

d:\setup.exe /auto update

Дополнительная информация в документации Microsoft здесь .

0
ответ дан 3 December 2019 в 07:58

У меня возникла проблема, из-за которой мне нужно было принять лицензионное соглашение на этапе установки Windows еще до того, как Windows будет установлена. Это помогло мне избавиться от окна EULA во время установки: * В Windows System Image Manager, открыв файл ответов и образ Windows * В разделе «amd64_Microsoft-Windows-Setup _..._ нейтральный» я щелкнул правой кнопкой мыши «UserData» и добавил это в «Pass 1 windowsPE» * В файле ответов в папке amd64_Microsoft-Windows-Setup_neutral \ UserData я установил для AcceptEula значение true

. Это добавило блок

<UserData>
    <AcceptEula>true</AcceptEula>
</UserData>

к моему файлу ответов и избавилось от окна EULA во время установки. При первом входе в систему дальнейшее принятие лицензионного соглашения с конечным пользователем не требуется.

0
ответ дан 15 April 2020 в 13:35

Теги

Похожие вопросы