A user at work recently got married and has requested for her domain username to be updated to reflect her married name. She uses a Windows 7 PC on a Windows 2003 domain.

I know that I can simply update the user's name in AD and this will probably suffice for the most part; however, the folder structure on her PC will not reflect this change, which could cause confusion for her further down the line:


Besides completely re-creating the user's profile on this PC from scratch, how can I correct the misspelling in the user's profile?

  • You've got a couple good answers here, but depending on the way your new users are created it's probably much easier to create a completely new profile, mirror the AD access and then migrate the appropriate folders (like Desktop, Favourites, etc) to the new profile folder. This prevents issues like the below where you need to deal with registry entries and SIDs. – Michael Frank May 15 '15 at 0:11
  • Actually, I'm leaning towards doing it the registry way suggested in the answers as that just involves changing one or two registry keys that I'm already familiar with. I'll report back soon after I try it. Rebuilding a profile from scratch is going to lose a lot of user profile customizations and will increase the work required by me (and most likely irk the user one way or another!) – Austin ''Danger'' Powers May 15 '15 at 0:23
  • So there was no reason to create the user profile from scratch - I just did the registry fix and it was a) very quick and easy and b) ensured 100% of user customizations persisted. Thanks everyone! – Austin ''Danger'' Powers May 15 '15 at 12:58

Microsoft has an answer for this:

Both give the same information, in different ways. The important part is that renaming the profile's pathname requires an update to the registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList


Although everything here is correct, all of you are missing one very important thing:

THIS WON'T FIX THE PATHS OF ALREADY INSTALLED SOFTWARE THAT MAKES ENTRIES TO \USERS\USERNAME\APPDATA folder. All entries here remain pointing to old user profile name, this Will cause issues like "path not found" when uninstalling apps or while opening them. Besides you will get your Outlook profile corrupted and Good knows what else more. I ended up backing up the user's data, deleting the corrupted profile and recreating from a scratch a new profile for that renamned user, and restoring user's data.

I have found hundreds of websites with more or less same procedure to rename the user's profile folder but all of them missed what I mentioned. I can say the method Works very well if it is a newly created profile then you rename the users name inmediately: without configuring/installing anything prior to the renaming process, in this case this Works flawessly!

Trust me, I'm telling you by experience! I read a lot of tutorials and sounds more or less easy to do but it turned out a nightmare.


From: https://social.technet.microsoft.com/Forums/exchange/en-US/0a3a20fa-85d2-414e-aff2-267d5f2ca80c/rename-a-username-and-email-address-due-to-marriage-or-divorce

On the Attribute Editor tab [of the Active Directory Users and Groups -> Users -> (username) -> Properties] Look for the attribute named “objectSID’ and write that number on a piece of paper for later


[On the users machine login as Admin and] Rename the user profile folder:

Browse to C:\Documents and Settings\isingle Right-click on the folder, choose Rename Rename the folder to C:\Documents and Settings\imarried

Change the Profile Image Path in the Registry:

Start> Run> regedt32 Expand to HKEY_LOCAL_MACHINE \ SOFTWARE\ Microsoft\ Windows NT \ CurrentVersion \ ProfileList

Select the correct SID that you wrote down previously when you noted it from ADUC above In the right-pane, double-click the ProfileImagePath value and change the profile path to C:\Documents and Settings\imarried

Close Registry Editor, and restart Windows.


In addition to what's been answered here, there's an app out there called RegEditX that allows one to change registry entries in bulk. I used it to change my user name from, say, "Jos_Smith" to "JoeSmith". One very important note: in addition to changing "Jos_Smith" to "JoeSmith", you also need to change all entries of "Jos_Sm~" to "JoeSmi~". Those entries are mostly in the installation folder entries, i.e. where application store their installation files. Here's the link: http://www.dcsoft.com/products/regeditx/


In brief, you need to apply the change the main registry key, then find replace in the registry keys and in your files (it took me 2 hours).

Before starting, create a restore point and backup your registry. Make sure the account you want to modify is an admin account (you can set it as admin running netplwiz in run).

+ First part

This part is well documented here (screenshots)

  1. right click on C: User/[old_name] property choose share with nobody (it might take an hour to proceed)
  2. In control panels create a new admin account with the name TempAdmin(You will only use it to rename the `C: User/[old_name] folder and modify the registry, then will delete it)
  3. Logout from your account and login to the TempAdmin account.
  4. From TempAdmin rename the C: User/[old_name] with `C: User/[new_name].
  5. in the registry key go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ search for the entry that contains ProfileImagePath and right click/modify and replace the old_name by the new_name. Close the registry.

+ Edit the user account:

Run (Ctr+run) netplwiz: (it opens user account). Check the checkbox “Users must enter a user name and password to use this computer.” And select the user account’s old_name, and click on the Properties button. Change both the User_name and Full_name with new_name.

+ Try it:

Restart computer, then login in your newly changed account. (If the account with the new name doesn’t show, don't kill yourself. It might be because it’s not set as admin. Just log on in TempAdmin, and the set it as admin using the netplwiz windows.

+ Find and replace the remaining "old_name" in registry.

  1. To find (old_name) replace (new_name) in the registry, you can use regedt33 (open source). Run it as admin. It’s probably better to search with case insensitive, and to run it several times. It will only change the key you own (their ownership is set at your name).

  2. Then use the find feature of the registry to look for the remaining old_name (regedt33 can't edit protected keys). In the registry find feature uncheck "match the whole string only", press F3 to find again). The quickest way is to change the change the permission AND the ownership of the mother folder, and set it as inheritable for the children*. Then run regedt33 again (this time it will be able to modify the keys) (Edit: regedt33 is buggy, in some computer it will tell you it changed the keys but didn't. I did not find any other (quick) solution than uninstalling and resintalling the software link to these keys, like python)

  3. you will find (some) of the remaining issue in registry using ccleaner registry tool (right click on the broken key to open it in the registry)

+ Find and replace the remaining "old_name" in files (mainly your settings).

Run dngrep as admin (open source). Use it to find and replace in C:\Users\[user]\AppData and once with C:\Users\[user]\Desktop . Your search first, then check if the thing should be changed, if so replace it. (You can exclude files using the right click. In option write 1 as the match treshold, to search exactly for old_name)

+ Then fix the other stuff:

  1. Tasks: You will need to export your task in the scheduler, modify them, and import them again.

  2. check your shortcuts (also in your startup folder)

(*) Edit: Being an admin isn't enough. You need to have full control (permission), but also the ownership of the key you modify.

To change the permission: right click/permission/ check full control / ok

To change the ownership: right click/permission/ advanced / click on your name. If you want to set the permission for the children, check replace all child permission with inheritable permission from this object.

I also had to disable my antivirus for some difficuly keys, such as HomeGroupStuff. I also had to play with the checkbox "include heritable permission..." and "replace all child object..." for these keys.

The find feature doesn't seem to be reliable. I run it few times (uppercase, lower case, etc.), I still found new old_name to change.

Not the answer you're looking for? Browse other questions tagged or ask your own question.