Your user account name is the one that is found under the ‘Users’ directory in your Windows installation drive (which is typically C drive). It can sometimes either be misspelled or simply be a shortened version of your email address. After installing Windows 11, Microsoft lifts the first five letters of your email address and sets that as the User Folder name. This can be very annoying, especially for those who want to have their name spelled in full or to simply rename it to something more appropriate to them.
But it’s not as straightforward as simply right-clicking it and renaming it. As you’ll find, you don’t even get the ‘rename’ option. So, if you’re looking to quiet your OCD that flares up every time you have to access something from the C:\Users folder and find your truncated name there, here is how you can change the user folder name in Windows 11.
How to rename the User folder in Windows 11
Renaming the user folder takes a slightly different approach for Windows 11 users. Basically, you will have to create a temporary administrator account and change your user folder name from within that temporary account. Here’s how you can do so.
Step 1: Add and Switch to a Temporary Administrator account
- Press Start, type cmd, and click on run as administrator.
- Inside Command Prompt, type this command line and press Enter:
net users administrator /active:yes
- Now, you have added an Administrator account. Sign out of your current account by pressing
Win+L
. - Now switch over to the temporary Administrator account.
Step 2: Find User SID from Command Prompt
- Inside the Administrator account, open Command Prompt as shown above.
- Now, you have to find out your user account’s SID. To do so, type in the following command line and press the Enter key:
wmic useraccount get name, SID
- Take note of the user account name’s SID that you want to rename. If it’s the main account, it will end in 1001. Remember this as it will come in handy in the next step.
Step 3: Rename username in Registry
- Open the Registry by pressing
Win+R
, typing regedit, and pressing Enter.
- Inside the Registry Editor, make your way to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
- On the left, click on the User SID number that you found in the previous step and click on it.
- On the right panel, you’ll find ProfileImagePath. Its data value will tell you whether you have selected the right user SID.
- Double-click the ProfileImagePath and rename your user folder. In the example below, we changed “C:\Users\shash” to “C:\Users\Shashwat”.
- Finally, exit the Registry Editor.
Step 4: Rename username in Windows Explorer
- Now, you can navigate to C:\Users and change the user folder name. If you’re getting an error message saying that the action cannot be completed because the folder is open elsewhere, restart the computer. Now, you won’t get the error and will be able to change the user folder name.
- Once done, you can check whether the whole process has worked thus far by opening up Command Prompt and typing in the same command line that we used before:
wmic useraccount get name, SID
- Your new user folder name should be reflected along with its SID.
- You can now sign out of the Administrator account and sign into the account whose user folder name you just changed.
- To double-check whether the user folder name has been changed, head on over to C:\Users and confirm the rename.
Step 5: Delete Temporary Administrator Account
Now that your user folder has successfully been renamed, you don’t need the Administrator account anymore.
- To delete it, open Command Prompt, type in the following command line and hit Enter:
net users administrator /active:no
That will delete the temporary Administrator account.
Solving the OneDrive error after changing the username
There have been instances when, after renaming the user folder and logging back into your main account, you’ll find that OneDrive has started to malfunction. You’ll have popups come up telling you that “Desktop cannot be found”.
The simple way around this is to sign out of OneDrive and re-sign into it. Let the sync take place with the new folder changes.
What if a Software cannot be uninstalled afterward?
You may find that some apps and software cannot be modified or uninstalled once the user folder has been renamed. This is because some of the registry values are still tied to the previous user folder name. Here’s how to fix that:
- Open up Registry again, highlight Computer, then Edit, and click on Find.
- Now comes the laborious part. You’ll have to type in the old path (in our example, it’s C:\Users\shash) and search for all of its instances in keys, values, and data.
- Replace all these instances with the new path (C:\Users\shashwat). Keep searching for the next references by pressing the F3 key until you don’t find any references to the old path.
- You may find that, even with a newly setup Windows, you may have to update scores of entries partly because OneDrive, in particular, has many caching paths in the registry.
- A faster alternative is to Unlink OneDrive first. To do this, right-click OneDrive from the system tray and select Settings.
- Under the Account tab, click on Unlike this PC and confirm for the same.
Once unlinked, you won’t have to go through as many references of the old user folder name path and can replace them with the new path faster. When there are no more references to the old path in the registry, simply restart your computer.
And with that, your software troubles post folder renaming should have disappeared.
Why can’t I just rename the user folder?
Windows keeps you from simply renaming the user folder as the folder name is tied to many important files that run the show in the background, deep in the registry. Any superficial change to it can cause lasting troubles. On top of that, you can’t rename or edit the account in any way while you’re using it. That means you have to have a workaround and change the user folder name in another way.
Related:
hi Sashwat, great post! the most comprehensive tutorial for me
however, I found an issue where there’s no change to the User SID despite the change I’ve attempted on both regedit & username in Win Explorer
Is there any major harm on such scenario?
Hello Sashwat,
I’d like to thank you SO MUCH for posting this. I found other tutorials about how to do this but they all stopped before the OneDrive error and I was starting to believe that I’d have to be stuck with my old user profile folder name. But anyway, thank you SO much for this. <3