Skip to content

Instantly share code, notes, and snippets.

@object-Object
Created February 24, 2024 23:49

Revisions

  1. object-Object created this gist Feb 24, 2024.
    34 changes: 34 additions & 0 deletions pain_and_suffering.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    I finally got tired of my laptop deadnaming me, and decided to fix it. Here's what worked for me.

    1. Back up all drives.
    2. Back up the registry.
    3. Create a system restore point.
    4. 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.
    5. 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`
    6. Use `netplwiz` to rename the user: https://superuser.com/a/1011089
    7. 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.
    8. 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"
    ```
    7. Log back into your account.
    8. If Windows Explorer is crash-looping, follow these steps:
    1. Open Task Manager by pressing `ctrl+shift+esc`.
    2. Click "Run new task" and type `regedit` to open the registry.
    3. Rename or delete this folder: `HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount`
    4. This should stop the crash loop immediately, but you may want to restart your computer to be safe.
    9. If your Quick Access or VSCode pinned items are corrupted (eg. unpinning doesn't work), delete everything in the following folders:
    1. `%APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations`
    2. `%APPDATA%\Microsoft\Windows\Recent\CustomDestinations`
    3. `%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