I've chaned my username (with admin privileges) using this method, name has changed but in C:/Users there is still the same folder with the old name. How can I change this folder name?
I'm using windows 10 x64
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityI've chaned my username (with admin privileges) using this method, name has changed but in C:/Users there is still the same folder with the old name. How can I change this folder name?
I'm using windows 10 x64
That's expected behaviour: changing the username won't change the ProfileImagePath
. Renaming the profile directory isn't necessary, and causes problems if there are open handles under the directory. But it's still possible. Assuming you have already changed the username:
Log in as another administrator. Make sure the user is logged out!
Rename the folder C:\Users\oldusername
to C:\Users\newusername
.
Get the SID for the user: wmic useraccount where name="newusername" get sid
Open the Registry Editor regedit
and go to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\<SID>
Change value of ProfileImagePath
(REG_EXPAND_SZ
) to C:\Users\newusername
.
Restart the computer.
There might still be some problems, if some programs references to some files or directories using absolute paths, so I wouldn't recommend doing this unless it's absolutely necessary.