Renaming a user folder in Windows 11

With this guide you can change the default name of your user folder.

Renaming a user folder in Windows 11
Photo by Pablo Martinez / Unsplash

If you need to use Windows 11 and want to change the name of the user folder - e.g. from C:\Users\oldman to C:\Users\wiseman -, there is no easy way to do this. Therefore, this guide includes a detailed description of how to do this.


Prerequisites

  1. A second user account with administrator privileges

Step 1: Sign out of your User Account

You will need to log out of the account whose folder name you want to change. In this tutorial we will assume the username is oldman and the corresponding folder is called C:\Users\oldman.

Step 2: Sign in the other Admin Account

Now that you have logged out of the oldman user account, log in to the new administrator account - in this guide I will call it newman.

Step 3: Obtain User ID

Open Windows Terminal and run the following command to display all existing users with their corresponding IDs:

wmic useraccount get name,SID

The output will contain the SID that you need to copy and use in the next step.

Name                SID
Administrator       S-1-5-21-1306470244-2314044187-73082814-500
oldman              S-1-5-21-1306470244-2314044187-73082814-1001
DefaultAccount      S-1-5-21-1306470244-2314044187-73082814-503
Gast                S-1-5-21-1306470244-2314044187-73082814-501
WDAGUtilityAccount  S-1-5-21-1306470244-2314044187-73082814-504

Leave the Windows Terminal running, as we will be using it in the next step.

Step 4: Change the registry entry for the user folder

Now you need to open the Registry Editor (type regedit in the Windows Terminal) and browse to the following key path:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\<SID>

Obviously you need to replace <SID> with the SID from step 3.

In the right pane of the Registry Editor you will see a list of entries corresponding to the user. We are only interested in the ProfileImagePath entry. Double-click it and replace the value - e.g. C:\Users\oldman - with your new value - e.g. C:\Users\wiseman.

Now you can close the Windows Terminal and the Registry Editor.

Step 5: Rename the user folder

The last step is to open the Windows Explorer (Win + E), navigate to the old user folder and rename it to the new name you want. In my case I will use wiseman instead of oldman. So the absolute path of the user folder will be C:\Users\wiseman.

As some applications may refer to the user folder in their own entries in the Registry Editor, it is useful to create a symbolic link pointing from the old user folder to the new user folder.

To do this, modify the command shown below:

mklink /d "Absolute path of old user folder" "Absolute path of new user folder"

In our example it would be:

mklink /d "C:\Users\oldman" "C:\Users\wiseman"

Step 7: Restart Windows

You complete the whole process by restarting your PC.