none
MDT部署windows10,生成的media镜像包ISO,部署时如何不使用administrator登录 RRS feed

  • 问题

  • 哦打算通过MDT生成win10映像ISO,我导入了win10标准映像,创建了任务序列,人物序列仅配置了磁盘选项,在advance 选项中生成media,在media中生成的ISO设置它的属性,写入rules如下:

    ------------------------------------------------------------------------

    _SMSTSOrgName=Bank-of-China-CMGCV2020L

    DoCapture=NO

    KeyboardLocale=zh-cn

    OSInstall=YES

    DeploymentType=NEWCOMPUTER

    SkipAdminAccounts=YES

    SkipAdminPassword=YES

    SkipApplications=YES

    JoinWorkgroup=WORKGROUP

    SkipBitLocker=YES

    SkipCapture=YES

    SkipAppsOnUpgrade=YES

    SkipComputerBackup=YES

    SkipComputerName=YES

    SkipDeploymentType=YES

    SkipDomainMembership=YES

    SkipFinalSummary=YES

    SkipPackageDisplay=YES

    SkipLocaleSelection=YES

    SkipProductKey=YES

    SkipRoles=YES

    SkipSummary=YES

    SkipTaskSequence=YES

    SkipTimeZone=YES

    SkipUserData=Yes

    TaskSequenceID=WIN001

    TimeZone=210

    TimeZoneName=China Standard Time

    UILanguage=zh-cn

    UserLocale=zh-cn

    --------------------------------------------------------------------------

    在unattend.xml文件中修改账户参数

    其余保持不变,生成的ISO进行部署,过程中没有错误,到最后进入桌面的时候出现异样,看不到用户头像,只有一把大钥匙,而且任凭如何数密码都显示错误

    2021年5月25日 15:18

