0

我创建了以下 Unattend.xml 文件。唯一的问题是它不会将用户添加到用户组。

我在谷歌上搜索我做错了什么,但我似乎无法找出问题所在。它应该根据我找到的文档工作。我使用 Windows 系统映像管理器来创建此文件。

有谁知道我做错了什么?

<? 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\os\os.wim</Path>
                        <MetaData>
                            <Key>/IMAGE/INDEX</Key>
                            <Value>1</Value>
                        </MetaData>
                    </InstallFrom>
                    <InstallToAvailablePartition>true</InstallToAvailablePartition>
                </OSImage>
            </ImageInstall>
            <ComplianceCheck>
                <DisplayReport>OnError</DisplayReport>
            </ComplianceCheck>
            <UserData>
                <AcceptEula>true</AcceptEula>
                <ProductKey>
                    <Key>WindowsSerialKey</Key>
                    <WillShowUI>Never</WillShowUI>
                </ProductKey>
                <Organization>Stuiter</Organization>
            </UserData>
            <EnableFirewall>true</EnableFirewall>
            <EnableNetwork>true</EnableNetwork>
            <Restart>Restart</Restart>
        </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 = "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>hashed password</Value>
                    <PlainText>false</PlainText>
                </AdministratorPassword>
                <LocalAccounts>
                    <LocalAccount wcm:action= "add" >
                        < Password >
                            < Value > hashed password</Value>
                            <PlainText>false</PlainText>
                        </Password>
                        <Group>Users</Group>
                        <Description>User</Description>
                        <DisplayName>User account</DisplayName>
                        <Name>User</Name>
                    </LocalAccount>
                    <LocalAccount wcm:action= "add" >
                        < Password >
                            < Value > hashed password</Value>
                            <PlainText>false</PlainText>
                        </Password>
                        <Description>Admin user</Description>
                        <DisplayName>Admin user account</DisplayName>
                        <Name>AdminUser</Name>
                        <Group>Administrators</Group>
                    </LocalAccount>
                    <LocalAccount wcm:action= "add" >
                        < Password >
                    < Value > hashed password</Value>
                            <PlainText>false</PlainText>
                        </Password>
                        <Description>User for Support</Description>
                        <DisplayName>Support user account</DisplayName>
                        <Group>Users</Group>
                        <Name>Support</Name>
                    </LocalAccount>
                </LocalAccounts>
            </UserAccounts>
            <AutoLogon>
                <Enabled>true</Enabled>
                <Username>Rimote</Username>
                <Domain>.</Domain>
                <Password>
                    <Value>hashed password</Value>
                    <PlainText>false</PlainText>
                </Password>
                <LogonCount>2147483647</LogonCount>
            </AutoLogon>
            <Display>
                <ColorDepth>32</ColorDepth>
                <HorizontalResolution>1</HorizontalResolution>
                <RefreshRate>60</RefreshRate>
                <VerticalResolution>1</VerticalResolution>
                <DPI>120</DPI>
            </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>false</HideEULAPage>
                <ProtectYourPC>2</ProtectYourPC>
                <HideLocalAccountScreen>false</HideLocalAccountScreen>
                <HideOnlineAccountScreens>false</HideOnlineAccountScreens>
                <HideWirelessSetupInOOBE>false</HideWirelessSetupInOOBE>
                <HideOEMRegistrationScreen>false</HideOEMRegistrationScreen>
                <UnattendEnableRetailDemo>false</UnattendEnableRetailDemo>
            </OOBE>
            <RegisteredOrganization>Stuiter</RegisteredOrganization>
            <RegisteredOwner>Stuiter</RegisteredOwner>
            <TimeZone>W.Europe Standard Time</TimeZone>
            <BluetoothTaskbarIconEnabled>false</BluetoothTaskbarIconEnabled>
            <ConvertibleSlateModePromptPreference>1</ConvertibleSlateModePromptPreference>
            <DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
            <DoNotCleanTaskBar>false</DoNotCleanTaskBar>
            <EnableStartMenu>false</EnableStartMenu>
            <ShowPowerButtonOnStartScreen>false</ShowPowerButtonOnStartScreen>
            <SignInMode>1</SignInMode>
            <WindowsFeatures>
                <ShowInternetExplorer>false</ShowInternetExplorer>
                <ShowMediaCenter>false</ShowMediaCenter>
                <ShowWindowsMediaPlayer>false</ShowWindowsMediaPlayer>
            </WindowsFeatures>
        </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>
        <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">
            <DesktopOptimization>
                <GoToDesktopOnSignIn>true</GoToDesktopOnSignIn>
                <ShowWindowsStoreAppsOnTaskbar>false</ShowWindowsStoreAppsOnTaskbar>
            </DesktopOptimization>
            <OfflineUserAccounts>
                <OfflineAdministratorPassword>
                    <Value>hashed password</Value>
                    <PlainText>false</PlainText>
                </OfflineAdministratorPassword>
                <OfflineLocalAccounts>
                    <LocalAccount wcm:action= "add" >
                        < Password >
                            < Value > hashed password</Value>
                            <PlainText>false</PlainText>
                        </Password>
                        <Description>User</Description>
                        <DisplayName>User</DisplayName>
                        <Group>Users</Group>
                        <Name>User</Name>
                    </LocalAccount>
                    <LocalAccount wcm:action= "add" >
                        < Password >
                            < Value > hashed password</Value>
                            <PlainText>false</PlainText>
                        </Password>
                        <Description>Support user</Description>
                        <DisplayName>Support</DisplayName>
                        <Name>Support</Name>
                        <Group>Users</Group>
                    </LocalAccount>
                    <LocalAccount wcm:action= "add" >
                        < Password >
                            < Value > hashed password</Value>
                            <PlainText>false</PlainText>
                        </Password>
                        <Description>Admin user</Description>
                        <DisplayName>Admin user</DisplayName>
                        <Group>Administrators</Group>
                        <Name>AdminUser</Name>
                    </LocalAccount>
                </OfflineLocalAccounts>
            </OfflineUserAccounts>
        </component>
    </settings>
</unattend>
4

1 回答 1

0

对我来说看起来不错,但首先您可以尝试在Windows System Image Manager中验证答案文件。完成它的另一种方法是,您还可以使用称为Windows 映像和配置设计器的第二个工具,它在那里工作正常。

于 2018-03-05T15:12:07.960 回答