Changing the account name in Windows 10, does not rename the user folder. Sometimes you may need to rename the user folder if some programs or games don’t start or don’t work as expected (but there are other situations as well). If this is the case, the following instructions will show you how to do it. Before performing any actions, it is recommended to create a restore point
How to rename the user folder in Windows 10
So, let’s assume that we have changed the account name and we need to rename the user folder. You will need another local administrator account on the computer. Create a new local account with administrative privileges, how to do that is described in this article
Next, log out and log in to the account you created, which has administrator privileges (in this example, NewUser).
Go to the Users folder on your system drive (usually the C drive), right-click on the folder whose name you want to change (in this case the NewUser folder) and select Rename in the context menu.
Rename the folder (for example, NewAdmin).
Next, open the registry editor and go to the following path:
Find the subsection that has S-1-5-21~ in its name. Find the ProfileImagePath parameter, the value of which will correspond to the name of the folder you want to rename. Double-click the ProfileImagePath parameter and specify the new folder name, and click OK. Close the Registry Editor.
Log out and log back in with the account that you renamed the user folder. If the account you created specifically for this change is no longer needed, you can delete it.
Don’t forget that a lot of program and operating system settings are stored in the user’s profile. The more programs you have installed on your computer, the more likely it is that the changes you have made will not be enough. It is likely that there will be an entry in the Windows registry that contains the full path to some file or folder that is in the user profile and that path will be referenced to an old, now defunct, folder. This can lead to problems in the operation of some programs.
You can try to avoid such problems. To do this, you will need to carefully examine the WHOLE registry for references to the old, already renamed folder.
To do this in the registry editor call the search window by pressing Ctrl + F, in the search field enter the path to the old profile folder and click Find next
Carefully examine all the parameters found and, if necessary, change the folder name to the newly renamed folder. Then press the F3 key to continue the search and so on until the end, i.e. until this window appears.
As you can understand, the work to be painstaking and here to approach the issue with knowledge – that is, to understand where it is worth changing the name of the parameter to the new, and where it is possible not to do or do not need to do in any case.