How to Move your Windows User Profile to another Drive

IMPORTANT NOTE: A lot of people seem to run into trouble trying to do this, and can’t seem to understand where they went wrong. Please understand that everyone’s situation is a little bit different, and I can’t list every possible step that everyone, under every possible circumstance, would need to perform. At the very least, you need to be a little bit self-sufficient here – if you don’t “get” junctions and file-system-level redirecting, if you don’t understand why you might need to reset permissions on your user profile folder after you move it (or how to do that), or if you don’t understand how to copy your user profile in its entirety (hidden and system files included), then perhaps you shouldn’t try to use this method. After all, we are talking about moving your user profile here – and if you don’t know what you’re doing, you can end up with a big mess. You have been warned!

Also, if you have questions about your particular situation, you’ll probably be better off asking your question over on superuser.com, a site specifically for these kinds of questions. So, while I’m flattered by your attention, please don’t email me asking for help – if you’re not confident enough in your own skills to try this on your own, then perhaps you shouldn’t be trying it in the first place.

And finally, this method is for moving your user profile after you’ve installed Windows. To change where your user profiles are located before you install Windows is a totally different method (using an unattended setup file) which I’m not going to talk about here.


Lately I’ve seen a lot of posts about various ways to move your Windows user profile (or various parts of it) to another drive or location.

Some of these posts suggest using the “Microsoft-approved” method of right-clicking certain folders in your user profile directory (“My Documents” if you’re using XP, and “Documents,” “Music,” “Videos,” and “Pictures” if you’re using Vista or Windows 7) and selecting “Properties” and using the options there to change the default location of those folders (some posts suggest editing the registry directly rather than using the UI).

documents-propertiesAbove: the “Microsoft-Approved” way to change special folder locations.

Other posts suggest using an unattended install of Windows, which can allow you to set the user profile directory that Windows will use to something other than the default.

I’ve found these methods to be less then optimal, for several reasons:

  • The “Microsoft-approved” method will certainly move your folders, but some programs just blindly assume where your user profile is and will write to the original default directory, ignoring the fact that you’ve changed it.
  • You can’t move your whole profile with this method – only certain folders within it. (For example, you can’t move your “Application Data” or “AppData” folders using this method.)
  • The unattended install method of course means re-installing Windows (and is not for the technically faint-of-heart).

I have talked about my method for moving my user profile before, but I think it bears repeating.

My user profile was getting very large – as in, really, really large. I was running out of space on my C: drive, and I had a 2nd hard drive onto which I could move things, but I didn’t want to move things piecemeal – I wanted the whole kit & kaboodle. I didn’t just want my documents, videos, music, and pictures moved – I also wanted my ISO images, virtual machine hard drives, and email archives moved – a lot of which lived in my “AppData” folder. I wanted to give my user profile room to “grow” – and I also wanted the performance benefit of having my user profile on a different physical hard drive from my OS drive.

The picture below shows what I ended up doing – I created an NTFS junction point for my user profile, and moved it onto a 2nd hard drive. The result: my OS drive, C:, is just my OS (and programs). The 2nd hard drive (labeled K:) is entirely my user profile. Obviously, it’s grown a bit since I moved it!

drives.png

So what do you do if you’re in a similar situation and want to move your entire user profile to a different drive (or just a different location on the same disk)?

Enter NTFS directory junction points.

If you’ve ever used UNIX or Linux, you may be familiar with the concept – however, if you’re not familiar with the concept, it’s fairly simple to imagine (I’ve talked about it before as well). Basically, think of a junction as a file-system-level shortcut. Whereas “normal” Windows shortcuts only work in Windows (and are actually little files that redirect you when you click on them), a junction operates at a much “lower” level in the file system, silently redirecting access requests. (This Wikipedia article does a better job explaining what they are than I could ever do, if you’re curious.)

