Rename Windows Home Folder
The examples given change the user’s home folder from Michael to John.
In case of mistakes and recover data you may have missed make an image backup. Additionally create a restore point to backup the registry.
Method 1 – create new user and delete the old one
The recommended approach. It’s a bit sledge-hammer but is reliable and has the benefit of cleaning up the user profile.
- Create a new account called John using Control Panel or Windows 10 PC Settings > Family & other users > Add someone else to the PC
- In Control Panel > User Accounts > Manage another account > Change the account type and change to Administrator
- Sign out and login as John – this will take a while as the home folder is also created.
- Launch 2 copies of Windows Explorer and using Task View right-click one copy and select snap left. The click the other to snap right . This way you quickly end up with the 2 File Explorer windows side by side.
- In the left File Explorer window navigate to John’s home folder
- In the right File Explorer window navigate to Michael’s home folder and click continue to allow access to this folder
- Now one by one select the sub-folders, e.g. Documents in the left and right windows and drag & drop (move) the contents from right (Michael) to left (John’s sub-folder)
- Omit the following folders: Searches; Saved games; Links as it is best to let these be populated themselves through use
- In File Explorer show Hidden folders to reveal the AppData folders.
- From Michael’s AppData move any required subfolders to John’s AppData subfolder, e.g. AppData > Local > Microsoft > Outlook local mail data
- In File Explorer Hide hidden folders again
- Once all the data has been moved delete the old account in Control Panel > User Accounts > Manage another account > Michael > Delete the account > Delete Files to also delete the old account home folder
Method 2 – rename account name and edit registry to rename the home folder
- Login with an administrator account
- From Command Prompt (Admin) run “net user administrator /Active:yes” to activate the Administrator account
- Sign out
- Login as Administrator and make the following changes:
- If you have Onedrive unlink it from the PC as follows:
- Select the OneDrive cloud icon in the Windows taskbar
- Select Help & Settings
- In Settings, select Account, and then select Unlink this PC
- Change the account name by launching Control Panel > user Accounts > Manage Accounts > Michael > Change Account name and enter John as the new account name and click Change Name
- Run Regedit to change the Profile Directory name
- Navigate to HLKM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList\
- Rename the S1-xxxxxxx key containing the ProfileDirectory data user path called Michael to John
- Using Windows Explorer rename the home C:\Users\Michael to John
- Download Advanced Regedit from https://sourceforge.net/projects/regedt33/
- Run Regedit33.exe and use Edit > Search and Replace menu option to replace all occurrences of Michael to John
- Use the Edit > Find option to ensure there are no more occurrences of Michael
- Sign out
- If you have Onedrive unlink it from the PC as follows:
- Login with the administrator account in step 1.
- From Command Prompt (Admin) run “net user administrator /Active:no” to deactivate the Administrator account
- Optionally to clean up remove the Administrator profile home folder as follows:
- Select System > Advanced System Settings > User Profiles > Settings > [ComputerName]\Administrator note: [ComputerName] is your PC name
- Click Delete and Yes to confirm
- If you have Onedrive reconnect it to the PC as follows:
- In Onedrive Select Help & Settings
- In Settings, select Account, and then select Add your account
- When OneDrive Setup starts, enter your new account, and then select Sign in
- After sign-in, configure the OneDrive folder location using the new Home folder location
Note: step 4 > 2 can be omitted as it is covered in step 4 >5 and is just shown to highlight the minimum registry change