答案

  • 编录一个正确文件,然后把对应的标签移过去呢。

    我这个是不报错的你也可以参考下:

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="windowsPE">
            <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
                <ImageInstall>
                    <OSImage>
                        <WillShowUI>OnError</WillShowUI>
                        <InstallTo>
                            <DiskID>0</DiskID>
                            <PartitionID>1</PartitionID>
                        </InstallTo>
                        <InstallFrom>
                            <Path>.\Operating Systems\Windows_10_CMGE_V2020-L_17763.1697 x64\Sources\install.wim</Path>
                            <MetaData>
                                <Key>/IMAGE/INDEX</Key>
                                <Value>1</Value>
                            </MetaData>
                        </InstallFrom>
                    </OSImage>
                </ImageInstall>
                <ComplianceCheck>
                    <DisplayReport>OnError</DisplayReport>
                </ComplianceCheck>
                <UserData>
                    <AcceptEula>true</AcceptEula>
                    <ProductKey>
                        <Key></Key>
                    </ProductKey>
                </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>0409:00000409</InputLocale>
                <SystemLocale>en-US</SystemLocale>
                <UILanguage>en-US</UILanguage>
                <UserLocale>en-US</UserLocale>
            </component>
        </settings>
        <settings pass="generalize">
            <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">
                <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
            </component>
        </settings>
        <settings pass="specialize">
            <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
                <Identification>
                    <Credentials>
                        <Username></Username>
                        <Domain></Domain>
                        <Password></Password>
                    </Credentials>
                    <JoinDomain></JoinDomain>
                    <JoinWorkgroup></JoinWorkgroup>
                    <MachineObjectOU></MachineObjectOU>
                </Identification>
            </component>
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
                <ComputerName></ComputerName>
                <ProductKey></ProductKey>
                <RegisteredOrganization>boc</RegisteredOrganization>
                <RegisteredOwner>Windows ??</RegisteredOwner>
                <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
                <TimeZone>Pacific Standard Time</TimeZone>
            </component>
            <component name="Microsoft-Windows-IE-InternetExplorer" 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">
                <Home_Page>about:blank</Home_Page>
            </component>
            <component name="Microsoft-Windows-Deployment" 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">
                <RunSynchronous>
                    <RunSynchronousCommand wcm:action="add">
                        <Description>EnableAdmin</Description>
                        <Order>1</Order>
                        <Path>cmd /c net user Administrator /active:no</Path>
                    </RunSynchronousCommand>
                    <RunSynchronousCommand wcm:action="add">
                        <Description>UnfilterAdministratorToken</Description>
                        <Order>2</Order>
                        <Path>cmd /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v FilterAdministratorToken /t REG_DWORD /d 0 /f</Path>
                    </RunSynchronousCommand>
                    <RunSynchronousCommand wcm:action="add">
                        <Description>disable user account page</Description>
                        <Order>3</Order>
                        <Path>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\OOBE /v UnattendCreatedUser /t REG_DWORD /d 1 /f</Path>
                    </RunSynchronousCommand>
                    <RunSynchronousCommand wcm:action="add">
                        <Description>disable async RunOnce</Description>
                        <Order>4</Order>
                        <Path>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer /v AsyncRunOnce /t REG_DWORD /d 0 /f</Path>
                    </RunSynchronousCommand>
                </RunSynchronous>
            </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>0409:00000409</InputLocale>
                <SystemLocale>en-US</SystemLocale>
                <UILanguage>en-US</UILanguage>
                <UserLocale>en-US</UserLocale>
            </component>
            <component name="Microsoft-Windows-TapiSetup" 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">
                <TapiConfigured>0</TapiConfigured>
                <TapiUnattendLocation>
                    <AreaCode>""</AreaCode>
                    <CountryOrRegion>1</CountryOrRegion>
                    <LongDistanceAccess>9</LongDistanceAccess>
                    <OutsideAccess>9</OutsideAccess>
                    <PulseOrToneDialing>1</PulseOrToneDialing>
                    <DisableCallWaiting>""</DisableCallWaiting>
                    <InternationalCarrierCode>""</InternationalCarrierCode>
                    <LongDistanceCarrierCode>""</LongDistanceCarrierCode>
                    <Name>Default</Name>
                </TapiUnattendLocation>
            </component>
            <component name="Microsoft-Windows-SystemRestore-Main" 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">
                <DisableSR>1</DisableSR>
            </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">
                <UserAccounts>
                    <AdministratorPassword>
                        <Value>QQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBQAGEAcwBzAHcAbwByAGQA</Value>
                        <PlainText>false</PlainText>
                    </AdministratorPassword>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value>B0c@202105</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <Description>Local Account Being Added</Description>
                            <DisplayName>sysadmin</DisplayName>
                            <Group>Users</Group>
                            <Name>sysadmin</Name>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>
                <AutoLogon>
                    <Enabled>true</Enabled>
                    <Username>sysadmin</Username>
                    <Domain>.</Domain>
                    <Password>
                        <Value>QgAwAGMAQAAyADAAMgAxADAANQBQAGEAcwBzAHcAbwByAGQA</Value>
                        <PlainText>false</PlainText>
                    </Password>
                    <LogonCount>999</LogonCount>
                </AutoLogon>
                <FirstLogonCommands>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>wscript.exe %SystemDrive%\LTIBootstrap.vbs</CommandLine>
                        <Description>Lite Touch new OS</Description>
                        <Order>1</Order>
                    </SynchronousCommand>
                </FirstLogonCommands>
                <OOBE>
                    <HideEULAPage>true</HideEULAPage>
                    <ProtectYourPC>1</ProtectYourPC>
                    <HideLocalAccountScreen>true</HideLocalAccountScreen>
                    <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
                    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                </OOBE>
                <RegisteredOrganization>boc</RegisteredOrganization>
                <RegisteredOwner>Windows ??</RegisteredOwner>
                <TimeZone></TimeZone>
            </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>0409:00000409</InputLocale>
                <SystemLocale>en-US</SystemLocale>
                <UILanguage>en-US</UILanguage>
                <UserLocale>en-US</UserLocale>
            </component>
        </settings>
        <settings pass="offlineServicing">
            <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" 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">
                <DriverPaths>
                    <PathAndCredentials wcm:keyValue="1" wcm:action="add">
                        <Path>\Drivers</Path>
                    </PathAndCredentials>
                </DriverPaths>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="wim:d:/pa/windows%2010%201809%20image/sources/install.wim#Windows 10 Enterprise" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    


    本帖子以”现状”提供且没有任何担保,同时也没有授予任何权利。 如果您的问题得到解答,请在登录后将此回复标记为“答案”,非常感谢您的支持。

    • 已标记为答案 姚黎忠 2021年5月27日 12:23
    2021年5月27日 8:44

