Try   HackMD

How to rename user in Windows 10 Pro

tags: tutorials technique windows 10

Preparation

Activate the Administrator account

  1. Open the Win+X menu, and click on Command Prompt (Admin).
  2. Enable the built-in elevated Administrator account.
    ​​​​C:\WINDOWS\system32> net user Administrator /active:yes
    
  3. Close the elevated command prompt

Sign out the user you want to change

  1. Assuming you are going to change from FOO to BAR.
  2. Make sure to sign out the FOO user

Sign in as Administrator

  • Sign in Administrator account

Procedures to change username

Change the user name in user accounts

  1. Press the Win+R keys to open Run, type netplwiz into Run, and click on OK to open User Accounts window.
  2. In Users for this computer, select the FOO user and press Properties button.
  3. Modify the text in User name: from FOO to BAR.

Modify the registry

  1. Open the Win+X menu, and click on Command Prompt (Admin).
  2. Find out the SID of target user FOO
    ​​​​C:\WINDOWS\system32> wmic useraccount get name,SID
    ​​​​Name                SID
    ​​​​FOO                 S-1-5-21-3218701021-4177864355-1154076034-1001
    ​​​​Administrator       S-1-5-21-3218701021-4177864355-1154076034-500
    
  3. Press the Win+R keys to open Run, type regedit into Run, and click on OK to open Registry Editor.
  4. In Registry Editor left panel, navigate to the folder in the path with found SID: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-3218701021-4177864355-1154076034-1001
  5. On the right panel, double click on the ProfileImagePath expandable string value (REG_EXPAND_SZ) to modify it.
  6. Modify the original path C:\Users\FOO to C:\Users\BAR.

Rename the default user "folder name" and "folder display name"

  1. Image Not Showing Possible Reasons
    • The image file may be corrupted
    • The server hosting the image is unavailable
    • The image path is incorrect
    • The image format is not supported
    Learn More β†’
    Make sure to use rename command in elevated command prompt to change the actual folder name. Some tutorial only tell you to change the display name in a file browser and it won't work. Below is the command you have to issue.
    ​​​​C:\WINDOWS\system32> rename "C:\Users\FOO" "C:\Users\BAR"
    
  2. Open a file browser, navigate to C:\Users and you will still see the folder name is still FOO. However, when you click in address bar, it will show C:\Users\BAR. This is the display name that you want to change as well.
  3. Select the FOO folder and press F2 key, enter BAR and press Enter key.
  • To prevent missing reference for some apps that stores the old path, you can create a symbolic link for them
    ​​​​C:\WINDOWS\system32> mklink /d "C:\Users\FOO" "C:\Users\BAR"
    

Verification

Reboot and login new username

  1. Restart the computer
  2. Sign in BAR account and see the original Windows environment without an error

De-activate the Administrator account

  1. Open the Win+X menu, and click on Command Prompt (Admin).
  2. Enable the built-in elevated Administrator account.
    ​​​​C:\WINDOWS\system32> net user Administrator /active:no
    
  3. Close the elevated command prompt