Issues with unattended file for windows 11 but works with windows 10 fine

ishara perera 6 Reputation points
2023-03-15T09:50:00.8166667+00:00
Hi Friends 

 

I have this unattended file  

 

is there anything wrong with this file could someone advise  

 

this is for windows 11

<?xml version="1.0" encoding="utf-8"?>

<unattend xmlns="urn:schemas-microsoft-com:unattend">

    <settings pass="generalize">

        <component name="Microsoft-Windows-Security-SPP" 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">

            <SkipRearm>0</SkipRearm>

        </component>

    </settings>

    <settings pass="specialize">

        <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">

                    <Order>1</Order>

                    <Path>net user administrator /active:yes</Path>

                </RunSynchronousCommand>

            </RunSynchronous>

        </component>

        <component name="Microsoft-Windows-UnattendedJoin" 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">

            <Identification>

                <Credentials>

                    <Domain>xxxx</Domain>

                    <Password>xxxx</Password>

                    <Username>xxxx</Username>

                </Credentials>

                <DebugJoin>true</DebugJoin>

                <JoinDomain>someone.com</JoinDomain>

            </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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

            <ComputerName>ReplaceMe1</ComputerName>

            <RegisteredOwner>Sxxx</RegisteredOwner>

            <TimeZone>Coordinated Universal Time</TimeZone>

            <RegisteredOrganization>xxx</RegisteredOrganization>

            <OEMInformation>

                <Manufacturer>xx</Manufacturer>

                <SupportPhone>xx</SupportPhone>

                <SupportHours>8am to 5pm - Weekdays</SupportHours>

                <Model>Dell Precision 3560</Model>

                <Logo>C:\Windows\Snap-on OEM Logo.bmp</Logo>

            </OEMInformation>

            <CopyProfile>true</CopyProfile>

        </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-GB</InputLocale>

            <SystemLocale>en-GB</SystemLocale>

            <UILanguage>en-GB</UILanguage>

            <UserLocale>en-GB</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">

            <FirstLogonCommands>

                <SynchronousCommand wcm:action="add">

                    <CommandLine>cscript /b c:\windows\system32\slmgr.vbs /ipk KEY  </CommandLine>

                    <Order>1</Order>

                    <RequiresUserInput>false</RequiresUserInput>

                </SynchronousCommand>

                <SynchronousCommand wcm:action="add">

                    <CommandLine>C:\Windows\System32\sysprep\STheme.bat</CommandLine>

                    <Description> Theme</Description>

                    <Order>3</Order>

                    <RequiresUserInput>false</RequiresUserInput>

                </SynchronousCommand>

            </FirstLogonCommands>

            <OOBE>

                <HideEULAPage>true</HideEULAPage>

                <ProtectYourPC>1</ProtectYourPC>

            </OOBE>

            <UserAccounts>

                <DomainAccounts>

                    <DomainAccountList wcm:action="add">

                        <Domain>someone</Domain>

                        <DomainAccount wcm:action="add">

                            <Group>Administrators</Group>

                            <Name>ReplaceMe2</Name>

                        </DomainAccount>

                        <DomainAccount wcm:action="add">

                            <Name>some group </Name>

                            <Group>Administrators</Group>

                        </DomainAccount>

                    </DomainAccountList>

                </DomainAccounts>

                <AdministratorPassword>

                    <Value> sample value ==</Value>

                    <PlainText>false</PlainText>

                </AdministratorPassword>

            </UserAccounts>

            <RegisteredOrganization>xxx</RegisteredOrganization>

            <RegisteredOwner>xxxx</RegisteredOwner>

        </component>

    </settings>

    <cpi:offlineImage cpi:source="wim:g:/sources/install.wim#Windows 10 Pro" xmlns:cpi="urn:schemas-microsoft-com:cpi" />

</unattend>

Also I use this to inject username and computer name on bootup 

but one of these needs changing I dont know which can anyone help 

Option Explicit 

Dim answer, answer2, computerName, domainAdminPass, unattendFile, WshShell, fso, unattendFileObject, strContents 

 

unattendFile = "C:\Windows\System32\Sysprep\unattend.xml" 

 

Set WshShell = WScript.CreateObject("WScript.Shell") 

Set fso = CreateObject("Scripting.FileSystemObject") 

 

Do While answer <> vbYes 

   computerName = InputBox("Enter the desired Computer Name:", "Computer Name") 

   answer = MsgBox("Is this correct?" & vbCrLf & "Computer Name: " & computerName, vbYesNo, "Verify Name") 

Loop 

 

Do While answer2 <> vbYes 

   domainAdminPass = InputBox("Enter the domain User ID :", "User ID") 

   answer2 = MsgBox("Are you sure?" & vbCrLf & "UserID: " & domainAdminPass, vbYesNo, "Verify User ID.  The system will take 5 to 10 minutes  to complete install.  Please be patient.") 

Loop 

 

If fso.FileExists(unattendFile) = False Then 

   wscript.echo "ERROR: Could not find the unattend file" 

Else 

   'Read the unattend file in and replace apprpriate variables 

   Set unattendFileObject = fso.OpenTextFile(unattendFile, 1) 

   strContents = unattendFileObject.ReadAll 

   strContents = Replace(strContents, "ReplaceMe1", computerName) 

   strContents = Replace(strContents, "ReplaceMe2", domainAdminPass) 

   unattendFileObject.Close 

 

   'Write the updated contents back to the unattend file 

   Set unattendFileObject = fso.OpenTextFile(unattendFile, 2) 

   unattendFileObject.Write(strContents) 

   unattendFileObject.Close 

End If 

 

' Launch setup (will use the modified unattend.xml) 

WScript.Sleep 5000 

WshShell.Run "%WINDIR%\System32\oobe\windeploy.exe", 0, True 
Windows for business | Windows Server | User experience | Other
Windows for business | Windows Client for IT Pros | User experience | Other
{count} vote

1 answer

Sort by: Most helpful
  1. Limitless Technology 44,771 Reputation points
    2023-03-16T14:25:33.5566667+00:00

    Hello there,

    1,Please check the netsetup.log, smsts.log, setupact.log on the client to see if there is any useful information.

    2,If possible, we can download the Windows 11 OS image from Microsoft volume center and build a reference workgroup computer, then re-capture a reference image to have a try.

    3.Also make sure do not skip OOBE steps in your CustomSettings.ini.

    The below thread discusses the same issue and you can try out some troubleshooting steps from this and see if that helps you to sort the Issue.

    https://learn.microsoft.com/en-us/answers/questions/1181139/why-is-my-windows-11-deployment-not-reading-or-usi

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer--

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.