When you create a user account connected to a Microsoft account in Windows 10, the first 5 characters of your live account ID will be used for your user profile folder name. For instance, if sramesh_2001[@outlook.com] is your Microsoft account ID, the user profile folder would be named “srame“. This post tells you how to rename the user account folder in Windows.
This issue doesn’t occur if you create a local user account first and then switch to Microsoft account. If you’d like to have a custom name for your user account folder, create a local account first, with your preferred name. Once you log in and profile is initialized, you may switch to Microsoft Account (MSA). The user account folder will retain the same name.
How to Rename Your User Profile Folder in Windows?
If you have an existing user account with the profile folder name truncated to five characters, here is how to change it. But, it takes a lot of work and some amount of risk as certain applications may not work as desired after the rename. It’s best to take an image-based backup and proceed further. In my opinion, you should carry out the following steps only if you have appropriate backups in place.
- Read the “Caveats” section below, before proceeding.
- Find a decent registry find and replace utility and download it.
- Backup your entire system drive using a good image-based backup utility. (e.g., Macrium Reflect Free)
Renaming the User Account Folder
- Create a second administrator account, which can be a local user account.
- Logoff your primary account, and log in to the 2nd admin account.
- Start Regedit.exe and navigate to:
- Each subkey represents the SID of user accounts, including the built-in accounts in the system.
- Select the SID of your primary account for which you want to rename the profile folder. You can identify it by looking at the ProfileImagePath value in the right pane.
- In the appropriate subkey, update the ProfileImagePath value data accordingly, from the old user account to new:
Example: C:\Users\srame to C:\Users\Ramesh
- Exit the Registry Editor.
- Launch File Explorer and rename the profile folder. The folder name should exactly be the same as you typed in step 6 above.
This renames your user profile folder.
Reset and Rebuild Windows Search Index
The Windows Search index would still have thousands of entries pointing to the old profile folder path. You’ll need to reset and rebuild the Search Index completely, by setting the
SetupCompletedSuccessfully registry value to
Full instructions are available in the article Reset and Rebuild Search Index Completely in Windows. Especially see section How to Manually Reset Windows Search and Rebuild the Index in that article.
Resetting search will clear all indexed locations and Windows Search starts rebuilding the index automatically. If you have any custom folder locations to add to the index, add it manually by launching Control Panel → Indexing Options.
Update the Registry Paths
Although you’ll be able to login to the profile and use it, just renaming the
ProfileImagePath value is not enough. There could be 100+ registry values pointing to the old user profile folder, and the numbers can vary depending upon the programs installed on the system. For example, the Cortana search stores the index database location in the registry, and failing to update the path breaks the search feature in the Start menu and the Settings app.
You can do a registry search using software like Nirsoft’s RegScanner, and you’ll be surprised to see the number of registry locations (not including the trivial most-recent-used history locations) you have to update.
You need a decent registry search and replace tool to do a bulk Find and Replace of every occurrence of the string “Users\oldname” to “Users\newname”. Some software may have 30-day trial versions, which you can download and do the registry string replacements.
Once the registry values are updated, login to your primary account and see if everything works correctly.
- Registry Search/Replace software may not be able to update certain registry keys, due to Permission issues. To avoid this problem, you may either have to fix the Permissions on a per-key basis.
- The registry is not the only place where the profile path information is stored. Some applications store data in text-based files like .ini files, proprietary file format or even in database files. In those cases, the applications still reference the old path, may not work as expected. There is no single solution to update the paths in a single click. This has to be done on a per-application basis.
- If you find that the old user profile folder is created again automatically, then one or more of your existing applications are still referencing the old path. Open the folder and see which applications are adding files there. That helps you reconfigure that particular application.
If a mission-critical application breaks after following the above procedure, contact the software vendor for support. Or revert back to your old configuration by restoring from image backup you created earlier.
Information in this article applies to all versions of Windows, including Windows 10.
Featured image: Photo by Mike from Pexels
One small request: If you liked this post, please share this?One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
About the author
Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and he has been a Microsoft Most Valuable Professional (MVP) for 10 consecutive years from 2003 to 2012.