Changing User Name AND Documents folder name in Windows XP

Posted on 2006-03-25
Last Modified: 2008-01-09
I installed Windows XP and inadvertantly spelled the user name wrong.  I can re-name the user name in user accounts however the folder name in documents and settings cannot be changed.

Any tips other than re-installing the OS?
Question by:mcencich
    LVL 18

    Accepted Solution

    An error message informs you that you cannot move or rename the Documents and Settings folder

    To move only user-specific data

    WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

    NOTE: This method does not relocate any key Windows components. Use this method if you require only user-specific data to be moved.

    After you install Windows XP, to specify a folder other than the Documents and Settings folder for a particular user's data, follow these steps:
    1.      Identify the user's profile path. You can identify the profile path either by user security ID (SID) or by user path settings. The user SID method is preferred.
    To identify the user's profile path by the user SID
    a.       Use the Getsid tool from the Windows Server Resource Kit to obtain the SID. At a command prompt, use the following syntax:
    getsid \\ComputerName UserName \\ComputerName UserName
    For example:
    getsid \\windowsxp joedoe \\windowsxp joedoe
    The results look something like this:
    = The SID for account WINDOWSXP\joedoe is S-1-5-21-1708537768-1993962763-1957994488-1003
    b.       After you obtain the user SID, start Registry Editor (Regedit.exe or Regedt32.exe), and then select the user SID under the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
    To identify the profile path by the user's path settings
    a.       Log on to the computer as the user, and then type set at a command prompt. Note the setting for UserProfile, and then quit the command prompt.
    b.       Log on to the computer as an administrator.
    c.       Use Registry Editor to add the UserProfile setting to the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
    d.       Click the registry key, and then click Find on the Edit menu.
    e.       In the Find box, type the value of the UserProfile setting, and then click Find Next.
    2.      In the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList registry key, change the ProfileImagePath value to reflect the new path that you want to use, and then quit Registry Editor.
    3.      Log on to the computer as the user, type set at a command prompt, and then verify that the path has changed.
    LVL 18

    Expert Comment

    I think this does the same thing, but it looks like it may be more simple:

    How to rename or move a User Profile folder ?


    Renaming a user account via Computer Management console, or via the User Accounts applet does not rename the associated User Profile folder. As a result, the user account folder continues to display the old name.

    To rename (or move) the User Profile folder, you may use the following method. This method has been adopted from KB314843, but this page explains in detail how to rename an User account home directory.

    Before modifying the registry, you need to take a full backup, in case you want to Undo the changes or to recover from disasters caused by incorrect registry modifications if any. You may use ERUNT for a full registry backup. Use Registry Editor at your own risk.
    Rename the User Profile folder using Windows Explorer

        * Logon to an admin account that is not the account being renamed.
        * Open the Documents and Settings folder, by typing this in Start, Run dialog:

    %SystemDrive%\Documents and Settings

        * The list of folders will be displayed. Select the corresponding folder of the user account that you want to rename.


    %SystemDrive%\Documents and Settings\OldUsername


    %SystemDrive%\Documents and Settings\NewUsername

    Next step is to notify the registry that the folder has been renamed (or the Profile Path has been changed)
    Changing the ProfileImagePath value in the registry
    ProfileList key, SIDs and the ProfileImagePath value

    The ProfileList registry key contains some sub-keys, which are nothing but the list of User Account Security Identifiers (SID). Each of the SID represents an Account. The key is located here:

    HKEY_LOCAL_MACHINE \ SOFTWARE\ Microsoft\ Windows NT \ CurrentVersion \ ProfileList
    Identify the SID for your User account, and change the Profile path

        * To know the SID for your user account, you may use the script sidlist.vbs
        * Download the script and run it.  (The User Account names and SIDs will be listed in a log file, and opened automatically.)
        * Note down the SID for your account.
        * Then, in the Registry Editor, select the correct SID that belongs to your user account.
        * In the right-pane, double-click the ProfileImagePath value and set the correct path and folder name. ( The ProfileImagePath stores the full path of the User account home folder. )


    %SystemDrive%\Documents and Settings\OldUsername

    becomes the following:

    %SystemDrive%\Documents and Settings\NewUsername

    You're done now. Close Registry Editor, and restart Windows. See if you're able to logon to that user profile successfully. Additionally, to verify if the path has been changed successfully, type SET in the Command Prompt. If you find any abnormal behavior while running an application (in case), you may Undo the above procedure. Then you may use the Copy To Profile method instead to accomplish your task.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Are you unable to synchronize your OST (Offline Storage Table) file with Microsoft Exchange Server? Is your OST file exceeding 2 GB size limit? In Microsoft Outlook 2002 and earlier versions, there is a 2 GB size limit for the OST file. If the file …
    If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now