And that’s the key fact here – because support for a junction is built right into the NTFS file system itself, it’s basically invisible to any higher programs. (Programs can detect a junction of course, if they specifically ask – but few programs do.) So you can redirect any folder into another folder on your computer (including on a different physical hard drive). Which, coincidentally, is just what we’re after!

Before we begin though, it’s worth mentioning that this process involves moving your user profile files around – which can be risky if the move gets interrupted or something terrible goes wrong (power outage while you’re doing it, etc.). So take the time to do a complete backup of your data before trying this – but you knew that already, didn’t you?

So, with that said, here are the steps to move your user profile to another location using directory junctions:

Step 1: Prepare your 2nd hard drive (or whatever destination you’ve chosen) and pick (or create) a folder you want to “junction” to.

Step 2: Log out of your user profile and log back in under a different account. If you don’t have a 2nd account, just create one temporarily. Remember to give it full administrator power over your computer or you won’t be able to proceed!

Note that instead of doing this from a different user account, some people have more success doing this from the recovery console via the Windows installation CD/DVD. Either way will work; you generally only need to use the recovery console if you have some system process running that locks files located in your user profile; or if you’re trying to move the entire “Users” folder, rather than just your user profile folder.

Step 3: Move EVERYTHING out of your old user profile directory to your new profile directory (e.g., move everything from C:\Users\UserName to D:\Users\UserName). Don’t just copy the files, you need to move them, because you can’t create a junction if a folder by the same name already exists. Your user profile folder is C:\Documents and Settings\UserName if you’re using XP, or C:\Users\UserName if you’re using Vista or Windows 7. Make sure you move hidden and system files, too!

I’ve done this before by simply dragging & dropping in the Windows UI (having first told Windows to show hidden and system files, so I don’t miss them), but some people claim to have better experiences by using the command prompt and tools like RoboCopy. If you are more comfortable with one method over the other, then go with what you know best.

Note: if you run into trouble moving the files (for example, Windows tells you that files are still “in use”) you may need to reboot into “Safe Mode” to make sure there are no programs/services that are locking files that you want to move, or even use the “recovery console” that you can get from the Windows installation CD/DVD.

Step 4: Once you’ve moved all your files, rename your old user profile directory – it doesn’t matter to what, just as long as it’s different (e.g., rename it to C:\Users\UserName.old). You have to do this because when you create a junction, you are creating something, and that something is what links to the destination. If you leave your old folder there, and you try to create the junction with the same name, it won’t work.

Later, after you’re done with all these steps and you’re absolutely sure everything is working right, you can delete your old user profile directory – just make sure it is REALLY empty before you delete it!!! (Make sure to check for hidden and system files!)

Step 5: Open a command prompt (Start > Run > cmd will do the trick) and create the junction with the command:

mklink /J C:\Users\UserName D:\Users\UserName

Where “C:\Users\UserName” is the your old user profile folder used to have (before you renamed it in the previous step), and where “D:\Users\UserName” is the folder where you moved your profile folder’s contents to.

(If you are using Windows XP or earlier, you won’t have the mklink command on your computer – you can use the Sysinternals junction tool to do the same thing. The command line is a little bit different, so be sure to make that adjustment!)

Note: if you are using Windows Vista or Windows 7, you will probably have to right-click the command prompt and choose Run as Administrator.

Step 6: Now you can log out of this “temporary” user (or, if you did this from the recovery console, boot back into Windows) and back in as your regular user account. (You can delete the temporary account, as we’re done using it.)

If you did everything right, you should be able to log in normally and nobody will be the wiser (except for you, of course!). If you run into anything weird, check the caveats at the end of this article.

The beauty of this is that it works, and it works silently. Windows doesn’t notice a thing (well, it does, but it doesn’t say anything about it) – you’ll log on normally, and all your programs will just work. Folder redirection is beautiful like that.

users-folder

Above: This is what a redirected user profile folder looks like in Windows Vista. Windows “knows” that it is a directory junction (hence the shortcut overlay icon), but it’s not really a “shortcut” in the traditional sense.