全部回复

  • 你好,

    您是如果生成的unattend.xml文件?AdministratorPassword这个标签是给内置管理员指定密码。默认情况下,内置管理员帐户在所有默认清洁安装中是禁用的。如果想用其他账户自动登入,要先创建账户。

    请参考下面的帖子生成应答文件。

    Create New Admin Account in MDT

    https://social.technet.microsoft.com/Forums/en-US/eec05a3c-0f3e-4531-8176-c2b1bbb674dc/create-new-admin-account-in-mdt?forum=mdt

                <UserAccounts>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value>ZABlAGwAbABQAGEAcwBzAHcAbwByAGQA</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <Description>Local Account Being Added</Description>
                            <DisplayName>Local_Accnt</DisplayName>
                            <Group>Users</Group>
                            <Name>Hi_World</Name>
                        </LocalAccount>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value>ZABlAGwAbABQAGEAcwBzAHcAbwByAGQA</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <Description>Built-In Local Account #2</Description>
                            <DisplayName>ADM_User</DisplayName>
                            <Group>Administrators</Group>
                            <Name>ADM_User</Name>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>

    更多参考:

    UserAccounts

    https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-shell-setup-useraccounts

    AutoLogon

    https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-shell-setup-autologon


    本帖子以”现状”提供且没有任何担保,同时也没有授予任何权利。 如果您的问题得到解答,请在登录后将此回复标记为“答案”,非常感谢您的支持。



    2021年5月26日 6:58
  • 我在《useraccount》里面添加了如下的代码段,原本是空的

    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value>B0c@202105</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <Description>Local Account Being Added</Description>
                            <DisplayName>sysadmin</DisplayName>
                            <Group>Users</Group>
                            <Name>sysadmin</Name>
                        </LocalAccount>
                    </LocalAccounts>

    我设置的administrator 账户为禁用:

    <Path>cmd /c net user Administrator /active:no</Path>

    接着我设置了<Autologon>

    <AutoLogon>
            <Enabled>true</Enabled>
            <Username>sysadmin</Username>
            <Domain>.</Domain>
            <Password>
              <Value>B0c@202105</Value>
              <PlainText>true</PlainText>
            </Password>
            <LogonCount>999</LogonCount>
          </AutoLogon>

    下方是unattend.xml的所有内容,更新部署共享后尝试安装发现,在安装界面直接报错

    ----------------------------------------------------unattend.xml---------------------------------------------------------------------------------------------------

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
      <settings pass="windowsPE">
        <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
          <ImageInstall>
            <OSImage>
              <WillShowUI>OnError</WillShowUI>
              <InstallTo>
                <DiskID>0</DiskID>
                <PartitionID>1</PartitionID>
              </InstallTo>
              <InstallFrom>
                <Path>.\Operating Systems\Windows_10_CMGE_V2020-L_17763.1697 x64\Sources\install.wim</Path>
                <MetaData>
                  <Key>/IMAGE/INDEX</Key>
                  <Value>1</Value>
                </MetaData>
              </InstallFrom>
            </OSImage>
          </ImageInstall>
          <ComplianceCheck>
            <DisplayReport>OnError</DisplayReport>
          </ComplianceCheck>
          <UserData>
            <AcceptEula>true</AcceptEula>
            <ProductKey>
              <Key></Key>
            </ProductKey>
          </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>0409:00000409</InputLocale>
          <SystemLocale>en-US</SystemLocale>
          <UILanguage>en-US</UILanguage>
          <UserLocale>en-US</UserLocale>
        </component>
      </settings>
      <settings pass="generalize">
        <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">
          <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
        </component>
      </settings>
      <settings pass="specialize">
        <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
          <Identification>
            <Credentials>
              <Username></Username>
              <Domain></Domain>
              <Password></Password>
            </Credentials>
            <JoinDomain></JoinDomain>
            <JoinWorkgroup></JoinWorkgroup>
            <MachineObjectOU></MachineObjectOU>
          </Identification>
        </component>
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
          <ComputerName></ComputerName>
          <ProductKey></ProductKey>
          <RegisteredOrganization>boc</RegisteredOrganization>
          <RegisteredOwner>Windows 用户</RegisteredOwner>
          <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
          <TimeZone>Pacific Standard Time</TimeZone>
        </component>
        <component name="Microsoft-Windows-IE-InternetExplorer" 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">
          <Home_Page>about:blank</Home_Page>
        </component>
        <component name="Microsoft-Windows-Deployment" 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">
          <RunSynchronous>
            <RunSynchronousCommand wcm:action="add">
              <Description>EnableAdmin</Description>
              <Order>1</Order>
              <Path>cmd /c net user Administrator /active:no</Path>
            </RunSynchronousCommand>
            <RunSynchronousCommand wcm:action="add">
              <Description>UnfilterAdministratorToken</Description>
              <Order>2</Order>
              <Path>cmd /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v FilterAdministratorToken /t REG_DWORD /d 0 /f</Path>
            </RunSynchronousCommand>
            <RunSynchronousCommand wcm:action="add">
              <Description>disable user account page</Description>
              <Order>3</Order>
              <Path>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\OOBE /v UnattendCreatedUser /t REG_DWORD /d 1 /f</Path>
            </RunSynchronousCommand>
            <RunSynchronousCommand wcm:action="add">
              <Description>disable async RunOnce</Description>
              <Order>4</Order>
              <Path>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer /v AsyncRunOnce /t REG_DWORD /d 0 /f</Path>
            </RunSynchronousCommand>
          </RunSynchronous>
        </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>0409:00000409</InputLocale>
          <SystemLocale>en-US</SystemLocale>
          <UILanguage>en-US</UILanguage>
          <UserLocale>en-US</UserLocale>
        </component>
        <component name="Microsoft-Windows-TapiSetup" 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">
          <TapiConfigured>0</TapiConfigured>
          <TapiUnattendLocation>
            <AreaCode>""</AreaCode>
            <CountryOrRegion>1</CountryOrRegion>
            <LongDistanceAccess>9</LongDistanceAccess>
            <OutsideAccess>9</OutsideAccess>
            <PulseOrToneDialing>1</PulseOrToneDialing>
            <DisableCallWaiting>""</DisableCallWaiting>
            <InternationalCarrierCode>""</InternationalCarrierCode>
            <LongDistanceCarrierCode>""</LongDistanceCarrierCode>
            <Name>Default</Name>
          </TapiUnattendLocation>
        </component>
        <component name="Microsoft-Windows-SystemRestore-Main" 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">
          <DisableSR>1</DisableSR>
        </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">
          <UserAccounts>
            <AdministratorPassword>
              <Value></Value>
              <PlainText>true</PlainText>
            </AdministratorPassword>
    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value>B0c@202105</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <Description>Local Account Being Added</Description>
                            <DisplayName>sysadmin</DisplayName>
                            <Group>Users</Group>
                            <Name>sysadmin</Name>
                        </LocalAccount>
                    </LocalAccounts>
          </UserAccounts>
          <AutoLogon>
            <Enabled>true</Enabled>
            <Username>sysadmin</Username>
            <Domain>.</Domain>
            <Password>
              <Value>B0c@202105</Value>
              <PlainText>true</PlainText>
            </Password>
            <LogonCount>999</LogonCount>
          </AutoLogon>
          <Display>
            <ColorDepth></ColorDepth>
            <HorizontalResolution></HorizontalResolution>
            <RefreshRate></RefreshRate>
            <VerticalResolution></VerticalResolution>
          </Display>
          <FirstLogonCommands>
            <SynchronousCommand wcm:action="add">
              <CommandLine>wscript.exe %SystemDrive%\LTIBootstrap.vbs</CommandLine>
              <Description>Lite Touch new OS</Description>
              <Order>1</Order>
            </SynchronousCommand>
          </FirstLogonCommands>
          <OOBE>
            <HideEULAPage>true</HideEULAPage>
            <NetworkLocation>Work</NetworkLocation>
            <ProtectYourPC>1</ProtectYourPC>
            <HideLocalAccountScreen>true</HideLocalAccountScreen>
            <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
            <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
          </OOBE>
          <RegisteredOrganization>boc</RegisteredOrganization>
          <RegisteredOwner>Windows 用户</RegisteredOwner>
          <TimeZone></TimeZone>
        </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>0409:00000409</InputLocale>
          <SystemLocale>en-US</SystemLocale>
          <UILanguage>en-US</UILanguage>
          <UserLocale>en-US</UserLocale>
        </component>
      </settings>
      <settings pass="offlineServicing">
        <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" 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">
          <DriverPaths>
            <PathAndCredentials wcm:keyValue="1" wcm:action="add">
              <Path>\Drivers</Path>
            </PathAndCredentials>
          </DriverPaths>
        </component>
      </settings>
    </unattend>

    -------------------------------------------------------------------unattend.xml------------------------------------------------------------------------------------

    2021年5月26日 9:06
  • 你好,

    当我通过Windows SIM 关联你的unattend.xml和Windows 10镜像的时候出现下面的报错。

    当你把下面的报错都处理好的时候,部署应该就可以成功了。

    注意:

    Windows SIM 会对应答文件中的设置值与 Windows 映像中的可用设置进行比较。
    如果应答通过验证,“验证”选项卡上的“消息”窗格中将显示一条消息。该消息验证应答文件中未出现警告或错误。否则,同样的位置将出现错误消息。如果出现错误,请双击“消息”窗格中的该错误以浏览到设置。如果尚未对组件设置进行任何修改,则不会在该应答文件中保存此组件设置值。

    测试调用方式:

    g:\setup.exe /unattend:r:\x64_bios_auto.xml
    setup.exe  #windows官方原版安装光盘里的安装程序,这里假定是g盘
    /unattend  #setup.exe调用应答文件的选项,可以setup.exe /?查看
    r:\x64_bios_auto.xml  #应答文件存放位置,可以是SMB主机上映射过来的网络驱动器

    可以手动引用,可以放在安装源的根目录,或放在U盘的根目录,还可以直接写到WinPE初始化脚本里。
    Wpeinit –unattend:"C:\Unattend-PE.xml"



    本帖子以”现状”提供且没有任何担保,同时也没有授予任何权利。 如果您的问题得到解答,请在登录后将此回复标记为“答案”,非常感谢您的支持。



    2021年5月27日 7:29
  • Hi Xin Guo,这边有一个问题,就是神州网信的镜像,我怀疑由于神网对系统做了修改,在我生成编录文件的时候,直接报错乱码,所以不能通过这个图形化的应答文件来修改,只能直接编辑unattend.xml文件
    2021年5月27日 8:08
  • 编录一个正确文件,然后把对应的标签移过去呢。

    我这个是不报错的你也可以参考下:

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="windowsPE">
            <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
                <ImageInstall>
                    <OSImage>
                        <WillShowUI>OnError</WillShowUI>
                        <InstallTo>
                            <DiskID>0</DiskID>
                            <PartitionID>1</PartitionID>
                        </InstallTo>
                        <InstallFrom>
                            <Path>.\Operating Systems\Windows_10_CMGE_V2020-L_17763.1697 x64\Sources\install.wim</Path>
                            <MetaData>
                                <Key>/IMAGE/INDEX</Key>
                                <Value>1</Value>
                            </MetaData>
                        </InstallFrom>
                    </OSImage>
                </ImageInstall>
                <ComplianceCheck>
                    <DisplayReport>OnError</DisplayReport>
                </ComplianceCheck>
                <UserData>
                    <AcceptEula>true</AcceptEula>
                    <ProductKey>
                        <Key></Key>
                    </ProductKey>
                </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>0409:00000409</InputLocale>
                <SystemLocale>en-US</SystemLocale>
                <UILanguage>en-US</UILanguage>
                <UserLocale>en-US</UserLocale>
            </component>
        </settings>
        <settings pass="generalize">
            <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">
                <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
            </component>
        </settings>
        <settings pass="specialize">
            <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
                <Identification>
                    <Credentials>
                        <Username></Username>
                        <Domain></Domain>
                        <Password></Password>
                    </Credentials>
                    <JoinDomain></JoinDomain>
                    <JoinWorkgroup></JoinWorkgroup>
                    <MachineObjectOU></MachineObjectOU>
                </Identification>
            </component>
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
                <ComputerName></ComputerName>
                <ProductKey></ProductKey>
                <RegisteredOrganization>boc</RegisteredOrganization>
                <RegisteredOwner>Windows ??</RegisteredOwner>
                <DoNotCleanTaskBar>true</DoNotCleanTaskBar>
                <TimeZone>Pacific Standard Time</TimeZone>
            </component>
            <component name="Microsoft-Windows-IE-InternetExplorer" 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">
                <Home_Page>about:blank</Home_Page>
            </component>
            <component name="Microsoft-Windows-Deployment" 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">
                <RunSynchronous>
                    <RunSynchronousCommand wcm:action="add">
                        <Description>EnableAdmin</Description>
                        <Order>1</Order>
                        <Path>cmd /c net user Administrator /active:no</Path>
                    </RunSynchronousCommand>
                    <RunSynchronousCommand wcm:action="add">
                        <Description>UnfilterAdministratorToken</Description>
                        <Order>2</Order>
                        <Path>cmd /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v FilterAdministratorToken /t REG_DWORD /d 0 /f</Path>
                    </RunSynchronousCommand>
                    <RunSynchronousCommand wcm:action="add">
                        <Description>disable user account page</Description>
                        <Order>3</Order>
                        <Path>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\OOBE /v UnattendCreatedUser /t REG_DWORD /d 1 /f</Path>
                    </RunSynchronousCommand>
                    <RunSynchronousCommand wcm:action="add">
                        <Description>disable async RunOnce</Description>
                        <Order>4</Order>
                        <Path>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer /v AsyncRunOnce /t REG_DWORD /d 0 /f</Path>
                    </RunSynchronousCommand>
                </RunSynchronous>
            </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>0409:00000409</InputLocale>
                <SystemLocale>en-US</SystemLocale>
                <UILanguage>en-US</UILanguage>
                <UserLocale>en-US</UserLocale>
            </component>
            <component name="Microsoft-Windows-TapiSetup" 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">
                <TapiConfigured>0</TapiConfigured>
                <TapiUnattendLocation>
                    <AreaCode>""</AreaCode>
                    <CountryOrRegion>1</CountryOrRegion>
                    <LongDistanceAccess>9</LongDistanceAccess>
                    <OutsideAccess>9</OutsideAccess>
                    <PulseOrToneDialing>1</PulseOrToneDialing>
                    <DisableCallWaiting>""</DisableCallWaiting>
                    <InternationalCarrierCode>""</InternationalCarrierCode>
                    <LongDistanceCarrierCode>""</LongDistanceCarrierCode>
                    <Name>Default</Name>
                </TapiUnattendLocation>
            </component>
            <component name="Microsoft-Windows-SystemRestore-Main" 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">
                <DisableSR>1</DisableSR>
            </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">
                <UserAccounts>
                    <AdministratorPassword>
                        <Value>QQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBQAGEAcwBzAHcAbwByAGQA</Value>
                        <PlainText>false</PlainText>
                    </AdministratorPassword>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value>B0c@202105</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <Description>Local Account Being Added</Description>
                            <DisplayName>sysadmin</DisplayName>
                            <Group>Users</Group>
                            <Name>sysadmin</Name>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>
                <AutoLogon>
                    <Enabled>true</Enabled>
                    <Username>sysadmin</Username>
                    <Domain>.</Domain>
                    <Password>
                        <Value>QgAwAGMAQAAyADAAMgAxADAANQBQAGEAcwBzAHcAbwByAGQA</Value>
                        <PlainText>false</PlainText>
                    </Password>
                    <LogonCount>999</LogonCount>
                </AutoLogon>
                <FirstLogonCommands>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>wscript.exe %SystemDrive%\LTIBootstrap.vbs</CommandLine>
                        <Description>Lite Touch new OS</Description>
                        <Order>1</Order>
                    </SynchronousCommand>
                </FirstLogonCommands>
                <OOBE>
                    <HideEULAPage>true</HideEULAPage>
                    <ProtectYourPC>1</ProtectYourPC>
                    <HideLocalAccountScreen>true</HideLocalAccountScreen>
                    <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
                    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                </OOBE>
                <RegisteredOrganization>boc</RegisteredOrganization>
                <RegisteredOwner>Windows ??</RegisteredOwner>
                <TimeZone></TimeZone>
            </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>0409:00000409</InputLocale>
                <SystemLocale>en-US</SystemLocale>
                <UILanguage>en-US</UILanguage>
                <UserLocale>en-US</UserLocale>
            </component>
        </settings>
        <settings pass="offlineServicing">
            <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" 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">
                <DriverPaths>
                    <PathAndCredentials wcm:keyValue="1" wcm:action="add">
                        <Path>\Drivers</Path>
                    </PathAndCredentials>
                </DriverPaths>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="wim:d:/pa/windows%2010%201809%20image/sources/install.wim#Windows 10 Enterprise" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    


    本帖子以”现状”提供且没有任何担保,同时也没有授予任何权利。 如果您的问题得到解答,请在登录后将此回复标记为“答案”,非常感谢您的支持。

    • 已标记为答案 姚黎忠 2021年5月27日 12:23
    2021年5月27日 8:44