Solve the problem of being unable to log in to an account when Windows is turned on, and then logging out once logged in

I used the original factory system of MateBook E. I updated Windows 11 22H2 when I had nothing to do, but something happened. I just started the computer after the update, but after restarting it crashed. I was stuck on the Windows account login interface and couldn't log in. When I clicked the login button, it circled "Welcome" and then directly said "Logout".

At first I thought the user account was disabled, but after adding a new user through the cmd command line, it still didn't work.

Finally found the cause of the problem. I really didn’t expect Huawei to have such a smart programmer. It’s outrageous to write the startup entry of the stylus driver directly into the Userinit of Winlogon in the registry. Then after updating the system, the driver will also be automatically updated, causing the exe file to be deleted. After restarting, I can no longer access the desktop.
Insert image description here
Solution: Hold down the Shift key and click the Restart button in the power menu, or press F8 while booting to enter the Windows recovery menu, start the command line environment (or directly use a USB disk to start the PE environment), first change the name C:\Windows\system32\osk.exe, Then C:\Windows\system32\cmd.execopy the name and change it to osk.exe, so that we can open the command line window through the "on-screen keyboard" of the accessibility function on the login interface.

Then start regedit, modify the value HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogonin the registry and change it back to the default.UserinitC:\Windows\system32\userinit.exe

Don’t forget to change osk.exe back after successfully entering the system.

Guess you like

Origin blog.csdn.net/yakamoz423/article/details/132863294