users-c

Above: after double-clicking on the user’s folder in the previous picture, you’ll see the user’s folders as you’d normally expect. Notice the address bar still shows this as being on the C: drive, even though it’s not. (Click the image for a larger version.)

users-k

Above: here’s the same folder, but instead of browsing to it via C:\Users, I went in through the K: drive (my 2nd hard drive). This is where the files really live. (Click the image for a larger version.)

Note that there ARE some caveats with this method:

  • If you are using Windows XP, you will run into a bug with NTFS mount points.
  • If you ever try to upgrade Windows, you may run into problems because of the redirection.
  • If your destination folder is on a different volume then permissions will not be inherited and you will have to set the permissions on the destination folder manually (just copy them from your existing user profile folder).
  • If your profile grows to be larger than the free space on your primary OS drive (usually C:), then you may have problems if you ever delete your user account and choose to “save the files” rather than delete them (something I ran into by accident myself).
  • There are other caveats, warnings, and potential issues as well if you decide to try and do things differently than I’ve explained here (e.g., move the entire “Users” folder rather than just 1 user profile, or try to move other important folders, like the “Program Files” folder) – please read the comments on this article to see what other people have done.
  • Finally, if you are using Windows 7, you may want to just use the Libraries feature to keep your bulky pictures/music/videos/documents in a different location. While this won’t move your entire profile, it will allow you to save the bulk of your files somewhere else (including on a different drive) without having to mess around with junctions & such.

Nevertheless, even with these warnings and caveats, using directory junctions is a highly effective method for moving your user profile out from the “default” location and into some other location of your own choosing. Hopefully, one day it will be possible in Windows to move your entire user profile to a different location without resorting to tricks like this, but for now, this is probably your best bet.

If you run into any trouble using this technique, I suggest asking for help over at SuperUser.com, which is a place for asking questions and getting help with advanced computer issues. Also, please don’t email me asking for help – without knowing all the specific details of your computer, your setup, and exactly what youv’e done, I can’t really give any help beyond what I’ve written here.

If you would like to know a little bit more about junction points, symbolic links, the mklink command, and so on, Wikipedia has several good articles to get you started:

Also, if you are installing a fresh copy of Windows, you can use the unattended setup file to tell Windows to use a different location for ALL of the user profiles, which is really nice (although you can only do this during initial installation). Everyone’s favorite Microsoft blogger Raymond Chen (of The Old New Thing) recently posted about this – if you’re going to re-install Windows, I highly recommend giving his article a read, as this method is probably the cleanest (and most supported!) way of doing this.

I Upgraded to Vista – But for all the Wrong Reasons

Even though I swore I wouldn’t upgrade to Vista, just recently I bit the bullet and did it anyway. But I did it for all the wrong reasons.

vista First and foremost, I upgraded to Vista because I had already decided that I was going to use Windows 7 when it came out (hopefully) later this year, and I figured rather than make the big jump from XP to Windows 7, I’d “ease” my way into it, using Vista as a “temporary” OS to look for problems and get used to some of the newer ways of getting around and doing things.

Of course, when I upgrade to Windows 7 it’s still going to be a big jump, because I hope to make the transition to 64-bit at the same time, and that means a full reformat & reinstall of Windows (there is no 32-bit to 64-bit upgrade path).

Other reasons I decided to upgrade to Vista “in the meantime:”

  • Finally fix that annoying flaw in NTFS mount points
  • Find out whether my current video card can support those fancy Aero Glass effects
  • Work out the kinks in my unusual user profile arrangement (more on that in a moment)
  • Get the new version of Windows Media Player

Of those reasons, the NTFS mount point flaw and the new Windows Media Player were probably the biggest reasons I upgraded. But the kinks with my user profile were worth working out in advance – let me explain.

