I accidentally renamed my user profile to Desktop and now it can't change back

Mrudul Velhal 20 Reputation points
2023-11-13T05:21:53.3866667+00:00

I was trying to sync my Desktop folder to OneDrive. I made a mistake and while trying to rectify it copied the folder back to my user folder (C:\Users\myname). Something went wrong and my user folder (myname) was renamed to Desktop. There is a folder named Desktop in this Desktop folder, and it seems to be the same folder. Anything I copy to the newly renamed Desktop folder also appears in the original Desktop and vice versa. I am unable to rename the user folder back to 'myname' and thus cannot add it to OneDrive since it is basically my entire user profile now.

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
10,149 questions
0 comments No comments
{count} votes

Accepted answer
  1. Manish Tiwari 180 Reputation points
    2023-11-13T09:59:19.1166667+00:00

    Renaming a user profile folder can indeed lead to complications, but there are steps you can take to rectify the situation. Here's a method you can try:

    Important: Before proceeding, make sure you have a backup of your important data.

    Create a New User Account:

    • Create a new user account on your computer with administrative privileges.

    Log In to the New Account:

    • Log in to the new account you created.
    1. Rename the Profile:
    • Navigate to C:\Users\ and find the folder named "Desktop" (which used to be your original user profile).
      • Rename the "Desktop" folder to your original username (e.g., "my name").

    Move Files:

    • Move the contents of the "Desktop" folder (the one you just renamed) into the newly created user profile folder (e.g., "C:\Users\myname").
    • This step is crucial to ensure that your files are associated with the correct user profile.
    1. Check and Fix Permissions:
      • After moving the files, check and adjust the permissions of the new "my name" folder to match those of the other user folders in C:\Users\.
      • Right-click on the folder, select "Properties," go to the "Security" tab, and make sure the new user account has the necessary permissions.

    Update Registry (Optional):

    • If you're comfortable working with the registry, you can open the Registry Editor (regedit) and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList.
    • Find the key associated with the old profile (the one named "Desktop") and update the ProfileImagePath value to point to the correct user folder (e.g., C:\Users\myname).
    1. Reboot:
      • Reboot your computer to apply the changes.

    Delete Old User Account (Optional):

    • Once you have confirmed that the new account is working correctly, you can delete the old user account (the one named "Desktop"). Be cautious and ensure you have backed up any necessary data.

    After completing these steps, you should have your user profile restored to the original name. Remember, always exercise caution when working with user profiles and the registry. If you're uncertain or uncomfortable with any step, it might be advisable to seek assistance from someone experienced in managing Windows systems.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.