PENDING problem in Windows 10 20H2 Unattend.xml "Incorrect username or password"

8
0
1
In my SCCM 2107, I'm creating a Windows 10 20H2 offline media, and in the task sequence "Apply Operating System Image" I have this unattend.xml configured:

XML:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <AutoLogon>
                <Password>
                    <Value>econded_password</Value>
                    <PlainText>false</PlainText>
                </Password>
                <Enabled>true</Enabled>
                <LogonCount>2</LogonCount>
                <Username>localadmin_cpy</Username>
            </AutoLogon>
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <HideLocalAccountScreen>true</HideLocalAccountScreen>
                <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
                <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
                <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                <NetworkLocation>Work</NetworkLocation>
                <ProtectYourPC>1</ProtectYourPC>
            </OOBE>
            <UserAccounts>
                <AdministratorPassword>
                    <Value>encoded_password_adminpassword</Value>
                    <PlainText>false</PlainText>
                </AdministratorPassword>
            </UserAccounts>
            <VisualEffects>
                <FontSmoothing>ClearType</FontSmoothing>
            </VisualEffects>
        </component>
    </settings>
</unattend>

I have a .bat script that runs before the OSD completely finishes, where it changes the name from "Administrator" to "localadmin_cpy". The problem is not here, but when the OSD finishes, when it finishes, it says "Incorrect username or password" and then goes to the login screen, where I need to manually enter the credentials (since I configured it in unattend.xml for it authenticate alone only 2 times).

But when I add the lines:
XML:
<SkipMachineOOBE>true</SkipMachineOOBE>
<SkipUserOOBE>true</SkipUserOOBE>

I have no problems with the error "Incorrect username or password" and it works perfectly. But as Microsoft reports that these lines are deprecated, it does not recommend using them, and on a specific model (Dell Latitude 5480, But in the case of Dell Latitude 5480, I've tried everything, I left without any unattend.xml, I've removed the two deprecated lines, I've updated the BIOS and nothing, it seems that nothing works on it.) after the "Setup Windows and ConfigMgr" task and restarting the computer, the installation does not continue and I get stuck in a all black screen. So I decided to do the test without even using autologin, leaving the XML file like this:

XML:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <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" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <OOBE>
                <HideEULAPage>true</HideEULAPage>
                <HideLocalAccountScreen>true</HideLocalAccountScreen>
                <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
                <HideOnlineAccountScreens>true</HideOnlineAccountScreens>
                <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                <NetworkLocation>Work</NetworkLocation>
                <ProtectYourPC>1</ProtectYourPC>
            </OOBE>
        </component>
    </settings>
</unattend>

Even leaving unattend.xml like this, just auto-completing the OOBE, the "Incorrect username or password" still appears. Even leaving the unattend.xml that way, just auto-completing the OOBE, the "Incorrect username or password" still appears. I was informed on reddit that now it's not even necessary to use unattend.xml in the Task Sequence anymore, so I decided to do it that way, and I have the same problem. But at ISO 2004, I don't have this problem. Why the hell is this happening? Can someone help me please?
 
OP
Deilson Oliveira
8
0
1
So does this issue occurs even if you don't use unattend.xml ?. Have you tested it correctly?
I believe I tested correctly yes, basically I went to the task sequence "Apply Operating System Image" and just unchecked the checkbox "Use an unattended or Sysprep answer file for a custom installation" and generated the image again (here we use offline media)

The curious thing is that even leaving without the unattend.xml file, even at the end of the OSD, I see the screen "Incorrect users or password". Maybe it's because I have a .bat file near the end of the OSD that changes the name Administrator to "localadmin_cpy"? this is my .bat file that performs final customizations in the "Default User".

Code:
@ECHO OFF
REM LOAD DEFAULT PROFILE IN REGEDIT
SET HKEY=HKU\Default
REG LOAD %HKEY% %SystemDrive%\Users\Default\NTUSER.DAT

REM --- WINDOWS EXPLORER TWEAKS ---
REG ADD "%HKEY%\SOFTWARE\Microsoft\Windows\CurrentVersion\Cortana" /v IsAvailable /t REG_DWORD /d 0 /f
REG ADD "%HKEY%\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f
REG ADD "%HKEY%\Software\Policies\Microsoft\Windows\Explorer" /v DisableNotificationCenter /t REG_DWORD /d 1 /f
REG ADD "%HKEY%\Software\Microsoft\Windows\CurrentVersion\Search" /v SearchboxTaskbarMode /t REG_DWORD /d 1 /f
REG ADD "%HKEY%\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowTaskViewButton /t REG_DWORD /d 0 /f
REG ADD "%HKEY%\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoStartMenuMorePrograms /t REG_DWORD /d 2 /f
REG ADD "%HKEY%\Software\Policies\Microsoft\Windows\Explorer" /v HideRecentlyAddedApps /t REG_DWORD /d 1 /f
REG ADD "%HKEY%\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
REG ADD "%HKEY%\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v AutoCheckSelect /t REG_DWORD /d 0 /f
REG ADD "%HKEY%\Software\Policies\Microsoft\Windows\Explorer" /v LockedStartLayout /t REG_DWORD /d 1 /f
REG DELETE "%HKEY%\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f
REG IMPORT %~dp0disable_feeds.reg
REG IMPORT %~dp0Set-LockScreen.reg

REM --- WINDOWS ACCOUNT ADMINISTRATOR TWEAK ---
wmic useraccount where name='Administrador' call rename name='localadmin_cpy'

REM --- ONEDRIVE TWEAKS ---
REM REG ADD "%HKEY%\Software\Policies\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /f

REM --- JAVA TWEAKS ---
REG IMPORT %~dp0disable_java_update.reg

REM UNLOAD DEFAULT PROFILE IN REGEDIT
REG UNLOAD %HKEY%