Renaming Windows user folder
A few years ago I switched from a local Windows account to signing in with my Microsoft account.
The user folder name (C:\Users\<name>) has remained unchanged since then.
Today I finally decided to change it. Here’s how:
- Logged in on a different admin account
- Found the SID for my primary account with
wmic useraccount get name,SID - Used regedit to change the
ProfileImagePathto my new username atHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\<SID> - Renamed the user profile folder
This was probably stupid. At least two programs broke (OneDrive and VSCode). Reinstalled them instead of troubleshooting.