Move your Documents And Settings USERNAME profile off of the C: drive

Contributor Icon Contributed by ibe98765 Date Icon June 3, 2006  
Tag Icon Tagged: Windows

Microsoft (and too many other amateurs) dump everything onto the C: drive. They aren’t cognizant of the advantages of using partitioning or logical drives.

What follows is a power user tip that allows you to relatively easily move ALL your personalized settings in C:\Documents and Settings to another partition. This is a damm sight easier than messing with TweakUI, X-Setup, etc.

I keep my settings on my D: drive. This way, if I have to wipe the C: drive to refresh Windows, I can easily get most of my settings and old files back instead of starting from ground zero. This has worked for me in Win2k and WinXP and has made systems refreshes a lot easier over the years.

Note that you’re really just changing one registry sub-key here. The rest is just to logoff the user account, copy the settings to the new location and then logon to the user account.


Step 1
1. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\ProfileList
2. Under this key, there will be some number of profiles (usually 6), each of these which represents a user name that you will find under C:\Documents and Settings.
3. Click on each PROFILE key entry and look at the value ProfileImagePath to identify which one represents your username.
4. Inside the registry editor, using RegEdit or a clone registry editing program (I use Registrar Lite), edit this ProfileImagePath value that represents your username and CHANGE the path to where you want to move your settings to. In my case, I wanted to move my settings from C:\Documents and Settings\USERNAME to “D:\Documents and Settings\USERNAME”.
5. Save this new path value in the registry editing program.
6. Now export the whole profile key that contains this value. You will be prompted for a file name to save the exported information to. Pick a location on your hard disk (not on the C drive) and export the key. When you finish the export and look at the output file, it should look something like this (note that exported filename locations inside the registry always represent a single “\” character with two “\\” characters)

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-220523388-484763869-725345543-1003]
"ProfileImagePath"="D:\\Documents and Settings\\USERNAME"
"Sid"=hex01,05,00,00,00,00,00,05,15,00,00,00,7c,eb,24,0d,dd,e8,e4,1c,07,e5,3b,\2b,eb,03,00,00
"Flags"=dword00000000
"State"=dword00000100
"CentralProfile"=""
"ProfileLoadTimeLow"=dword68b90756
"ProfileLoadTimeHigh"=dword01c5b12b
"RefCount"=dword00000001
"RunLogonScriptSync"=dword00000030
"OptimizedLogonStatus"=dword0000000b

7. Delete everything below your new path name. It should now look like this:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-220523388-484763869-725345543-1003]
"ProfileImagePath"="D:\\Documents and Settings\\USERNAME"

Step 2
1. Now do a full reboot (don’t just logoff/on) and sign into the ADMINISTRATOR account
2. Copy C:\Documents and Settings\Username folder (including all sub-folders) to the new path location where the target users personal settings are to be saved (D:\Documents and Settings\XYZ in this example).
3. Logoff the Administrator account and back onto the User account
4. Run the registry file you previously exported to and edited with the .REG extension (right-click it and choose merge)
5. Reboot the computer again and logon to the USER account
6. Go to C:\Documents and Settings\Username and try to delete the complete folder structure
8. If Windows allows you to do this, then you have successfully transferred your settings to the new path location and all is well. Voila!

9. If Windows says that you can’t delete it because it or something in it is required by the system, then you’ve done something wrong. Open Regedit and make sure that you have modified the correct location for the user account and that it has been correctly updated.
10. If you have the right location and it hasn’t been updated, figure out why.
11. You might have to do a system restore if you’ve messed something up badly, so take a backup before and be prepared to do this if necessary.
12. Generally, an imaging program that can be initiated from DOS is the best way to restore everything if you run into problems.

