Vista Tip: Moving User Directories

devman

2[H]4U
Joined
Dec 3, 2005
Messages
2,400
WARNING: EDITING THE REGISTRY CAN CAUSE BAD THINGS TO HAPPEN IF NOT DONE CAREFULLY. I RECOMMEND YOU BACK UP YOUR ENTIRE REGISTRY AS WELL AS ANY FILES YOU CANNOT AFFORD TO LOSE BEFORE TRYING THE STEPS LAID OUT BELOW

My apologizes if this isn't new information for the power users

So after looking up how this was done in XP (I never had to do it in XP because I only ever used one hard drive) and looking through the registry, I came up with a method for transparently moving User home directories. This isn't just a cut and paste job or modifying paths in file properties, this will move the whole user account, including all that temporary application junk (Game profiles, internet cache, etc) as well as your documents, music and pictures.

My Harddrive setup is as follows:
System Raptor 74GB (WD740ADFD) (C:\)
Storage Caviar SE16 250GB (WD2500KS) (D:\)

1. Copy Users folder to new destination
For me this was simply copying it from "C:\Users\" to "D:\Users\"

2. Modify User ProfileList
This is the template Vista uses to set up new User accounts.
2.1 Open "regedit" or any registry editing tool you prefer.
2.2 Navigate to the following Key: "\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"
2.3 You should see 4 String values under that Key. Change any key referencing "%SystemDrive%\Users\..." (should be 3 of the 4 keys) to "X:\Users\..." where X is your destination drive. Do not change the ProgramData value.

If you are dealing with a clean windows install you can use method 3.a, otherwise it is probably best to use method 3.b if you already have lots of applications installed.

3.a At this point if your working with a clean Windows install the easiest way to procede is to delete your current user accounts and remake them. To do this, create a new Administrator account (I called mine TempAdmin), then delete your current user accounts (Keeping files) and remake them. Upon being remade they should be assigned to the new User directory and pick up the files you copied over earlier.

3.b If you have lots of stuff already installed and don't wish to reinstall windows you can go modify EVERY reference in the registry referring to "C:\Users\" to "X:\Users\ " I recommend using a registry editor that allows "Find and Replace" actions. You will also need to modify for each user the "Homedrive" value found under the "\HKEY_USERS\<User Hash>\Volatile Environment" (default setting should be "C:").
This is necessary because if the references are not changed, any already installed programs which reference user directories may start complaining next time you use them or behave oddly.

4. Rebooting at this point would probably be a good idea. You can also delete the admin account you had to create earlier. After rebooting you can delete the original Users Folder on your system drive freeing up space. If Windows will not let you delete it then you did something incorrect.
 
Nice tip, but I question the usefulness of such a thing for a variety of reasons. Vista is already different from XP in many ways, one of which is a new pathway for user profiles (\Users instead of \Documents and Settings); there's a security benefit to this new methodology in some respects, so... forgive me for thinking that toying around with it and the Registry in such ways just seems like asking for more trouble than it's worth.

First, software has to be modified to work with Vista's new pathways, and some stuff still hasn't been updated and looks for Documents and Settings, and second, software that has been modified will now not find the Users directory where it's expected. Even with the Registry edits and every single thing pointing to the correct location, I'll bet at some point you're going to have problems. It might not have happened yet, but sooner or later it more than likely will.

But nice tip, regardless, and explained very well.
 
I'd have to assume that any professionally done piece of software would look up the registry key for the users home path, I mean thats what the registry is for!

However, I cede the point, I'll definitely follow up post with any difficulties I encounter, so far though running good.
 
Actually if you enable view system file you will see that under root drive there is now a short cut "doc and settings" that auto redirects anything trying to access the old folder formate to the new location. doesn't always work though. Found this out when I tried to create the doc folder under vista and it just keeps getting sucked into User.

Quite frankly IMO redirecting the entire folder in not a good idea as with every formate the old junk will still be there thus defeating the purpose of wiping a system clean, redirecting the documents is quite enough. In case you don't know all it take is the location tab under "properties" at the doc folder.
 
Quite frankly IMO redirecting the entire folder in not a good idea as with every formate the old junk will still be there thus defeating the purpose of wiping a system clean, redirecting the documents is quite enough. In case you don't know all it take is the location tab under "properties" at the doc folder.

Actually using this method, you could wipe your system drive, reload windows and not lose a step, and this moves the entire user environment, not just redirecting folders.
 
Documents and Settings is just a junction (hard link) to /users/

They literally point to the same location on your hard drive.
 
Follow up:

I've been using this for a month now, and I have to say I'm pretty pleased with the results. My system drive doesn't change at all unless I'm patching or installing something. I've not encountered any problems relating to this change, or any program that didn't behave correctly.

One thing that did slip past me, which I only caught because my roommate decided to play a joke on me. If you copied over your original files and then deleted and remade the account to pick up the files at the new location, the permissions for that users files will not be set correctly, they less restrictive than they should be.
 
Put me in the ore hassle than it's worth camp. I see a ton of these "tips" meant to give the user a warm and fuzzy special feeling inside, but in reality, they really don't do that much.

Maybe I've been in this business too long, but to me, storing your documents in the My Docs folder (regardless of Windows version and naming) was always a sign of noobishness. Those who knew more, kept their important files off the system volume, which is what you are trying to do.

So, that leads me to wonder is it just sheer laziness that people need the folder redirected for them? Is it really that difficult to make a folder on your D drive called Documents, and save everything there? That's the entire point of having a second data drive anyway, right?

I'm playing the devil's advocate here, but why not leave well enough alone? If you don't want your important files residing on your system volume, great...but you don't need to reconfigure the OS to do so. If recovery is what you're after, keep a folder on D: called _Ghost, with a ghost image of your C drive. With a bootable USB Thumb drive, you could have that image updated, or in case of a problem, restored in a matter of 5 minutes. You'd have everything, including User settings restored.
 
I might have been overzealous in calling it a tip. It was more of a "can I" thing. Important documents should always be backed up as always, I still do that.

Basically, I just wanted to move the user environment in a way that would be transparent to the shell and other applications. So I click on my user name in the start menu, it takes me to my user folder, and navigation shortcuts when saving files work properly . I go to save a document, and word finds the documents folder by default. Also though, any temporary data or scratch data saved by programs, such as save games, internet cache, settings, and whatnot also go to where ever the user folder is, and no changing default paths (laziness, I know).

I wanted to figure out a way to do it, and I didn't find anything specific to this, so I wrote this up in case anyone else came searching for something similar.
 
Back
Top