Tuesday, July 28, 2020

How to rename Windows 10 user home folder

Steps to rename User name

Rename the user name in the Control Panel (Windows Menu → Settings → Accounts).

Steps to rename the home folder under C:\Users

  1. To rename the user's home folder, we first need to create a temporary Admin account in Windows 10.
    To create a temporary local Admin user in Windows 10, follow below steps:
    1. Go to Windows Menu → Settings → Accounts → Family & Other users → Add someone else to this PC
    2. Click on I don't have this person's sign-in information.
    3. Select Add a user without a Microsoft account
    4. You can leave the password field empty, as this is a temporary account and we will delete this account at the end.
  2. Once a new account is created, change the account type to Administrator

  3. Logout and Login as newly created user from login menu.
  4. Open File Explorer, Go to C:\Users\ and rename the folder under C:\Users\<old_username> to the desired name.
  5. After renaming the folder, now let us map the renamed folder with the user account.
    1. Open regedit from Win + R
    2. Traverse to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

    3. Traverse through the profile list and find the matching profile where key ProfileImagePath value contains the previous home folder path. Once found, update the value to match your new folder path.
      Example:As shown in below image, I renamed from C:\Users\Administrator to C:\Users\supernova
  6. Create a link from your previous home folder to new one via Command Prompt. This should help us with programs which have stored previous home folder path in their settings.
    1. Search for Command Prompt in Windows Menu. Right Click and select run as administrator
    2. Create a link from previous folder name to new folder name via mklink command.
      Syntax:mklink /j <old_username> <new_name>
      Examplemklink /j Administrator supernova Where Administrator is my previous folder name.
  7. Delete the temp account created in Step 1.


Robert Talarek said...

This is the best layout and fix for this common problem. You did such a great job and it was so easy to follow for dummies like me. I'm impressed. Two thumbs up. Thanks

Willeboer said...

Good day, add my thumbs to your fix as well! Thank you for this!