Previous recipe | Next recipe |
 
  • ibe98765
    Anyone try this yet? Did you experience any problems? If yes, what were they?
  • davak
    ibe98765:

    First of all, welcome to the site. Forgive the lack of greets, but many of the moderators are slacking this week. I'm currently at the beach with my fam.

    I haven't tried the rx myself although I have certainly had systems setup in a similiar fashion before. It's a great recipe.

    Next week when I get back to the mothership, I'll fire you off a new amazon gift certificate to thank you for your awesome work.

    McHenry is actually working on some author-specific tech-recipes perks as we speak as well.

    Once again, welcome to techrx. PM me if I can be of any service to you.
  • ibe98765
    There are a lot of great recipe's here, many of which I have been using for some time. I hope I can find a couple of more unique things that I can contribute, but it won't be easy. Keep up the good work!

    I only hope publishing my recipe doesn't lead Microsoft to block this in the future. That is, unless they make an official way to relocate the C:Documents and Settings data if the user so chooses.
  • qmchenry
    Oh, yeah.. this is an important thing to be able to do. If anything, MS should make this task simple and an option when creating/modifying a user. Outstanding recipe, by the way!

    Q
  • Anonymous
    Hey,

    In all honesty I just used your website to find out how to do this - but since nobody has posted to say THANKS and to report that this technique WORKED FREAKING PERFECTLY and I HAD NO PROBLEMS I thought I'd take the time to sign up and...well...report it ;)

    I'll probably never post here again, but again thanks for the help and to all you guys not brave enough to take the plunge - take my word for it - it works. And it works good.
  • Anonymous
    I have just installed a new drive to an old machine.

    I want to have all the docs and settings run off it but have found that microsoft doesn't want us to.

    I have seen several ways of doing this which have failed.

    I think this way works - but i haven't done the final 'delete'

    I just have one question.....

    What happens to the 'all users' profile?

    I have copied the 'all users' docs over to the new drive - but is there a profile path?

    LEt me know your thoughts and then I'll do the 'delete' and let you know

    Scott
  • Anonymous
    I cannot delete the existig files on the C: drive because of the registry NT user is still there -

    what do I do?

    Everything else worked.....thanks for all you help!

    Scott
  • Anonymous
    Thanks for the information which put me on track to success. The main issues I has to solve were:
    Problem1.
    In my case, the profile I wanted to move was active and also the administrator, so its NTUSER.DAT file could not be moved.
    Solution. in ControlPanel/UserAccounts, create a new user 'TempAdmin' with Administrator rights. Then reboot, log in as TempAdmin and copy the profile to its required new location.
    Problem2.
    Using Regedit in Step1, put the new path into the registry, so the Step2 reboot went to the new location, found nothing, and created a default load of user settings.
    Solution.
    Either end Step1 with the original registry values re-instated and an external copy of the revised key.
    OR, use the separate Admin account to do the copying before step 1
  • Anonymous
    I have XP Home SP2

    When looking at the registry file it is in Hexadecimal format.

    I tried changing the path before saving and then delete from SID down.

    I copied the entire Documents and Settings folder.
    You saw to move the profile, but do you mean to create a documents and setting folder and put it in that, or just put the profile directly in the drive.
    Some things are saved in all users or administrator, so I would think I would need to copy the entire documents and settings folder.

    I actually got it to work once.

    I am doing a fresh install and was experimenting.

    I tried to move it to another drive without success.

    I did a restore to original, but now when copying, I get a "can't move NTuser" error

    The path stays, but when logging in, it doesn't go to that path.

    Any Ideas what I am doing wrong?
    I need to know how to get it to work well in case I actually need to reinstall operating system.

    Thanks,
    Duane
  • azw
    My edited and saved registry file also appeared in hexadecimal, but it worked just fine anyway.
  • Anonymous
    <font color="darkblue"></font>Thank you for the information. I believe that this is the solution to my problem! :D
  • Anonymous
    THANK YOU VERY MUCH
  • Anonymous
    Moving the complete Documents and Settings folder under XP on a live system seems to have many pitfalls. One is that files on the account in use are locked & can't be transferred. The second is that registry hacks pointing to the new location are not supported by certain programs that have the system drive as their settings source hard coded in on installation.

    Here is a relatively simple way of achieving the move whilst avoiding the above problems, & without making any changes to the registry, which has it's attendant dangers. The first is overcome by booting from a recovery disc into a pre-install environment. The second by keeping the "Documents and Settings" folder on the system volume & mounting the partition or drive of the new location onto it. This fools Windows into thinking the folder hasn't been moved & should be transparent to applications in general.

    It's been tested using XP Pro + SP3 although should work with other XP variants. Having a recovery disc is useful anyway, see here http://www.nu2.nu/pebuilder/ for how to do this using BartPE builder & XPE plug-in (both free). Booting this way means that none of the normal user accounts are in use by Windows so you will be free to copy all files at once without Windows complaining.

    So boot from the recovery disc, changing BIOS if necessary to achieve CD boot. To save altering BIOS again make sure secondary boot device is set to hard disc.

    It takes a while but you should eventually see a BartPE desktop with familar Windows icons & autohide Start bar at the top. Click on My Computer & check you can see the system drive (assume it's C:/) plus the drive/partition you want to re-locate Documents and Settings to. Open C: drive to view & select Tools/Folder Options/View tab. Select View hidden files radio button & untick hide System files & Folders. You will get a warning as soon as you do this but just hit Yes, Apply & Ok. Open "Document and Settings" folder, select all & copy to your intended drive/partition. Note that copying them to a folder is not an option, they must be in the location root. For this reason it may be best to use a dedicated, empty partition/drive, although I used a backup partition holding several other files already. Just make sure that you respect the folders you copy across & that there are none with the same name already. The folders involved will be:

    Administrator
    All Users
    Default User (hidden)
    LocalService (hidden system file)
    NetworkService (hidden system file)
    User folder(s) named after each user account you set up (there will be at least one that you set up on installation)

    Having copied the full contents (minimum six folders), change the name of "Documents and Settings" folder on your system drive to say "My Stuff" - this will be a backup which could be deleted later when all is tested & proven. Create new folder on system drive & rename it "Documents and Settings", this must remain empty.

    Go to Start/Control panel, open “Administrator Tools”. Select “Computer Management” and go into the “Disk Management” item. All your drives & partitions should be listed so right-click on the partition you are going to be using for re-location & select “Change Drive Letter and Paths…” from the menu. In the new dialog box click the “Add” button. Another dialog box will open, browse to your newly created "Documents and Settings” folder and click OK.

    Exit & open your new "Documents and Settings" folder. Although this won't appear with drive icon until you reboot, you should see the full contents of the drive/partition you moved the Documents and Settings folders to.

    If all ok, re-boot normally removing the recovery disc first. The "Documents & Settings" folder on your system drive will now have a drive icon & be mounted with the drive/partition you copied your Documents and Settings to.

    Microsoft suggest modifying silent install file to change location on new installation or worse still changing all references to Documents and Settings folder in the registry on a live system. Don't be tempted to do the latter for the reasons above.

    Although not tested I believe the "Program Files" folder could be moved in the same transparent way. This would allow easy backing up & once de-fragged, the system drive with just rarely modified system files on it, would remain so for some time speeding up your system.

    Good luck! - Richard :)
  • Sharon
    Hi, Richard! I have no idea if you'll ever see this, but I figured I'd give it a try. I've tried everything to get my docs & settings off the C: drive and I'm pretty frustrated. Your solution sounded so doable to me, but I can't get BartPE to build because of my Dell. I've read threads about fixes, and tried the Dell plugin, but no luck. I'm afraid I'm way in over my head with this stuff. Is there anything that works better with a Dell, just so I can get these docs off my OS drive - or did I have a 2nd drive installed for nothing? Thanks in advance if you happen to read this and answer.
    Sharon
  • ibe98765
    I haven't checked in here for a while.

    That's an interesting technique RicharHula. I've tried to get BartPE working in the past but w/o success. So I use Acronis to make images instead of messing around with BartPE.

    For the one or more people who posted that they can't move their settings, you need to go back and carefully read my tip. You DON'T MOVE the folder, you COPY it. Then, when the process is fully completed, everything checks out and you have successful switched to the new location, then you should be able to DELETE the original folder. If you can't do this, then you mucked something up. Restore and start over.
  • dev pandey
    i think its good idea but i can't to make like that plz can u give to Essy to move Idea
  • Sausages
    Why do you need to do this in two steps with a registry import/export? Can't you just log in as Administrator to make the Regsitry changes, then copy the profile files to the new location, reboot and log in as the 'moved' user?
    I can't see the point in making the registry changes, exporting them, then logging in as Administrator and re-importing them again?
  • beandogger
    This totally screwed up my computer. Luckily I backed up my computer.
  • Thanks for your information...
  • alan
    Since I am trying to migrate awy from Micro$oft, I ALWAYS install Linux on any computer I own, This allowed me to use Linux to copy the entire Documents and Settings folder to the destination drive. I then downloaded one of the free registry find and replaceutilites from the net and use it to replace al instances of [root drive letter]:\Documents and Settings with [target drive letter]:\Documents and Settings. I also checked to make sure there were no other registry values referencing the old folder eg. %systemroot%\Documents and Settings and changed all that I found.

    I had to use explorer to hide the two system folders in Documents and Settings. the only really wierd thing was that when I rebooted, Notepad opened displaying the contents of a file called desktop.ini. A quick search of the net for the contents of the file led me to the following MS support article http://support.microsoft.com/kb/330132 .Followed the instructions and everything seems fine now. I have moved my home folder off the root drive in Linux anf it is very straightforward compared to this.
  • Under the same key, you can find the value "ProfilesDirectory" wich holds the default directory ( C:\Documents and settings ) where new profiles will be created.

    So if you don't want to do this over and over for every new user you create, you can change its value here:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ProfilesDirectory
  • siva
    thanks for ur help?
  • azw
    Thanks! This was very helpful!

    I'd add one more number to Step 2 (#0.) those instructions:

    Step 2
    0. Create a new Admin User Account. Log out or your User Account and Log into the new Admin User Account.
    1. Now ....
  • P Seaman
    Tried and failed on the Copy... Could not copy several PRF files or the CardServices folder
    Was unable to continue with this solution.
  • Rem
    I like Richard's solution of mounting the new Documents and Settings partition over the C:\Documents and Settings path, and also for the C:\Program files

    Seems slicker, without having to mess around with the Registry (not an issue for me)

    I'm about to clone my physical partitions to a VMimage with VMWare Converter, so I'm wondering if this technique would be portable to the VM, (making the Windows partition image much smaller).
    Do you think this would work?
    Would I be able to mount the Docs & Setts in the VM (or would there be a locking conflict?)

    Everything Ghosted, so I'll try anyway, but would appreciate anyone's thoughts.

    Cheers,
    Rem
  • troybastydalayoan
    hello
  • Tom Ford Sunglasses
    thanks for this post, it can help those who has lack of knowledge in their computer programs. but i haven't tried it yet.
blog comments powered by Disqus