However, if it was accidental because you had used a third party application or command line tool which failed, then this article explains how to recover that mistakenly deleted profile. Usually when this happens, you can’t log into Windows 10 with this account, and the only thing you can think about is getting the user data that’s left over.
You deleted your user profile by mistake and you can no longer log in
You deleted your user profile by mistake and you can no longer log into Windows 10. What to do? How to connect? How to recover user account or user files?
- Perform a system restore.
- Restore manually using the registry.
These are the only two methods that can help you aside from using file recovery software. It can work, but it can be cumbersome.
Perform a system restore
If you often create system restores, restoring the computer to a previous working state can restore the user account and all of its files. You will need an administrator account to perform this operation.
- Type System Restauration in menu search Start.
- Click the restore option when it appears. You can also access it from the Recovery Control Panel.
- Then click on Open System Restore for a list of dates on which you can restore.
- Select one of the dates the account existed and choose to restore.
Once done, restart the computer, and you should see the account on the login screen.
Restore manually using the registry
If the deletion of the account was due to corruption or third-party software, there’s a good chance your account was not deleted, and a fix in the registry can help you get it back.
- Type regedit in the dialog Execute (Windows + R), then press the Entrance. The Registry Editor opens. Navigate to the following path to locate the user profile:
- All user profiles will be listed with names like S-1-5-21-991350227-4168754500-3041839445-1001.
- Locate the one that has a BAK at the end of the name, for example, S-1-5-21-991350227-4168754500-3041839445-1001.bak.
- Delete the key that does not have a BAK, then rename the one that has a BAK with a name without the BAK.
- Finally, locate the user’s profile folder in the folder C: Users and write it down. The same path must be entered in ProfileImagePath. Double click to edit and save it.
Loss of administrator account
If you have lost your administrator account and there is no way to log into the computer, you can use the advanced recovery method to enable the hidden administrator account and then use it to create a new account. You can also use the administrator account to access the C: users folder and locate the files it contains.
- In advanced recovery, select Troubleshooting> Advanced Options> Command Prompt.
- Type the following:
net user administrator P@$$w0rd
net user administrator /active:yes
- Press the key Entrance.
- Restart the computer, and use P @ $$ w0rd to log into this account.
Hoping that with this article you were able to recover your user account or at least the files.