reference: https://neosmart.net/wiki/corrupt-user-profile/
Fix #2: Registry Editor
Login as an Administrator. If you’re not able to do so, go to Cannot log in / No other user account available.
Open the Registry Editor and navigate to this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
Find the S-1 folder with .bak extension under the ProfileList folder, on the left pane
At the ProfileImagePath value, on the right pane, find if the path is correct: C:\Users\MY_USERNAME
Go to the C:\Users folder and check that the folder name of the corrupted username is the same as the one in the ProfileImagePath: MY_USERNAME. If it’s not, rename it.
Go back to the Registry Editor and check if the folder name with the .bak extension has a duplicate folder, with the same name but without the .bak extension.Example:
S-1-5-23232
S-1-5-23232.bak
If you have 2 folders with the same name (1 without .bak, 1 with .bak), follow these instructions:
Rename the folder with .bak extension to be without .bak and vice versa: the without .bak folder to have .bak afterwards.
To do that, follow these steps:
Rename the .bak folder to .backup
Rename the folder without .bak to .bak
Rename the .backup folder name to have no extension
If you have only 1 folder name with a .bak extension, follow these steps:
Remove .bak to only leave the folder name: S-1-5-23232
Now go to the folder without .bak and find a RefCount item. The RefCount value should be 0.To edit it, double click on RefCount and edit the Value data field to be 0.If you don’t have a RefCount item, create it:
Right-click on an empty zone on the right and click New
Click DWORD (32 bit) Value
Type RefCount
Press Enter
Click OK
Go the same folder without .bak and find a State item
The State value should be 0. If it’s not, edit it:
Double-click on State
Enter 0 at the Value data field
Click OK
If you don’t have a State item, create it:
Right-click on an empty zone in the right pane and click New
Click DWORD (32 bit) Value
Type State
Press Enter
Close the Registry Editor
Restart the computer
Login to your computer with the corrupt user account