READ ALSO -> User Account Management Guide in Windows 10 and Windows 11
Restore user profile from registry
If the temporary account of our own account is still bootable we can act directly from the registry to restore the functioning of our old profile, without having to create a new one. To proceed, open the Start menu at the bottom left, type the command cmd, we open the command prompt and type the command whoami /user. After executing the command we copy the string present under the item SIDby pressing on Ctrl+M to enable the highlighting in the prompt, using the left key pressed to select and finally pressing up Ctrl+C to copy.
After copying our SID code, we open the registry editor by pressing on the Start menu at the bottom left and searching regedit. In the new window that will open, let’s take the following path, paying attention to all the roots present:
We expand the last folder indicated and check inside it if there are two folders with the same SID copied previously: one of the two folders is indicated as BAK, that is, it is a backup of the user profile that Windows performed before the problem occurred. To restore it, all we have to do is delete the folder with the SID code without BAK (right click on it -> Remove) and proceed by renaming the folder with the SID code followed by BAK, right-clicking on it and using the function Rename. When renaming the folder we remove only the writing .BEHIND (being careful not to delete any other letters or numbers), we confirm with OK.
After restoring the backup of the profile, select the SID folder, go to the right side of the editor and check that the path present in ProfileImagePath is correct (something like C: Users Username). To enable the profile, double-click on the item State and make sure to set 0 as the value in the field. We close each window and restart the computer, so that we can access our blocked profile again.
Create a new profile and restore it
If there is no backup of the damaged profile or the PC cannot access even the temporary profile, a new local user profile should be created immediately and proceed with copying and restoring the data present in the “damaged” profile.
To proceed with this method we start the computer in safe mode, following the instructions on the recovery screen (Choose an option -> Go to Troubleshooting> Advanced options> Startup settings> Restart and then press the F4 key).
Entered in safe mode we proceed with the activation of the Administrator profile hidden, so you can make all the necessary changes. To activate the account we search cmd in the Start menu and launch the command net user administrator /active:yes, as also seen in our guide How to get administrator privileges on Windows 10 and 11.
After this change we restart the computer and enter the new Administrator account; as soon as we arrive in the new account we click on WIN+I, let’s take the path Accounts -> Family and other users and press on Add another user to this PC. In the window that will appear, click on I don’t have this person’s login information, then we press on Add a user without a Microsoft account, and create a fully functional local account (using a made-up username).
After this change we exit the settings window, press on WIN+R and we type C:Users, so as to immediately open the Windows folder that contains the user profiles: all that remains is to copy all the files on the old blocked profile.
After the transfer, we exit the Administrator profile and open the new profile to start using the computer as before. For completeness we can very well delete the old user profile as seen in the guide Deleting a User Account in Windows 10 and 11; let’s not forget to hide the administrator profile as well, by launching a command prompt again and this time using the command net user administrator /active:no. To restart the synchronization with the Microsoft account, just follow the steps seen in our article Why use Microsoft account in Windows 10 and 11.
To solve other types of problems with Windows we can continue reading on our articles How to turn on the PC if Windows does not start? and Start with a new Windows PC.