Your system will reboot and display a list of numbered startup options. Now press 4or F4to enter Safe Mode.
In Safe Mode, press Win+ Rto open the Run dialog box.
Under the ProfileList key, you'll find several folders that begin with S-1-5. Click on each one and inspect ProfileImagePaththe entry to determine which one is associated with your problematic user account.
Go to the following path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
In our example, the user profile rajst with the SID austria telegram data key - "S-1-5-21-2965335139-3050804504-3361004240-1002" is the one that causes the "User Profile Service failed the logon" error.
Once you have found the profile you want, double-click the Stateentry in the right pane and change its value to 0. Click OK .
Then double-click RefCountand set its value to 0. If RefCountit's not there, right-click in the right pane, select New > DWORD 32-bit Value , name it RefCountand set its value to 0.
If you have two identical profile keys, one with .bakan extension and one without, rename the one without .bakby adding ewat the end. Then remove it .bakfrom the other key.
Now rename the key ewby adding .bakat the end.
Make sure that the key corresponding to your user profile now has no extension. Change it Stateand RefCountthe values 0as described earlier.