I finally got tired of my laptop deadnaming me, and decided to fix it. Here's what worked for me.
- Back up all drives.
- Back up the registry.
- Create a system restore point.
- Take a picture of your taskbar, start menu, Quick Access pinned items, and VSCode taskbar right click pinned items (if you use VSCode), since you might have to clear these.
- Restart your computer, and log into a different admin acount.
- I used the hidden Administrator account, which can be activated with this command:
net user administrator /active:yes
- I used the hidden Administrator account, which can be activated with this command:
- Use
netplwiz
to rename the user: https://superuser.com/a/1011089 - Follow these steps to rename the home folder and update the registry: https://winhelponline.com/blog/rename-user-profile-folder-windows
- I skipped the optional step to update INI files, because it seemed like it would take a very long time.
- Add a symlink from the old folder name in case any programs are still using it. Run these commands in Command Prompt (not Powershell):
cd C:\Users mklink /D "old name" "new name"
- Log back into your account.
- If Windows Explorer is crash-looping, follow these steps:
- Open Task Manager by pressing
ctrl+shift+esc
. - Click "Run new task" and type
regedit
to open the registry. - Rename or delete this folder:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount
- This should stop the crash loop immediately, but you may want to restart your computer to be safe.
- Open Task Manager by pressing
- If your Quick Access or VSCode pinned items are corrupted (eg. unpinning doesn't work), delete everything in the following folders:
%APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations
%APPDATA%\Microsoft\Windows\Recent\CustomDestinations
%APPDATA%\Microsoft\Windows\Recent
Helpful resources:
- https://winhelponline.com/blog/rename-user-profile-folder-windows
- https://superuser.com/questions/890812/how-to-rename-the-user-folder-in-windows-10
- https://www.reddit.com/r/techsupport/comments/yrfc1y/repeated_issue_of_windows_explorer_stopping/
- https://superuser.com/questions/1626127/wsl-reset-after-windows-10-username-change
- https://superuser.com/questions/171096/where-is-the-list-of-pinned-start-menu-and-taskbar-items-stored-in-windows-7