# 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)`. 1. Enable the built-in elevated `Administrator` account. ```shell C:\WINDOWS\system32> net user Administrator /active:yes ``` 1. Close the elevated command prompt ### Sign out the user you want to change 1. Assuming you are going to change from `FOO` to `BAR`. 1. 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. 1. In `Users for this computer`, select the `FOO` user and press `Properties` button. 1. 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)`. 1. Find out the SID of target user **`FOO`** ```shell 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 ``` 1. Press the `Win+R` keys to open Run, type `regedit` into Run, and click on OK to open Registry Editor. 1. 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` 1. On the right panel, double click on the `ProfileImagePath` expandable string value (REG_EXPAND_SZ) to modify it. 1. Modify the original path `C:\Users\FOO` to `C:\Users\BAR`. ### Rename the default user "folder name" and "folder display name" 1. :warning: 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. ```shell C:\WINDOWS\system32> rename "C:\Users\FOO" "C:\Users\BAR" ``` 1. 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. 1. Select the `FOO` folder and press `F2` key, enter `BAR` and press `Enter` key. ### (Optional) Create symbolic link - To prevent missing reference for some apps that stores the old path, you can create a symbolic link for them ```shell C:\WINDOWS\system32> mklink /d "C:\Users\FOO" "C:\Users\BAR" ``` ## Verification ### Reboot and login new username 1. Restart the computer 1. 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)`. 1. Enable the built-in elevated `Administrator` account. ```shell C:\WINDOWS\system32> net user Administrator /active:no ``` 1. Close the elevated command prompt