Skip to content

Instantly share code, notes, and snippets.

@psiborg
Created November 7, 2023 19:20
Show Gist options
  • Save psiborg/e80782a47700c2bee984ea595b4fc304 to your computer and use it in GitHub Desktop.
Save psiborg/e80782a47700c2bee984ea595b4fc304 to your computer and use it in GitHub Desktop.
Change a user's folder name in Windows 10
  1. Under Windows Settings > Accounts > Family & other users > Other users
  • Click the button for "Add someone else to this PC"
  • Click the link for "I don't have this person's sign-in information"
  • Click the link for "Add a user without a Microsoft account"
  • Enter a user name, password, and security questions
  • Change the account type to "Administrator - Local account"
  • Logout and login as this new user.
  1. Open a Command Prompt using "Run as administrator" and run:
wmic useraccount list full
  • Find and remember the SID number for the username (e.g., johnsm) you want to rename.
  • Rename the user's folder:
cd C:\Users
ren johnsm jsmith
  1. Run the Registry Editor (regedit) and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\ProfileList
  • In the ProfileList, navigate to the SID number.
  • Modify the value for ProfileImagePath (e.g., from johnsm to jsmith)
  1. Restart Windows.
  • Open a Command Prompt and check the path has been changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment