Edit: Okay, based on what you've updated your original question with you need to do two things.
You deleted the registry key that basically acts as the bridge between user account and user profile. Without the key the account doesn't know that there's an existing user profile and tries to create one when you log in. Since there was already a profile with the name that it wanted to assign to the new profile it created a new profile that consists of the original name + a random string appended to it.
Please check your registry's profilelist once more and tell us if there's an entry similiar to the one you deleted earlier. If there is we just need to change it's profileimagepath value. If there isn't then we import your exported registry key.
The import needs to be done as administrator (a simple double click on the reg file will trigger the import).
If no registry backup of that key existed this would be my solution.
Ah, that means you've removed the entry that links your user account to your user profile.
- Log in as administrator and rename the user profile in C:\users to something like "profilename.old" (you might want to copy it somewhere safe, too)
- Create a new user (with the same name as the one you messed up) and log in as him and then log off
- Log in as Administrator and copy the contents from C:\users\profilename.old to C:\users\profilename where profilename is the name of your profile
If you really have only removed that single entry in the registry then it's worth considering to recreate it:
Create a new user via the control panel. This will create a new entry for that user. Now Open regedit
and browse to the new entry in the ProfileList. Right click > export to save it as .reg file. Open it with notepad and change the ProfileImagePath Entry to the name of your broken user account. Open Powershell and enter these lines (confirm each line with enter):
$objUser = New-Object System.Security.Principal.NTAccount("broken_username") $strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier]) $strSID.Value
Replace broken_username with the user name that you have problems with. Then replace the sid in the reg file with the output from Powershell. Save and close the file. Double click it to import it. This should be all that you have to do.