Longtime readers might remember the bit of computer drama I had when I bought my new 500 GB hard drive, and how my plans for re-arranging my drives/partitions/data/etc. didn’t exactly work out. In the end, I ended up “mounting” the new 500 GB hard drive to my Windows User Profile directory – or to put it in terms that UNIX/Linux geeks might understand, I created a directory junction from my user profile folder to the root of the new hard drive. In other words, C:\Application Data\Keith was a “redirect” or “junction” to my 500 GB hard drive. This gave me the breathing room I was after at the time, since my user profile was taking up well more than 50% of my disk space at the time.

drivesThe above picture demonstrates the scope of my disk space problem – the C: drive is just Windows and applications. That K: drive contains just my user profile, and nothing else.

Of course this worked fine (aside from the aforementioned flaw in NTFS mount points)… but then I upgraded.

Remember that under Vista, your user profile directory is now (by default): C:\Users rather than C:\Documents and Settings. Which means that during the upgrade, my profile would have to be “migrated” somehow.

The Vista upgrade tried very hard, but in the end, a lot of weirdness happened, as you’d expect. In retrospect, I suppose I should’ve just created another mount point at C:\Users\Keith before upgrading and saved myself the trouble… but that probably would’ve caused problems as well.

However, with all that said, I was able to get into Vista after the upgrade, do some fiddling with user profiles, and mount C:\Users\Keith back to my 2nd 500 GB hard drive, and my profile (with my documents, music, and videos) appeared intact.

start menu Now, of course, I have all the time in the world to shuffle things around – since Vista (and Windows 7) have done away with the concept of “My Documents” and instead replaced it with “Documents” and so forth. Currently, my user profile is a weird blend of a “My Documents” folder, combined with Vista-style “Music,” “Videos,” and “Pictures” folders. Eventually I’ll get it all sorted out so that it matches what Vista (and Windows 7) expects natively.

Then, when I do finally upgrade to Windows 7, at least my user profile (and all my documents/music/videos/pictures/etc.) folders won’t be messed up and can easily be migrated.

So that was the other big reason for taking the plunge into Vista. (Either that, or I’m just a sucker for self-punishment!)

Still… there are a few things in Vista that I didn’t really know about before, or that I knew about but didn’t appreciate how nice they are. Things like:

  • Thumbnail previews in the task bar
  • The “Windows Search” built into the Start menu
  • When renaming a file, only the file name is selected by default (not the extension)
  • “Favorite Links” in Explorer windows
  • Yeah, yeah, I do sort of like the “glass” effects!

And, of course, the NTFS mount point problem is fixed in Vista, meaning I don’t have to SHIFT-DELETE when deleting folders from my profile anymore. FINALLY!

windows-media-center

Oh, and Windows Media Center finally understands about skipping chapters in a DVD – something that it just did not do before – and that really annoyed me. Now, however, when I press the “next” button on my Windows Media Center Remote, it skips to the next chapter like my DVD player does. (It’s kind of sad, actually, that I had to upgrade my entire operating system just to get this one fix to a media player!)

Of course there are the usual downsides to Vista that have been ranted on a million times before – things like UAC (user account control), which is still annoying, no matter what people say about “it gets less annoying as you use your computer.” I can’t wait until Windows 7 when I can adjust the UAC prompt behavior with a bit more granularity.

So, all in all, I’m somewhat pleased with my Vista upgrade experience, but mostly I’m just glad that I’m working all these issues out now, instead of later when I upgrade to Windows 7.

Microsoft Admits What Went Wrong with Vista, and How They Fixed It

When I first read this headline, I turned and looked to see if any flying pigs were going by my window. But no! It’s real! And, surprisingly, it’s honest.

Executed properly, UAC could have been a savior for people wont to install every application they find. Unfortunately, the UAC prompts quickly become so annoying that most users either disable them (the power-user option) or mindlessly click Allow (the mom option).

Which, y’know, is what I’ve been saying all along. But don’t take my word for it – read the whole article.