Skip to content

Instantly share code, notes, and snippets.

@rkitover
Created September 14, 2019 13:12
Show Gist options
  • Save rkitover/6a46b7a337153551655bca315d2c9a9f to your computer and use it in GitHub Desktop.
Save rkitover/6a46b7a337153551655bca315d2c9a9f to your computer and use it in GitHub Desktop.
How to Change your Username and Profile Folder in Windows

How to Change your Username and Profile Folder in Windows

If you don't like the username windows assigned you, I will describe a relatively simple and safe procedure to change it. For example windows gave me the username rkito and I wanted my normal one rkitover.

create a restore point

disable autologin, if you have it

Go into netplwiz and disable your autologin, you can reenable it when you're done.

if you have a microsoft account, swiitch to local

Go into Settings -> Accounts and switch your microsoft account to a local account (you will change it back later.) This will show a dialog that allows you to choose your new username.

Reboot or relogin with the new local account.

if you are using a local account, just change the username

If you are not using a microsoft account, just go into Settings -> Accounts or into the user management control panel and change the username.

sign back into microsoft account

Now if you go into Settings -> Accounts and choose to use a microsoft account, you will be logged into the microsoft account with the username you changed to. You may need to verify it again with a text message.

Reboot or relogin. When you relogin make sure to choose the microsoft account in the list of accounts, it will be listed as your email address.

make new profile path

Start an admin shell and go into C:\Users.

Make a symlink for the profile folder you want pointing to the current profile folder, e.g.:

cd C:\Users
cmd /c mklink /d rkitover rkito

Open regedit and go to HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList.

Find your profile and change the ProfileImagePath key to the new path.

Reboot immediately.

Everything should work now, with your new username and new profile path.

optional: moving your profile folder

If you want to actually move your profile folder, the procedure is a bit more complicated.

First boot a windows usb stick installer and once it boots press shift+f10 to open the command prompt.

Alternatively, use one of these methods to open alternate boot options and choose command prompt:

https://rivernetcomputers.com/5-ways-windows-10-boot-options-menu/

If you are moving your profile folder to a different volume, make sure the volume letter assigned is the same as on your live system. You can change the assignment in diskpart.

Then just use powershell to move the profile directory wherever you want and make a symlink for the old path pointing to the new location, e.g.:

powershell
mkdir E:\Users
mv C:\Users\rkito E:\Users\rkitover
cmd /c mklink /d C:\Users\rkito E:\Users\rkitover

Reboot and edit the ProfileImagePath as described previously if you want to, so that e.g. your powershell terminals start in the directory you want. You can use any directory symlink as your ProfileImagePath. Reboot again.

reenable autologin if you want

In netplwiz, with your new username.

all done

Hope this was helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment