# 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).

Above: 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!

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)?

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:

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.

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.

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.)

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.

### 178 Responses

1. OHsubeGuy June 30, 2009 / 9:30 pm

This did not work for me. I cannot move the Appdata folder even though when prompted to give permission. How do you move the c:\Users\\Appdata folder?

2. Keithius July 1, 2009 / 8:54 am

Make sure you are logged in as a different user before trying to move anything under your normal user profile’s account – otherwise, files will be in use and you can’t move them. (See Step #2.)

And I assume you mean C:\Users$YourUserName]\Appdata? 3. Barry July 2, 2009 / 1:56 am I’m logged in as a temp user I created, but it still thinks there are files in use in the other user’s folder. Argh! (I even rebooted to make sure). 4. Barry July 2, 2009 / 2:19 am Also, be careful (mildly so) as it’ll mangle permissions somewhat – I was being told I needed permission from the other user to move files! (we’re both Administrators…uh…what?) 5. Keithius July 2, 2009 / 8:46 am Files may be in use in your profile especially if you have “services” running that use files in the user profile you used when they were installed. Since Windows Services run all the time (regardless of who is logged in) you may need to shut them down. One way to help with this is to reboot into “Safe Mode” under the 2nd account and then move your files. Being in “Safe Mode” helps ensure that no pesky programs/services have locked files in the user profile you’re trying to move. Also, depending on WHERE you move your user profile to, you may need to change the permissions – Windows permissions are not inherited across directory junctions, I believe. There’s no hard and fast rule for this, so just keep your wits about you and you should be OK. 6. Dean July 12, 2009 / 8:04 am I’ve tried this, but the problem I get, when I log back in it creates a temp user folder because it can’t find mine. This, I think, is due to the mklink comand having to create the User name folder to work. I had to delete my original user name folder for mklink to work. Can’t seem to get a grip on how to get around this. 7. Keithius July 12, 2009 / 3:26 pm I can’t remember whether the mklink /j command needs the “source” directory to be there, or if it doesn’t… that might be the source of the problem. The way to test it is to see if you can browse to C:\Users\UserName and have it show you exactly what you’d expect to see (your user profile). If you can do this using Explorer, then Windows itself should find your profile no sweat. Another thing to consider is this: When you copy your user profile to the new location, make sure you have turned off the option in Windows to “hide system files” – otherwise you won’t copy the actual “user profile” files (e.g., ntuser.dat) and that will cause Windows to not use your new profile location. Anyway, I hope that helps! 8. Mike Holtman July 18, 2009 / 3:02 am I think you may not need the J switch… If you are on Vista+ the ‘mklink’ command defaults to creating a smylink for FILES, I believe. So to create a symbolic link for a whole directory try; “mklink /D D:\DestinationDirectory C:\User\Username” From the Windows mkdir command help: Creates a symbolic link. mklink [[/D] | [/H] | [/J]] link target D – Creates a directory symbolic link. Default is a file symbolic link. /H – Creates a hard link instead of a symbolic link. /J – Creates a Directory Junction. Link – specifies the new symbolic link name. Target – specifies the path (relative or absolute) that the new link refers to. 9. Keithius July 18, 2009 / 9:32 am Yes, the mklink command does default to creating symbolic links. I just prefer directory junctions myself, as they are supported on earlier versions of Windows – whereas symbolic links are only supported in Vista (and later). 10. Michael July 24, 2009 / 1:21 am Wouldn’t you also have an issue if the junction drive (in this case C:) were to fail? The junction info is stored on C:, so it seems to me that if that drive failed, bye bye to your junctions. 11. Keithius July 24, 2009 / 8:06 am Well, yes, and no. If the junction drive (C:) were to fail, yes, you’d lose the junction – but your profile itself (the files and folders) is still accessible on the 2nd drive. If you plugged the 2nd drive into another computer, you’d be able to browse it just fine – all your files would be there. (They just wouldn’t be linked to your user profile anymore, which is completely understandable!) Of course, if your C: drive fails you’ve got bigger issues to deal with than just your junction information being lost. 12. Zatanus July 26, 2009 / 8:58 pm Hi, Keithius. Very interesting thread. But, what if I need to move the whole C:\Users to D:\Users, with the posibility for all new future user profiles to be created in the new location? This method ensures me that? Is not better to change the Environment Varibles in the Registry without make links in the NTFS structure? (with the posterior search & replace of values to the new location). I think your method only works for actual users but not for future users. I´m wrong ? thanx for any reply. 13. Keithius July 27, 2009 / 8:36 am Directory junctions are implemented at the filesystem level, so they are transparent to any applications running above them – including Windows itself (although Explorer is smart enough to check for them when it matters, such as when calculating free disk space and when recursively deleting a folder). Because of this, they will work for moving the entire “Users” folder… but doing that is a bit trickier, since you need to be logged on in order to make a junction, and if you’re logged on, you can’t move your user profile folder (unless, of course, it’s already located somewhere else). So moving the ENTIRE C:\Users folder is quite a bit harder, simply because you’ve normally got some in-use “locked files” in there, so you can’t really “move” it per se. It’s sort of a chicken and egg problem. But technically speaking, yes, junctions could indeed be used to move the entire Users folder somewhere else, and if you did, all future user profiles would be created in that new location. 14. Zatanus July 29, 2009 / 8:29 pm The solution here is the Installer DVD command prompt. I´ll do some tests with this method. Seems to be a good option. 15. Christopher August 21, 2009 / 1:49 pm Yeaha, that was what i have looked for 16. Angus MacDuff October 1, 2009 / 6:23 pm It would have been a nice feature to have had the ability during user creation to specify where the users profile (documents, pics, video, etc.) during account creation. • Keithius October 2, 2009 / 8:57 am Yes, that WOULD have been a nice feature to have. (Hint, hint, Microsoft!) 17. Sheldon October 19, 2009 / 2:45 pm Has anyone tried this with Windows 7? I had to problem moving the original user account files and creating the junction point. However, when I tried to move/copy the files back into C:\Users\Sheldon (while signed on under a different account), there was a handful of files that I couldn’t move or copy back. I tried booting up in safe mode, stopped all the services I could, etc, but could not get those puppies to transfer. I got the “need admin access” message, but I had that. Anyways, I decided to try booting up to my account without those files. It started up ok, but all my user account settings were gone, so I just restored from backup. I would love it if I could get this to work, as it’s exactly what I was looking for. Anyone know how to get those last few files to move back? • Keithius October 19, 2009 / 6:04 pm Make sure you are copying hidden and system files as well, otherwise your account won’t really be moved over. 18. Sheldon October 19, 2009 / 2:49 pm Here are the folders that I could not copy back to my user account after setting up the junction point: C:\Users\Sheldon\AppData\Local\Microsoft\CardSpace\ (all files) C:\Users\Sheldon\AppData\Local\Temp\ (6 .tmp files) • Keithius October 19, 2009 / 6:02 pm Have you tried taking ownership of those files? Sometimes programs will write files to your user profile, but the program in question was running under a different user account – for example, the system account (common for services)… thus the files it created inherited the rights of the account under which they were created. That might be why you can’t move them, even though you are the administrator. 19. Pete October 22, 2009 / 3:03 pm Hi, I’ve been using Win7 RC7100, and I’ve used the mklink command. It’s touchy, it seems, and after re-installing the OS, it isn’t as simple; I’d have to rename my user directory (From Pete to Pete_Old, for instance), let Win7 create the new one, manually create a new one on a different volume, run mklink /d, and then copy everything over from the old to the new. However, above and beyond that, my main question is in regards to permissions. It seems as if all the user directories on D: are “open” to whomever logs in. Even though the C:/User/Name may be locked to the individual, the D:/User/Name, to which the symbolic link points, is not. I haven’t tried playing with permissions (I haven’t been that brave yet), but any pointers as to how to rectify that situation would be helpful. I used the mklink /D command to create a symbolic link, and not the junction, by the way. Thanks • Keithius October 22, 2009 / 5:08 pm I believe permissions do not propagate across symbolic links or directory junctions, so you will have to set the permissions on the destination folder manually, yourself. 20. Bev October 24, 2009 / 2:36 pm I thought this was my saviour, but an interesting quirk has caused me to write… Creating the link has stopped internet explorer downloading anything. It’s very strange. Creating a profile that is not mklinked allows internet explorer to download any file normally. Create a profile that is mklinked (J) then reboot the machine, suddenly IE8 cannot download. Any thoughts? • Keithius October 25, 2009 / 9:01 am Perhaps the profile is not moved over entirely? Or IE is trying to save downloaded files in a location that isn’t there anymore? • Aakash January 10, 2010 / 9:08 pm I hit the same issue above (unable to download files through IE). Turns out this is because after the move, the files under \\AppData are owned by Administrator (assuming your logged in as the Administrator to move the files). As a result, IE is unable to write to Temporary Internet Files, which is where it stores files as it downloads them. You need to reset the ownership of \ recursively so that all the files under that location are owned by you. To do this, right click on \, click Properties -> Security -> Advanced -> Owner and make your username the owner of that folder and all child folders (make sure you check the box marked “Replace owner on subcontainers and objects”.). Following this, open IE, go to Tools -> Internet Options, and delete everything under Temporary Internet Files, History, Cookies etc. . Close and restart IE and try downloading a file. This should now work. • Keithius January 11, 2010 / 9:30 am That’s a good point – depending on how you copy the files (and where) the permissions might get changed. Always a good idea to check on them and reset them back to what they are supposed to be before you log in! • Justin December 28, 2010 / 4:38 pm This worked for me – I could not get bookmarks to save. I had already duplicated security settings and changed ownership, but it was not until I deleted the old content in IE that I could get it to save bookmarks (and I presume downloading files). Thanks everyone. 21. jimnms November 7, 2009 / 10:34 am I bet a lot of the problems some people are experiencing with doing it this way is because there are a couple of problems that crop up when you copy or move the user folder to the new location: First the owner/security settings are lost during the copy/move, but that is easily fixed by manually setting them back to the original settings. Second, and most important, it will not copy or move the hidden directory junctions, which will cause big problems with some applications and backward compatibility with older programs. That last problem is a little harder to fix because there are several hidden directory junctions throughout your user directory that you will need to manually re-create using the command prompt. It’s not impossible to to, but it takes a bit of time. Before you copy or move your profile directory, open a command prompt, change to your user directory and type “dir /al /s > Junctions.txt”. This will create a text file with a list of the junctions that you will need to re-create. • Keithius November 7, 2009 / 4:51 pm Those are some very good tips – thanks for pointing that out! 22. Greg Higgins November 7, 2009 / 6:18 pm It is not a good idea to run sdelete -c C: from a user which has been moved using this technique. • Keithius November 8, 2009 / 9:47 am Why is that? That command just zeros out free disk space. Does sdelete get confused by the junction point or something? 23. parsec November 11, 2009 / 5:57 pm I get this message when I try to enter the string in the command prompt Cannot create a file when that file already exists Does anyone else? Am I missing something big? • Keithius November 12, 2009 / 9:50 am A little bit more detail would be helpful. What exactly are you typing into the command prompt? Why are you typing it? What is it you’re trying to do? The fact that you’re getting an error means that you are missing something. Look up the instructions for the command you are using and make sure you’ve got all the parameters right. Don’t just blindly copy & paste some command without knowing what it’s meant to be doing, and then ask for help when it doesn’t work – have you tried to figure it out at all on your own? Remember, Google is your friend. Use it. 24. Mike November 12, 2009 / 8:02 pm yes, Google is terrific. But to actually address parsec’s question, the reason for the “Cannot create a file…” error is because the instructions are incorrect. Creating a link actually creates a file. Since your empty profile folder still exists in step #3, the link cannot be created. What is missing is the step where you delete the original profile folder. However, an easier method would be to simply move your profile folder where you want it, then create a link to it. I haven’t tested this approach because I blindly followed the guidance above, but I see no reason it wouldn’t work, and save you a step: [as the article states, none of these steps can be performed on your currently logged-in profile. Reboot + safemode with admin account is what I used] 1.) Move the profile folder to your new destination: C:\Users\> robocopy C:\Users\UserName D:\Users\UserName /E /Z /COPYALL /MOVE 2.) Create the link mklink /J C:\Users\UserName D:\DestinationDirectory\UserName (and yes, you can make a link to a folder that is not empty.) 25. Keithius November 12, 2009 / 8:40 pm Part of the problem with the confusion here is that there are SO many different ways you can do this. – You can create a directory junction – You can create a hard-link – You can create a symbolic link – Or you can “mount” an entire partition to a particular folder using the Windows Disk Manager Each one of these can be used to achieve the same end result, but there are “gotchas!” inherent in each method. It’s also been a while since I’ve actually had to do this, so my memory is a bit rusty as to which “gotcha” goes with which method (I think the “empty folder” requirement applies to mounting a partition to a particular folder using the Windows Disk Manager method). When in doubt, consult the documentation… or Wikipedia (which actually does a good job of explaining all the different variations on NTFS reparse points, and of course contains lots of really good references to articles with more detailed information). 26. parsec November 15, 2009 / 2:15 pm I’m typing mklink /J C:\Users\UserName D:\DestinationDirectory on a Vista-64 computer. I asked this question because no one else seems to be getting this precise error, and the error itself doesn’t really seem to make sense to me. • Keithius November 15, 2009 / 11:14 pm Try mike’s suggestion: “Creating a link actually creates a file. Since your empty profile folder still exists in step #3, the link cannot be created. What is missing is the step where you delete the original profile folder.” • Keithius November 15, 2009 / 11:20 pm Or, to put it more succinctly: Delete the (presumably now empty) “UserName” folder from C:\Users, then run mklink /J C:\Users\UserName D:\DestinationDirectory. I find it helpful to run tests when in doubt – try creating a test folder on one drive, then another, and try junctioning them together, until you achieve the desired results. Then, substitute the “test” folders names for the real ones you want to junction. Here’s an example session I did just now to double-check my results: C:\>mkdir test C:\>k: K:\>mkdir test2 K:\>c: C:\>mklink /J C:\test k:\test2 Cannot create a file when that file already exists. C:\>mklink /D C:\test k:\test2 Cannot create a file when that file already exists. C:\>mklink c:\test k:\test2 Access is denied. C:\>rmdir test C:\>mklink /J C:\test k:\test2 Junction created for C:\test < <===>> k:\test2 C:\> I know I should update my article, but I just haven’t gotten around to it yet. Sorry. 27. Mark December 9, 2009 / 3:37 am Here’s another way to do this that I’ve used since WIndows NT with zero problems. It does not use links…. strictly registry changes. 1. Login as another administrator. 2. Copy your existing profile to the new drive/location (ex. C:\Users\Mark -> D:\Users\Mark) 3. Open regedit.exe and browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. 4. Find the folder that looks something like S-1-5-21-814754908-2423985534-814754908-1001 with the registry key ProfileImagePath that matches your existing account (ex. C:\Users\Mark). 5. Change ProfileImagePath to point to your new profile location (ex. D:\Users\Mark). 6. Logout and login to the account that you changed. 7. Open the properties dialog on your My Documents folder (or other profile folder) and check the actual path. It should now be pointing to the new location. 8. Almost there… stay logged in and open regedt in your account. Do a global search on C:\Users\Mark and change all instances to D:\Users\Mark. 9. Reboot and re-login. 10. Recheck profile path and registry paths one more time (just being anal here) 11. Delete your old profile (C:\User\Mark) 12. Done. Final Note: Under Win 7, if the “Windows Media Player Network Sharing Service” is running you may get a file in use error when attempting to delete your old profile. To fix this, simply stop the service first, delete the profile and then restart the service. I’ve been doing this for years and it’s completely reliable. • Chris January 19, 2010 / 12:59 pm Hi Mark, I thought Keithius post was excellent but a little bit ‘scary’ for me, however you approach seemed more straightforward. I followed your process and everything seems to have worked fine but I have a problem with icons in Windows Explorer continually corrupting. I can fix it by deleting the iconcache database but it keeps recurring. My suspicion is that something has gone wrong during the registry changes I made – in spite of all my careful attention! Is this something that you’ve come across? Thanks! • Chet April 6, 2011 / 4:00 pm Ive done this many times during a domain change and it works quite well with the exception of outlook pst files and an occassional bastard app that we dont support. Easy work around with outlook. Just point to the correct area which is normally in the user outlook folder. 28. Shannon December 24, 2009 / 4:21 pm Thanks a bunch. It worked great for me. No problems. Using win7 enterprise and have a ton of extra progs loaded and it worked just fine. I tried a copy first and not all the files copied but the move worked great. Just logged back in and worked like buttah. Thanks Again. Shannon 29. mike December 29, 2009 / 1:20 am tried it, but when i log back into the account it says it is setting up a temp file for me that will be deleted when i log back off. my files look like this c:\users\int gds d:\users\int gods are those spaces fine, i tried it both ways, forgot which way said it was all good, path created BUT the problem is that when i log in, like i said, it just says it is creating temp folders! any suggestions • Keithius December 29, 2009 / 9:42 am Check the permissions on the new folder, and make sure you copied everything – look for “hidden and system files” – those are the only suggestions I can think of right now. 30. Greg December 29, 2009 / 2:09 pm I noticed in Win7 a set of junctions in the original profile folder (C:\Users\Greg). I manually recreated these in the new location (D:\Users\Greg). However, all of these manually created junctions are plainly visible whereas the original ones were hidden. ATTRIB doesn’t appear to be able to hide the manually created junctions, nor do the original ones have the H attribute set. So there is something else going on that identify these as special junctions (e.x. NetHood, PrintHood, Start Menu, Templates, etc). QUESTION: What is the process needed to set these manually created junctions to have the same characteristics as the originals? I couldn’t find any way to move the originals, nor do I think that would have worked. • Keithius December 30, 2009 / 9:42 am I don’t know – I don’t have ANY junctions like that in my original profile folder. So I’m not sure exactly what it is you are seeing, nevermind how to re-create “hidden” junctions. 31. Anders January 4, 2010 / 5:48 am Followed the instructions above (Win7) seems to work fine untili I try to download files in IE. Tryed adobe reader but got error not finding adobe download site. Tryed with a user NOT moved and then it worked fine, come up with a question about installing ActiveX adobe dowloader that did not show up on the moved user. • Aakash January 10, 2010 / 9:10 pm See my comment above. In short, IE no longer has write permissions to Temporary Internet Files under \ because the folder (and a bunch of its parents) are owned by Administrator. You need to reset the ownership of those folder (in fact, the easiest is to reset the entire directory hierarchy under \. Instructions a few posts above. 32. PietPara January 9, 2010 / 9:30 pm Hi, just tried this and was succesful. I must say I made a little combination of another, very similar, method described here: http://www.tips5.com/how-to-relocate-user-profile-folder-to-other-drive-in-windows-7 and added a small change myself due to some copy problems I had. So, 1) Create a new admin account (with password) 2) restart PC and hold F8 until you get option to start in safe mode. You should also see an option to repair windows. Choose that option. After a little loading time you’ll be asked to login (as the admin you just created) and get a menu. 3) Select “Command Prompt” 4) Use the command prompt to find out which drive letters are now associated with your Windows drive and the drive you want to move your profile to. They will be different now that you´re in repair mode!! In my case E: and D: respectively. 5) use robocopy to copy all the files from your profile (robocopy will also copy all permissions) with this command: robocopy /MIR /XJ /B /R:1 /W:1 E:\Users\[Accountname] D:\Users\[Accountname] (the /B option will make sure that any “access denied” copies will not appear and files will be copied. This happened to me on all *.tmp files in AppData\Temp) Make sure that robocopy reports no failed copies (FAILED column = 0) 6) Then remove the old profile folder with: rmdir /S /Q E:\Users\[Accountname] 7) Create the Junction with: mklink /J E:\Users\ D:\Users\[Accountname] 8) To verify, now go to the folder on the system drive and “dir” inside E:\Users. You will see the link made. 9) Restart and enjoy! Worked like a charm for me. greetings PietPara • Keithius January 10, 2010 / 11:04 am Thanks for posting an alternative method! • Aakash January 10, 2010 / 9:13 pm I followed these instructions, and they did work. The key is to specify /XJ as a parameter to robocopy (else it tries to follow the junctions and ends up in recursive hell). However, with /XJ specified, the junctions which windows had created to make older programs work (ones which hardcoded links to “My Documents”, for example) will be gone. In order to preserve these, I first enumerated all the junctions in my user profile using “dir /al /s > junction_list.txt”. Then, I ran robocopy and moved the folder structure. Following this, I recreated the junctions in junction_list.txt using mklink. I had to also take ownership of the entire new folder hierarchy explicitly, else IE would refuse to download files (and, I’m sure, a bunch of other programs would have failed either silently or catastrophically). • Keithius January 11, 2010 / 9:32 am I don’t use RoboCopy myself, so I can’t provide any feedback or guidance on the “right” switches to use with it – so thanks for posting this comment to let people know! • Ashwin February 9, 2010 / 1:56 pm Hi AAkash ….tat’s pretty much true what u said ….but, since me being a novice to this jargon stuff… i need further help….can u plz put the code for how u recreated the junction point for Junction_list.txt ….and also how u took the owner ship rights of the moved “Useers” folder… thx Ashwin. • Blamestar July 18, 2010 / 3:47 am Two comments to the method mentioned here. I tried using it to move the Program Files folder on my EeePC 901 (8GB + 4GB Flash) to the smaller disk — yes, it’s a separate disk, not a partition. 1. You don’t have to create a new admin account. Just enable the existing built-in one from an elevated cmd using “NET USER Administrator * /ACTIVE:YES”. This will activate the account and the * will prompt you for a new password (no characters are echoed when you enter the password). Don’t forget to deactivate the account using “NET USER Administrator /ACTIVE:NO” once you are done. Re-enabling it can be done without the * in the command. 2. I cannot confirm that robocopy with the options given above does copy ownership and permissions. At least not on the “Program Files” folder. The following command however does. Don’t forget to change the drive letters according to your environment… on my EeePC they were swapped. XCOPY /E /I /H /K /O /X “C:\Program Files” “D:\Program Files” /E – copy subdirectories, including empty ones /I – assume the destination path must be a directory /H – also copy hidden and system files /K – copy file attributes like “Archive” or “Read-Only” /O – copy owner and permissions (ACL) /X – copy auditing settings The first path is the source, the second path is the destination. 3. When creating the junctions I experienced a problem. This might be related to the fact that my drive letters were swapped, instead of moved (D: and C: in recovery console == C: and D: in Windows). Anyways, when I created the junction on D: (the windows drive) using MKLINK /J “D:\Program Files” “C:\Program Files” and rebooted into Windows everything broke, because the junction was now named “C:\Program Files” and pointed to “C:\Program Files” — exactly as I specified during creation. From the instructions above I would have expected the Junction to point to “D:\Program Files”, but obviously the Junctions only remembers the drive letter, not the IDENTITY of the drive it points to. Maybe this can be fixed by creating the junction using the drive letters that are visible in Windows, in my case MKLINK /J “C:\Program Files” “C:\Program Files”… but this is untested. I can only confirm that it is possible to create junctions that point to themselves in Windows, but not how they react to changing drive letters. Cheers, Fritz • Keithius July 20, 2010 / 8:43 am That’s a very interesting situation you’ve encountered there. It was my understanding that directory junctions are linked by volume ID, not by drive letter, so what you’re describing shouldn’t have happened. But then again, I’ve never tried it so I wouldn’t know. I would try running a test – create a junction from a test folder on your C: drive to a folder on your D: drive from the recovery console, and see if, when you reboot, it really is mixing up the drive letters as you said it was. Because I really cannot believe that junctions are based on drive letters – in fact, I know they aren’t, because you can use junctions to “mount” an entire volume to a folder on another drive without the original volume even having a drive letter. So, I would say try a test with a sample folder instead and see what results you get – that at least might give you some clues as to what you need to do, without messing things up any further. • Blamestar August 14, 2010 / 6:04 am Since I am about to do the same thing to my girlfriend’s computer I have investigated the issue at hand a little further. It seems possible to circumvent the problem by using the globally unique volume identifieres instead of drive letters to create the junctions. See this example: C:\>MOUNTVOL ...[snip]... \\?\Volume{cfa70646-9253-11de-89d7-806e6f6e6963}\ D:\ \\?\Volume{cfa70647-9253-11de-89d7-806e6f6e6963}\ C:\   C:\>MKLINK /J test "\\?\Volume{cfa70646-9253-11de-89d7-806e6f6e6963}\Program Files" Junction created for test <> \\?\Volume{cfa70646-9253-11de-89d7-806e6f6e6963}\Program Files   C:\>DIR [...] 14.08.2010 11:52 test [\\?\Volume{cfa70646-9253-11de-89d7-806e6f6e6963}\Program Files] [...]   C:\>cd test   C:\test>dir [shows the contents of my Program Files folder on D:$

Currently I have only tested this directly in Windows, not in the PE (Preinstalled Environment, accessed by pressing F8 during boot). If anything goes wrong I will report back here.

• Blamestar August 14, 2010 / 6:05 am

Seems your blog ate the  tags around that whole lot of shell output...

• Keithius August 14, 2010 / 9:44 am

The CODE tags don’t like empty lines, apparently. I fixed it for you.

• Keithius August 14, 2010 / 9:46 am

Using the globally unique volume identifiers is a really clever idea to avoid mix-ups with changing drive letters, etc. Well done!

And thanks for sharing it here!

33. Gary January 10, 2010 / 9:20 pm

Thank for putting this info together. I found the comments very valuable as well. I was able to successfully move C:\Users to D:\Users, place a directory junction at C:\Users pointing to D:\Users, and rename C:\Users as a backup before placing the link to D:\Users. Here’s my procedure:

Objective: Move C:\Users to D:\Users. Place a directory junction at C:\Users pointing to D:\Users so Windows does not realize the Users directory has been relocated to a different disk volume. Rename C:\Users as a backup before placing the link to D:\Users.

Method:

1. Create D:\Users directory and set security to match C:\Users
2. Create two admin accounts that will be used to move data to D:\Users
3. Boot into Windows Safe Mode to copy all data from C:\Users to D:\Users
4. Copy all data from C:\users to D:\User. Do *not* copy directory junctions. Use admin account #1 to copy all data except data for admin account #1. Use admin account #2 to copy data for admin account #1. Windows uses directory junctions throughout the Users directory structure, and there is no known method to copy directory junctions as all data copy programs distributed with Windows copy the contents of the junction instead of the junction itself. Trying to copy the directory junctions in C:\Users will lead to a recursive loop and failure, so don’t even try it!! Use the following command to copy each directory in C:\Users to D:\Users:

Robocopy C:\Users\[Directory] D:\Users\[Directory] /e /secfix /copyall /b /sl /xj

This will successfully copy all data and security settings. The only remaining data not copied will be the directory junctions.

5. Manually create junction points in D:\Users. First list all directory junctions in C:\Users and save to a file: dir /al /s C:\Users > C:\junctions.txt. Next manually create each junction in D:\Users.

For example:
a. cd d:\users\default
b. mklink /J “Application Data” c:\ProgramData

Note: You do not need to create the junction points for the admin accounts, as those are just temporary accounts used to move data to D:\Users. When this procedure is finished, you should delete the temporary admin accounts and create new accounts. Creating the directory junctions in the Default directory will ensure all new accounts get the correct junctions. On my system, I needed to create the following junctions:

D:\Users – 1 Junction
D:\Users\All Users – 6 Junctions
D:\Users\Default – 16 Junctions
D:\Users\Public – 3 Junctions

There is also a symlink in C:\Users that needs to be in D:\Users. The robocopy command with the /sl option will correctly copy the symlink from C:\Users to D:\Users. Of course, if you have active accounts you are copying, you will need to manually create directory junctions for them as well.

When you create the directory junctions in D:\Users, don’t worry about setting the security to match the junctions in C:\Users. The important point is to make sure all the directory junctions you create in D:\Users are set as hidden files.

6. Now, we have successfully copied all the C:\Users data to D:\Users and manually created the junction points. We are ready to rename C:\Users to C:\Users-bak and create the junction link between C:\Users and D:\Users. The C:\Users directory is always in use, and will not allow you to rename it, so we need to boot from CD and use the recovery command shell. First, boot your system using your Windows 7 media and select “Repair Your Computer”. Next, select your Windows OS to repair and then “Command Prompt.” Once in the command shell, your C volume will be mounted on another drive letter. In my case, C: was mounted on E: and D: was still be mounted on D:. You can now rename the Users directory and create the directory junction to D:\Users:

a. Rename E:\Users E:\Users-bak

7. Reboot your system, remove your temporary admin accounts, and create new accounts. You’ve done it! C:\Users has been moved to D:\Users and a directory junction is in place pointing C:\Users to D:\Users. You have your original C:\Users renamed as C:\Users-bak, so you can always reference it if you forgot something or need to back out to your original configuration.

• Sam March 16, 2010 / 11:10 pm

I like the sound of Gary’s technique – I’m about to try it, will let you know how I get on.

A couple of points to add:

* adding the /q flag to the dir command will include the owner of the junction point in the file
* the attrib command can be used to view the attributes on symlinks and junction points, and to set them as needed. Use it with the /L flag to work on the link itself, or without to work on the target of the link. You’ll probably need the /D flag too. Off the top of my head I can’t think of an easy option for combining the output of dir with attrib such that you get attributes listed in the file as well (which would be handy – no thanks to Microsoft for removing the verbose flag from dir in Win7!!!), and I’m too lazy to write up a script, so I’ll probably just iterate over the 40-odd links I have under C:\Users\ by hand.
* Gary, you do a two-step shuffle to copy over both temp admin accounts… and then just delete them. If they’re going to be deleted why bother using the two-step to copy them in the first place? I’m going to try it as having one temp admin and my real (existing) admin – do the copy as the temp, not bother to copy the files for the temp, and then just use the real admin to cleanup when I’m done.

I’ve also read elsewhere that moving C:\Users means Microsoft will not allow any subsequent upgrades etc. to occur, patches may not work, they’ll only provide limited (paid-for) support, etc… anyone had any experience to counter these comments? For example, has anyone successfully upgraded after moving C:\Users\ to D:\Users\ ?

• Gary March 20, 2010 / 5:44 pm

Your right Sam, you don’t need two admin accounts. In fact, you can do everything from the Windows recovery DOS shell so you don’t need any temporary accounts. I recently found that that you can boot into safe mode (F8 during boot) to get the Windows recovery DOS shell, so you don’t even need to boot from the Windows CD. When you are in the recovery DOS shell, no accounts are actively being used, so you can copy all account data without issue to the target location.

One last minor point I didn’t document is that it’s a good idea to hide D:\Users so you don’t see it. This prevents duplicate data scan from applications like Windows Media Center.

• Joshua January 25, 2011 / 5:58 pm

The TechNet article on Profile Directories (http://technet.microsoft.com/en-us/library/cc722177(WS.10).aspx ) has this “Important” note:

This setting should be used only in a test environment. By changing the default location of the user profile directories or program data folders to a volume other than the System volume, you will not be able to service your Windows installation. Any updates, fixes, or service packs will fail to be applied to the installation. Microsoft does not recommend that you change the location of the user profile directories or program data folders.

and follows with this Caution:

Using this setting to redirect folders to a drive other than the system volume blocks upgrades. Using ProfilesDirectory to point to a directory that is not the system volume will block SKU upgrades and upgrades to future versions of Windows. For example if you use Windows Vista Home Premium with ProfilesDirectory set to D:\, you will not be able to upgrade to Windows Vista Ultimate or to the next version of Windows. The servicing stack does not handle cross-volume transactions, and it blocks upgrades.

If I understand this correctly, the workaround permits the updater to run, but no updates will take place within the user profiles (e.g., to AppData). That doesn’t sound safe to me.

34. Gary January 11, 2010 / 9:38 pm

I just found out that Norton Ghost 15 has a disk copy feature. I tested a disk copy of my C: drive to an external hard disk, and it copies everything correctly, including directory junctions and security settings. This is a good option if you have a blank target disk, as you won’t have to manually create the directory junctions. You’ll just have to delete all the stuff it copies you don’t want.

I have Norton Ghost 15 and had tried a backup/restore of the user directory, but it didn’t restore the directory junctions. Nice to know the disk copy works.

• Keithius January 12, 2010 / 9:36 am

Yeah, Ghost has always been a nice disk copy utility, though I don’t like having to pay for it (I use the Gparted LiveCD myself, though that’s not perfect either).

I expect any disk copying tool would copy junctions and security settings – after all, these utilities usually do a bit-for-bit copy.

I expect they’d have some troubles, though, if there were junctions to a different physical drive though… I can’t see any way for a disk copying utility to handle those gracefully.

35. Anthony January 17, 2010 / 12:37 pm

Hey, I had to comment, i just installed windows 7 and wanted my ‘personal’ folder to be on my second drive, i thought it must be easy so had a quick google, i soon thought it was not going to be easy then i saw this massive page talking about some crazy stuff and even reinstalling to get it changed so i thought forget it,

I then clicked my personal folder window then selected and cut all of the folders including the desktop, and pasted then in a folder i created in my username at the root of my data drive. Done, all of the links now pertane to folders that exist on my data drive……..cant belive it coudl be so simple, i had to laugh

I do have one slight issue i seem to have videos, pictures and music folders on my c: but they are not the My videos , My Pictures & My Music that the links point to those are definately on the data drive, i tried to delete but i said i didn’t have permission even though i am admin but i am sure i get rid of them, its just a bit untdy atm as they appear alongside all of the ‘My’ folders when i click the personal folder link – but this my just be something on my machine anyway, maybe an issue from another program.

So to recap if you have just read all that about fixing it, JUST TRY CUT AND PASTE TO NEW LOCATION.

Im on build 7229 x86 and it worked for me : D

• Keithius January 17, 2010 / 7:17 pm

I have to say I’m a little skeptical – it should be impossible for you to copy your profile folder like that while you are logged in, as there are files in there that are “in use.” But perhaps Windows 7 makes better use of things like Volume Shadow Copy to allow moving in-use files; I don’t know.

Unfortunately I don’t have Windows 7 (yet) so I can’t verify your claim – perhaps someone reading this could independently verify this? Again, I don’t mean to dismiss your claim, but it is a little hard to believe. (If it works though, then thanks for sharing!)

36. Anthony January 17, 2010 / 12:59 pm

Ok, I rebooted and then loaded the libraries page, in the properties i removed the links to the old c: locations just leaving the new data drive locations.

When i checked back in my user folder on C:\ the 3 folders were gone (i did have a new tracing folder not sure what it is possibly MSN as i just installed it) but anyway its sorted.

actually just checked it appears in both locations when i open MSN, not a problem though – i hope this info saves some stress and time

Anthony

37. Anthony January 17, 2010 / 1:05 pm

You can do the same for the public libraries too, cut and paste all ‘Public’ folders from ‘Public’ Link to a new folder called public on the data drive then go to the public libraries page and add the new location for ‘recorded tv’ remove the old one and thats sorted too !

38. GJ Ollanda January 21, 2010 / 8:07 pm

Found this post today…have been doing this MKLINK trick for 2 years now.
First with Vista and now on Windows 7

I have had no problems, except finding out the doing it the right way
Also rebuild the exact NTFS inheritance ‘credential’ tree manually.

PS: Did have a Creative SB driver that blew away the symbolic link. No real harm cause it can be simply re-created…but you do get scared when your profile is ‘missing’

• Jeff March 6, 2010 / 6:03 pm

Hi, I tried this on Windows 7 Profession x64 (after a fresh reload) and it worked great. I notice now that when I go to My Documents where it is referencing C:\Users\ and search, I am getting no results from the indexed search, but if I manually go to D:\Users\, I get indexed search results. I checked the indexing options and they link to my moved profile is not available on the C: drive to add as an indexed location.

Any advise on how to get indexed results of my docs, pics, etc, when I reference the C: drive of Library locations? Do I need to add the D: locations to my Libraries?

• Keithius March 6, 2010 / 7:28 pm

I’m not sure why the search/indexer isn’t handling the junction correctly… however, I did find some pointers.

The first is this thread from MSDN, and the second is this question from SuperUser.com.

Just skimming these articles, it seems like the behavior you’re seeing is an inherent, “by design” limitation of Windows Search. But you’ll probably want to read both of those articles I just linked to for the full story.

• Jeff March 12, 2010 / 3:25 pm

Looks like one way to work around this is to change the location tab information for your shell folders before moving your profile to the alternate location.

So, before you begin step 1. you would go to each of your shell folders (Contacts, Desktop, Documents, etc) and go to properties, then location tab. Change the location to the new profile location (i.e. D:\Users\UserName), say Yes to Move the contents. This points Windows, and the search indexer to your new locations when click Documents on the Start menu, or other locations. After you do this, then you can start step 1 above.

39. NickElora January 28, 2010 / 12:08 am

I found this all a little scary so did some more reading. Mark Russinovich’s article in Technet Junctions V1.05 seemed relevant.
Has anyone tried this?

• Keithius January 28, 2010 / 9:45 am

Mark Russinovich’s “junction” tool is for versions of Windows that don’t have mklink (i.e., Windows 2000, XP). But both junction and mklink do the same thing.

Remember, the Windows NT file system (NTFS) has supported junctions all along (well, at least as far back as 2000), but Microsoft didn’t include a tool for creating junctions in Windows itself until Vista. So that’s why the “junction” tool exists.

• NickElora January 28, 2010 / 11:44 am

40. NickElora January 28, 2010 / 5:22 pm

There is a minor typo in PietPara’s procedure.

The first [accountname] was missing and the error message is not explicit, only says directory exists!

Worked perfectly

• Keithius January 28, 2010 / 9:44 pm

You’re right – thanks for the correction!

41. Craig February 14, 2010 / 10:41 am

hi, all,
I just finished all of my work with junction on a WinXP machine. Boy am I happy with the results. Two thirds of my OS drive is now available as opposed to being full before I started.
Performance has returned and I moved 2 user accounts to places where there is plenty of room for growth. I just thought I would pass along a few tips I stumbled upon as I was doing this.
1) Program Files folder cannot be renamed, but everything below can. This tip will become clear as you read on
2) used xcopy to copy files to newly created folders in new space. there is an option to copy hidden and system files – /h that makes that part of the process much simpler.
3) Once I had copied all of the data to the new folders, then I RENAMED THE FOLDERS WITHOUT HAVING TO EMPTY. this way, if something goes wrong, original data still resides in original place.
4) next, created empty folders with original names for the junctioning.
5) created junctions in safe mode at command prompt as Administrator.
6) tested work. did not remove original data until junctions showed proper performance. I was able to remove all of the original folders and things work perfectly.
created several junctions for large folders under program files. all apps are working.
Incidentally, doing a dir command in command prompt will actually show the junctions in the list. Junction does not work with long file names and there are times when that makes a considered move not possible. Also, I have no download problems.
Having done this, I am running a ‘new’ PC. Very,very happy with this. now have to bachup.
Remember to back up ALL drives – too much configuration would be lost without doing this.

42. Nicole February 14, 2010 / 1:46 pm

Ive had a problem and I dont know what to do!!

I did everything what you said but it doesnt seem to work. It keeps creating a temp account everytime i try to log in to my main account.

Then when I click on My Computer > users

It has the shortcut there with my username but when I click on it it says

Location not available

C:\Users\Nicole

But when I got into the actual external hardrive file .. I am able to access the folder and files

OS – Vista

• Keithius February 14, 2010 / 10:57 pm

I would not use an external (removable) hard drive!

Also, you may have to check the permissions – see previous comments. Easiest way to do this is to compare against a “normal” user profile and make the permissions match.

• Nicole February 14, 2010 / 11:31 pm

Why not?

And ive no idea what that means??

• Keithius February 15, 2010 / 9:25 am

If you don’t know what that means, then I would not have tried to do this.

My recommendation to you is to put things back the way they were (as best you can) and not try again – at least until you can understand the conversation that’s been going on in these comments. Otherwise, you’ll just end up in the same situation again.

• Nicole February 15, 2010 / 2:24 pm

Ok thanks

Well I emailed you about putting everything back to how it was. And also if you could give me info on how to use my external hardrive? for personal files and folders so that windows regonises where they are

43. Steve March 7, 2010 / 12:01 pm

This has been a most useful thread, but even after recreating the junctions not all works. I just completed another reinstall and another attempt to move my user accounts to a second drive. This time I first detailed the attributes of each junction AND the security permissions and owner for each junction. (owner is SYSTEM for all of them).

It’s been only one week, but so far all seems to work. Thanks for your pioneering efforts.

44. Ajith P Francis March 7, 2010 / 10:26 pm

Very interesting topic.
Thanks for sharing the ideas.
U guys are really rocking.

45. Hal March 11, 2010 / 12:46 am

Haha, I find this funyn coz I have the exat samedrive name on my “D” (HAL)

46. Splosion April 16, 2010 / 12:51 pm

This worked great for me – it was the simplest, least destructive method for moving existing user profile directories that I found. Thanks for the time spent helping others.

• Keithius April 16, 2010 / 5:40 pm

You’re very welcome! I’m glad it worked out for you. It would be nicer if it was easier to do in the first place, but still… I’m glad you found this useful!

47. hitcola April 16, 2010 / 2:04 pm

amazing !!!!!!!!!! wow

48. hitcola April 16, 2010 / 2:04 pm

it is working perfect, thanks….

• Keithius April 16, 2010 / 5:41 pm

You’re welcome; I’m glad it worked for you!

49. Darren April 17, 2010 / 12:05 am

I have windows 7 running on an ssd so I decided to try this to alleviate a bunch of space on the ssd. The ssd is “C:” and I planned to move to a hdd “F:” I created temp account as admin, rebooted into safe mode created users folder on F within users i created folder “darren – new” and then renamed original profile folder “darren – old”, i made windows show me hidden files, and proceeded to move everything and it went well with no prompts or errors. (Now the fun part) I opened up cmd clicked run as admin and typed: “mklink /j c:\users\darren – old f:\users\darren – new” but when i hit enter cmd snaps back with “the syntax of the command is incorrect” whats that mean and how to i complete the junction? Thanks in advance!

• Keithius April 17, 2010 / 9:33 am

You probably need to put quotes around your paths, since they contain spaces; e.g. “c:\users\darren – old” instead of just c:\users\darren – old.

• Darren April 17, 2010 / 4:53 pm

ok i tried that and now it says “cannot create a file when that file already exists.” so i tried renaming the folders again this time to darren.old and darren.new and tried it again without the quotes and i got the same message

• Keithius April 17, 2010 / 6:47 pm

I believe if you read through the other comments on this page you’ll find the answer to your question. Specifically: if a folder with the same name as the link you are trying to create already exists, you can’t create a link. So, in this case, based on the command you said you were trying to run, this means that the “C:\Users\Darren – Old” folder exists, and that’s why you can’t create a link there with the same name as it.

Further, wouldn’t you actually be trying to create a link from “C:\Users\Darren” to “F:\Users\Darren – New”, and not from “C:\Users\Darren – Old” to “F:\Users\Darren – New”?

In this case, the command you’d want to run is:

mklink /j “c:\users\darren” “f:\users\darren – new”

mklink /j “c:\users\darren – old” “f:\users\darren – new”

Because you’re trying to make a junction from C:\Users\Darren -> F:\Users\Darren – New. The “Darren – Old” folder is just there as a backup of your profile in case something goes horribly wrong.

50. Faisal Abbas May 17, 2010 / 2:57 pm

I am trying to get this work on Windows 7. I have moved all files (including the hidden file)
But when I open the command prompt and list the directory using dir /a, I see a few files.
NTUSER.dat
ntuser.dat.log1
ntuser.dat.log2
ntuser.dat{}.TM.blf
ntuser.dat{}.TMContainer000…001.regtrans-ms
ntuser.dat{}.TMContainer000…002.regtrans-ms
ntuser.ini

and some junction points such as Application Data, etc

I created the junction points in the target user profile, But am having difficult time move the files.
I have tried it in Safe Mode (Command prompt), have tried taken the ownership, have tried changing the attributes.

Move, Del, copy commands simply are unable to find files (however, opening them in notepad works,binary).

Does somebody has an idea of what is going on and how to circumnavigate?

Thanks

Faisal

• Keithius May 17, 2010 / 5:04 pm

These files are always locked whenever you are logged in to that account – even in Safe Mode (Command Prompt). You CANNOT move them while you are logged in under that account.

That’s why you need to either move them while logged in under a completely different user account (which is what I typically do), or via the command prompt you get via the Install CD (as others have noted in the comments here).

51. paul May 20, 2010 / 2:26 am

Funny you mentioned Linux, as it’s no much easier in that – change the home dir path once in one file, copy with a sudo and pretty much done. No need to reboot in safe mode or any other nonsense either.

• Keithius May 20, 2010 / 8:33 am

Yeah, I know, Linux has always had a simple, easy way to move pretty much anything around – unlike Windows. Heck, for a long time, Windows user profiles were actually kept in a subdirectory of the WINDOWS folder itself!!

52. Jay May 23, 2010 / 12:07 pm

Help! so I created an admin acct. I moved my profile folder to D:\Users\Jay. I deleted my old profile folder and created a symbolic link mklink /D C:\Users\Jay D:\Users\Jay.

Now when I login to my account it says it has created a temporary profile for me and that all files in this profile will be deleted when I logout! What did I do wrong? When you look in C:\Users there is only a symbolic link to my profile on D and nothing else. If you click on that link it works. I changed the ownership back to my Jay acct after moving everything as Administrator as well.

Thank you,
Jay

• Keithius May 23, 2010 / 12:36 pm

You may not have copied everything in you user profile to D:\Users\Jay – for example, there may have been hidden files you didn’t copy.

It may also be that you created a symbolic link (mklink /D) instead of a directory junction (mklink /J), and you probably needed to create a directory junction in order for this to work properly.

Also, you probably shouldn’t have deleted your original profile folder – I would have renamed it (in case something went wrong, so you could go back).

Try putting your profile back in the original location (get rid of the symbolic link) and see if you can log in normally without getting the temporary profile message. If you can do this, then you did copy all the files right, and it’s probably just that you should have used a directory junction instead of a symbolic link. If, however, you get the temporary profile message, then that means you missed some important file when copying your user profile, and since you deleted your original profile, you are out of luck and I’m afraid there’s nothing you can do but create a new user profile, copy your user data back bit by bit and try again. Sorry!

53. Nils-Fredrik June 27, 2010 / 4:58 pm

Great, thanks!

It works just fine for me, running windows 7.

• Keithius June 28, 2010 / 8:26 am

54. Dave July 5, 2010 / 7:31 pm

I made a batch file to move user profiles. There is no error checking…feel free to improve.

[code]
rem Run as administrator, NOT logged into the profile you want to move
rem Set the 3 variables below to the proper settings.

rem DRVLET is the drive letter where the current profile is stored, usually c:
set DRVLET=C:

rem PROFNAME is the name of the folder where your profile is stored, usually the same as your username
set PROFNAME=test

rem NEWPROFLOC is the where you want the profile to be moved. Trailing backslash not needed.
rem Final location will be %NEWPROFLOC%\%PROFNAME%
rem NEWPROFLOC=M:\Users, PROFNAME=test Location->M:\Users\test
rem NEWPROFLOC=M: , PROFNAME=test Location->M:\test
set NEWPROFLOC=M:\Users

SETLOCAL ENABLEEXTENSIONS

md “%NEWPROFLOC%”

robocopy “%DRVLET%\Users\%PROFNAME%” “%NEWPROFLOC%\%PROFNAME%” /E /COPYALL /FFT /V /XJ /ZB /R:1 /W:1

CD /d “%NEWPROFLOC%\%PROFNAME%”

mklink /d /j “Application Data” “%DRVLET%\Users\%PROFNAME%\AppData\Roaming”
mklink /d /j “Local Settings” “%DRVLET%\Users\%PROFNAME%\AppData\Local”
mklink /d /j “My Documents” “%DRVLET%\Users\%PROFNAME%\Documents”
mklink /d /j “NetHood” “%DRVLET%\Users\%PROFNAME%\AppData\Roaming\Microsoft\Windows\Network Shortcuts”
mklink /d /j “PrintHood” “%DRVLET%\Users\%PROFNAME%\AppData\Roaming\Microsoft\Windows\Printer Shortcuts”
mklink /d /j “Appdata\Local\Application Data” “%DRVLET%\Users\%PROFNAME%\AppData\Local”
mklink /d /j “Appdata\Local\Temporary Internet Files” “%DRVLET%\Users\%PROFNAME%\AppData\Local\Microsoft\Windows\Temporary Internet Files”
mklink /d /j “Documents\My Music” “%DRVLET%\Users\%PROFNAME%\Music”
mklink /d /j “Documents\My Pictures” “%DRVLET%\Users\%PROFNAME%\Pictures”
mklink /d /j “Documents\My Videos” “%DRVLET%\Users\%PROFNAME%\Videos”

attrib /l +s +h +i “Application Data”
attrib /l +s +h +i “Cookies”
attrib /l +s +h +i “Local Settings”
attrib /l +s +h +i “My Documents”
attrib /l +s +h +i “NetHood”
attrib /l +s +h +i “PrintHood”
attrib /l +s +h +i “Recent”
attrib /l +s +h +i “SendTo”
attrib /l +s +h +i “Start Menu”
attrib /l +s +h +i “Templates”
attrib /l +s +h +i “Appdata\Local\Application Data”
attrib /l +s +h +i “Appdata\Local\History”
attrib /l +s +h +i “Appdata\Local\Temporary Internet Files”
attrib /l +s +h +i “Documents\My Music”
attrib /l +s +h +i “Documents\My Pictures”
attrib /l +s +h +i “Documents\My Videos”

cd /d “%DRVLET%\Users”
rem You can delete %PROFNAME%.orig after you verify everything is OK
move “%PROFNAME%” “%PROFNAME%.orig”

[/code]

• Keithius July 6, 2010 / 8:35 am

Wow, that’s a very… thorough batch file!

It’s probably worth explicitly noting (for those people who don’t read the batch file before blindly downloading it and running it) that you need to do 3 things before using this batch file.

1. Set the environment variables mentioned in the batch file
2. Make sure you have robocopy and that you can run it from a command line

Thanks for sharing it, I’m sure it will help lots of people!

• Paul August 22, 2010 / 5:36 pm

Thanks Dave for the batch file. Worked like a charm. Thanks Keithius for starting the ball rolling on this. Typical Microsoft not to have a simple remedy for something like this.

Cheers

• Chuong January 13, 2011 / 1:58 am

Thanks a lot for this, make the process easier.

• Keithius July 7, 2010 / 5:38 pm

I’m glad it worked for you!

55. Will July 14, 2010 / 6:09 pm

Worked groovily – thanks for posting this!

• Keithius July 14, 2010 / 6:13 pm

Awesome! I’m really glad to hear it worked for you. It is always nice to do something that helps other people!

56. Chris September 7, 2010 / 5:58 pm

Hi, Keith. I’ve bookmarked this page and refer to it often. Thanks for posting and hosting this lively discussion. I’m banging my head against a wall trying to resolve the IE issue (can’t view source, can’t install Flash, images saved as bitmaps, etc.) on my work laptop. I’ve tried everything mentioned here. My latest attempt was to store temporary files completely outside my user directory (D:\TEMP\Temporary Internet Files). Alas, no luck. Any other suggestions?

Side note: I just installed Windows 7 on my netbook, and I gave Dave’s batch file a go. That seems to have prevented the IE issue.

57. Jocelyn September 12, 2010 / 3:36 am

I used Keith’s method and it worked, but now when i tried to log into the new profile, i get this error message: The Group Policy Client service failed the logon. What should I do?

58. Chip September 22, 2010 / 3:25 am

Thank you SO much for this! It is awesome and easy to use.

Just a note: I am running Win 7 Pro (x64). I didn’t log in via safe mode or command console. When I moved my folder, I was told I couldn’t move some files because they were being used by certain services. By stopping the services manually I was able to move the files then without a problem.

To stop the services:
Click Start and type in “services”. Select the Services from the list of programs. find the service that you want to stop and then click “stop” on the left.
Once the service is stopped, click “Try Again” on the copy/move error box and if you closed the correct service, it should continue processing.

• Keithius September 22, 2010 / 8:34 am

Yeah, that is one way to do it – assuming you can figure out which services you need to stop!

59. ed September 22, 2010 / 3:29 am

excellent solution. there are few so good technical articles as this one. everybody wants to give advice, but few have the knowledge.

• Keithius September 22, 2010 / 8:38 am

Thanks; I’m glad you found it useful!

60. Richard October 4, 2010 / 3:40 am

Keith, thank you! I finally got around to doing this on my weeks old Windows 7 installation on my laptop. Prior to doing this I had a convoluted method of keeping my data and downloads on another hard drive, and using Windows Explorer was always such a pain. The only issue I’m still having is that for some reason Windows keeps creating a second “My Documents” folder under my user profile. It’s not a day-ruiner, but it is inconvenient. Have you run into that before? Any ideas what might be causing it and/or how I can fix it?

• Keithius October 10, 2010 / 9:02 am

No, I haven’t run into that before, and I’m not sure what might be causing it. Sorry!

61. Michael November 18, 2010 / 1:46 am

I am on a Windows 7 x64 box and under the built-in Admin account, tried the script method. Everything seemed to work, except for the IE download issue. I have knowledge of OSs, so it wasn’t a problem for me to reset the owner/security on all subfolders under my User, but IE still can’t download anything. Anyone got any ideas on this? If I’m the owner and have “full rights” on everythin folder under my username, why can’t IE download?

• Keithius November 18, 2010 / 9:50 am

Sorry, I’m drawing a blank – I can’t think of anything.

You might try asking your question over on SuperUser.com; they have a much larger community of people and might actually be able to help you (certainly faster than you’d probably get an answer here; these are just comments, not a forum).

Good luck!

• Anh Vo December 3, 2010 / 6:00 am

Not sure if you have resolved the issue or not. I’m also running Windows 7 x64 and I don’t have the IE download issue (I don’t use IE, but I tested it and it seemed okay)

62. Anh Vo December 3, 2010 / 5:59 am

I used the batch posted by Dave and it worked perfectly for me. The only thing I’d add is that if you’re running Windows 7, you need to stop the Windows Media Player Network Sharing Service, otherwise the original profile folder cannot be deleted and thus the junction creation step will fail.

• Keithius December 3, 2010 / 9:07 am

Yeah; it’s a good idea to stop all non-essential background services before doing something like this.

63. lancealot December 9, 2010 / 11:54 pm

So, i am going to give the script a go on my new Win7 box this weekend.

I have one quick question though…i want my users data AND program files (i.e., all non OS-specific files) to be stored on a second drive (D:). What’s the easiest way to do this? Use same instructions as I am for profiles? I did read the entire thread and there are a few comments on moving the program files directory, but I didnt get a good feeling that their attempts were successful.

Thanks

• Keithius December 10, 2010 / 9:44 am

No, generally speaking you can’t move the Program Files folder, at least not without great difficulty and some serious trickery. And even then, sometimes programs will just access C:\Program Files no matter what you’ve done.

The best bet for dealing with this is simply to install your programs onto a second drive – that is, during the installation/setup of the program, change the install directory. 99% of programs allow you to do this, and that should take the bulk of programs off your boot drive. It’s not a 100% fool-proof solution, but it’s really the best you can hope for given the other limitations.

Though of course you are welcome to try and “beat the system” so to speak, but be warned that you may be in for a very, very rough ride!

• lancealot December 10, 2010 / 10:17 pm

Ok thanks. I’m pretty computer savvy but I’m not going to risk screwing something up, even if I do have a backup/image handy.

Thanks again Keithius

64. lancealot December 10, 2010 / 11:24 pm

I have another question regarding the script…has anyonr tried using it on the “Public” user?

65. Alain Quarré December 21, 2010 / 6:54 pm

I wrote a script to do all Windows modification before account creation.

You can read this post, in english:
http://www.sevenforums.com/tutorials/117308-user-folders-moving-user-folders-modular-script.html#post1008268

Or th original one, in french:
http://www.forum-seven.com/forum/topic4073.html

http://www.gopc.be/Alain/PositionDefaultFolderModular-ML.rar

My script create the correct junctions… ten second to run, and it’s all
You must test it!

• Keithius December 21, 2010 / 7:25 pm

Wow, that’s quite impressive – thank you!

I’m sure people will find it very useful. Thanks for sharing it!

• Keithius January 1, 2011 / 4:20 pm

No, not quite. BrianWilder’s method is the more “official” method of redirecting your user profile to a different location – but of course you have to do it during installation of Windows itself, so it is no good after the fact. The method of using an “answer file” to do certain things during Windows installation that aren’t possible once the installation itself is done isn’t actually a new idea or a new feature in Windows 7 – it’s been around for quite a while.

But BrianWilder’s method is not the same one I wrote about, or what most people here are talking about. It’s a cool and useful method, sure, but again, you have to do it while installing Windows – once installation is done, you’re out of luck and you’d have to resort to techniques like those discussed here.

But thanks for pointing it out so people know about it!

66. Steve December 26, 2010 / 10:05 am

Thank you, this method is the bomb. I’m medium saavy and did it in less than 30 minutes.

67. Ralf January 3, 2011 / 3:44 am

I felt the need to comment even if not adding anything further to the discussion: In the past I just ignored the User designation in Windows and just plunked my data willy nilly relying on my carbon based memory to keep abreast of the location and size of the aggregate. Having just received a Win7 machine with a huge vacant partition that seemed to cry out for establishing a beach head for the inevitable growth that storage of media files need…well, my search lead me here. Thanks. I’m glad that my suspicions that it wouldn’t be a simple matter of drag and drop were borne out in a vague, “Nice to see people helping the community.” — way.

• Keithius January 3, 2011 / 9:11 am

I’m glad that my suspicions that it wouldn’t be a simple matter of drag and drop were borne out in a vague, “Nice to see people helping the community.” — way.

Errr… you’re welcome, I think?

At the very least I’m glad this was able to help you. I hope it works out well for you!

68. MadEyeX January 7, 2011 / 9:23 pm

@Dave

Thanks, man! Great batch. Worked like a charm. I have a few questions and a request:

1) I’m wondering if this can be done with the program data also (or even other files)?

2) Is there any harm in doing this to said files?

3) I’m working with a 32 gig SSD. I’d like to keep the overhead down. It seems after the page file, I have about 2 gigs left. Any links to helping keep the OS slim would be much appreciated!

69. Chuong January 12, 2011 / 11:19 pm

I happened to use official method of relocating each folder in my user profile to D:\ but I knew that the AppData with lots of setting were left in C: when I reinstall Windows 7. Just tried out this method today, works great. Thanks Keithius. Only one small problem I see is search index works for my already located folders, but my user folder in explorer (above the Computer, below Homegroup) show a duplicate of all folders (Contact, Desktop, Downloads, Favorite,….). These folders are identical, point to the same one in my D:\. Anyone encounter the same problem. I’m thinking of remove the junction and redo this method without relocating first (I guess search index would not work that way). Anyway thanks for a wonderful article.

70. Jason February 21, 2011 / 3:22 am

I just got a new HP laptop. Suprised to find that HP used all four primary partitions and I am new to Windows7 and know nothing about dynamic drives and such. So I deleted HP_Recovery partition. This gives me option to put another OS on the little space I have left.

Q. HP_Tools partition is on E:\.
HP (and others on web) say that the laptop will not run if I delete this partition. If I move it to another partition and rename all in the registry of E:\ to somewhere else…say F:\, shouldn’t it work?

I am going to test Dave’s batch file on a temp account and see how well it works. I’m tempted to go the registry method that Mark outlined but I am a little ‘scared’ about the unknown. I don’t want to brick my computer.

This has been a nice find, good stuff.

• Keithius February 21, 2011 / 9:31 am

It may work, or it may not. It depends entirely on being able to 1) find all of the references to E:\ and change them to F:\ and 2) make those changes without breaking the computer while you’re using it.

In theory, yes, what you proposed should work, but it’s pretty ambitious and without more knowledge about what is using this E:\ partition, I’d be hesitant to try it out on a live system.

71. Dyrver Eriksson April 27, 2011 / 10:41 am

Now this will increase the lifetime of my SSD a bunch since many programs and games write to the user account these days, (firefox for one) thanks alot Wish the installer lets one pick a custom partion for UsersFolder with Windows 8 next.

72. Raymond May 3, 2011 / 1:38 am

Does anyone know that relocating user profiles(not user profile folders) under Windows 7 will break the UAC virtualization (fle/rgistry virtualization)?

• Keithius May 3, 2011 / 7:43 am

There are methods in the comments here that work around that problem, or at least as I understand it. I’m not sure what you mean by “user profiles” but “not user profile folders.”

• Raymond May 3, 2011 / 9:52 am

Relocate “user profiles” means to relocate the entire user profiles directory (C:\Users) to other volume. After you relocate the user profiles, there will be no more C:\Users.

Relocate “user profile folders” means to relocate one user’s profile folder(s), such as My Documents, My Music, etc. After you relocate some user profile folders, the C:\Users is still there, just some user profile folders were moved.

I know how to relocate the “user profiles” and know how to relocate the “user profile folders”, just want to know if anyone ran into a situation that the UAC virtualization is totally off after you relocate the “user profiles”? (If you only relocate some user profile folders, the UAC virtualization still works).

• Keithius May 3, 2011 / 5:41 pm

Folder virtualization is a sticky point for doing this sort of thing. If you remove the entire users directory, then virtualization will break, unless you re-create the directory junctions that were used to do the virtualization in the first place.

If you just move a single user’s folder, then virtualization will probably still work, as most of the virtualization is aimed at turning references to “C:\Documents and Settings” to “C:\Users,” since after that things are generally the same.

You can also type “dir /al /s” from the C:\Users folder to see all directory junctions. If any of them are in the folder you’re planning to relocate, then virtualization will break (at least partially). You may be able to re-create them, if you’re clever.

You may want to head over to superuser.com for more on advanced topics like this – these comments aren’t very active and aren’t really suited for asking questions of other people (aside from me, since I see everything).

• Joe September 30, 2011 / 12:13 pm

You could do the following to restore them:

73. Glen May 24, 2011 / 2:39 am

Woe is me. I hope someone (…or many someones) is/are still watching this thread.

I tried Dave’s script (on Win 7 HP) like so;
2. Booted into safe mode to avoid unwanted services running
4. Checked the script one last time and ran it.

After it ran, I noticed that the original C:\users\username was still there, so I tried to do the MOVE command manually – it complained that it couldn’t be moved since the process was being used. Dummy me realized it was the text file of the script I left open (opened it from the original user folder). I don’t think this should have affected the Robocopy, so I closed it, changed \uname to uname.orig and then manually created the junction. That worked so I figured I was set.

5. Shut down
6. Powered on, logged in as wife (it’s her laptop/ her account I’m trying this on)
7. Poking around I noticed that Windows has re-created her user name under C:\users along with all the files, but each file and folder directly under her user folder has the lock icon beside it.

My understanding is that these are permission restrictions which doesn’t make much sense since it looks as though administrators still have full control over this folder. But worse, why were they all recreated? Is this something to do with the junction between c:\users\Uname and d:\users\Uname?

What did I miss?

Thanks for any help.

• Glen May 24, 2011 / 10:56 am

74. Tom June 19, 2011 / 5:23 pm

I used your method for almost a year now, since I started running a 64SSD and love it. Just updated Win7 service PK, now my profile will not start up. Win7 is creating a temp profile. Checked and my profile short cut and it is still in the C Drive. All files/folders still in my other drive. Done some checking and see that updates do cause some issues with this method. Some suggest that update while logged into another admin account. unfortantely my last usabled restore point is six months past. Not sure if I should just start a new profile and copy my profile to this new one or is there an easier way to fix this problem.

Tom

75. Ash July 24, 2011 / 10:32 am

Is it possible to use this method to move the entire users folder, and can this method also be used for the Program files? Eventually I would like my drives to look something like this (other than C:\ the letters might be different):

C: Windows 7
D: Users
E: Program Files
F: Games

All these will be on one drive, whilst my documents, music, etc will be on a different drive?

• Keithius July 24, 2011 / 7:57 pm

It is possible, as other people have noted here in the comments… but generally speaking, relocating the ENTIRE “Users” folder is not something I would recommend.

I don’t think it is possible to redirect the entire “Program Files” folder – you can redirect individual programs easily enough, but moving the entire folder – as with the “Users” folder – can be extraordinarily difficult. I certainly wouldn’t try it.

If you want your files and folders to be partitioned in this way, you might want to look into changing the default location of these folders during the Windows installation, as you have a better chance of properly redirecting the folders during setup than you do after the fact.

• lol September 4, 2011 / 6:10 am

it is possible to move Program Files. better yet, we use c:\program files only as a mount point on our Win XP box and program files folder lives on separate HD (you can see the unix analogy right where /usr is merely a mount point to separate partition). Check out mounting under windows. just do xcopy of the stuff so you dont mess the access rights.

• Keithius September 4, 2011 / 4:28 pm

Sure it’s *possible* but it’s terribly difficult. Something in the Program Files folder is almost always in use if you are booted into Windows, and going beyond that and using a WinPE CD or something like that is far beyond what I was willing to try to describe. But yes, technically speaking, it can be done… it’s just really, really, really hard (or if you prefer, substitute “hard” with “annoying”).

76. AJM July 26, 2011 / 1:27 pm

I have managed to move multiple user profiles using this method in Win7. Is it possible to use the same method in a server? Or is there another way?

Regards,

A

• Keithius July 26, 2011 / 9:10 pm

It depends on what server you’re talking about. But in general, the Windows servers can use the same methods described here.

• AJM July 27, 2011 / 2:37 am

I am trying this in Windows Multipoint Server 2011, but I keep having issues when moving — it doesn’t always do as I say. So I have to move each folder individually, but that doesn’t seem to do the trick either.

• Keithius July 27, 2011 / 8:03 am

“doesn’t always do as I say?” That’s a very strange way to put it.

You should probably head over to superuser.com – search there for similar problems, and if you can’t find an answer, ask them. There are FAR more people with more knowledge over there than here. (I’ve never even heard of “Multipoint Server” before!)

• AJM July 28, 2011 / 7:53 am

Apparently, WMS hasn’t been fully discovered/explored, yet. (I couldn’t find anything!)

Well, I had had many failed attempts, so I had to delete those users and recreate them. Finally, after numerous tries, I managed to move all the subdirectories using Robocopy.
Now, the question is: Do I have to recreated the junctions I had previously created for the new (recreated) or will they still be referencing the same directory, as long as the name is still the same?

Thanks.

• Keithius July 28, 2011 / 8:08 am

I don’t know for sure; did you try asking on superuser.com?

My guess would be you’d need to recreate the junctions. I’m pretty sure they are tied to the particular directory entry in the master file table or some such similar thing, and not to the “name” of the directory.

As an example, I found this answer over on superuser.com to a question asking the difference between hard links, symbolic links, and junctions:

Junctions & symbolic links can be “broken” – it you rename/move the target, then they will point to non existent target. So you need to update they in such cases. But hardlinked files can be renamed/moved and all hardlinks will still be the same file, just with different names.

This would seem to confirm my hunch that if you had deleted the users’ folders and re-created them, then you will need to re-create the junctions (even though the names are the same).

77. wes July 27, 2011 / 5:17 pm

This is brilliant! Why weren’t we doing this all along? So many messy tutorials on the web about how to (not quite) move a profile. Surely it would be easy to move the Users/docsnsettings dir if you could do it from UBCD? Haven’t tried that myself.

• Keithius July 28, 2011 / 8:13 am

My guess would be, as with a lot of things in Windows, this wasn’t really possible all along because of Microsoft’s business decision to sacrifice customizability (e.g., the ability to re-locate user profile folders) in favor of ease of use for very novice users.

While those of us who aren’t “total n00bs” may lament this decision, it did 1) make Microsoft a lot of money 2) make Windows the predominant operating system in the world. So you can’t really blame them for that one.

Of course it goes without saying that Linux (and other Unix-like OSes) have had this kind of capability since the very beginning.

Really of course it comes down to the decision in DOS to assign drive volumes to letters of the alphabet (which I believe was done to remain compatible with CP/M’s OS, which DOS was originally aimed at being a replacement for). Because of this “drive volumes = letters” scheme, as opposed to Unix/Linux “mount points” scheme, we’ve been stuck with the inability to split things across drives or relocate certain core OS folders easily.

Ah well, hindsight is always 20/20, and all that.

78. David August 4, 2011 / 3:47 am

Hey,

um, what to do if your pinky finger accidentally hits the return key while typing and it creates the junction in the wrong place? (I’ve got a friend who did it – yeah, that’s the ticket…)

David

• David August 4, 2011 / 4:17 am

update: found the answer I was looking for – just a matter of deleting the link!

79. Steve August 7, 2011 / 7:15 pm

I managed to move everything and create the link just fine.. However, when I logged back on as me, Windows created a TEMP profile for me. It referred me to the event log which just said that my profile couldnt be found or was corrupted. I’ve checked the link, names etc.. Any ideas??

Thanks

• Keithius August 8, 2011 / 7:52 am

Check the permissions on the files and folders you moved – and also check the “Owner.” That can be important, too.

• Steve August 8, 2011 / 11:31 am

Hello again,

I dont pretend to be an expert on Windows security (I have read the first paragraph), but to test whether it was a security thing, I gave “EVERYONE” full Control on my moved profile folder. I got the same result so I dont think it’s security? I checked the ownership, that was correct. What permissions does the link itself need??
My normal account has administrator access anyway. I’m using Windows 7 home premium. I’m trying to move the folder to a different partition on the same HDD. Are user accounts case sensitive, intolerant to trailing zeroes?? although I have checked all that… I’m at a loss but I’d like to persevere as it’s such a neat solution if it works.. Many Thanks Steve

• AJM August 8, 2011 / 4:31 pm

I don’t think it’s a security issue. It would just deny you access, rather than make your account temporary.

– It might be the method you used to move the folder. Are you sure -all- the files were moved, including all hidden files?
I had the same issue when I simply moved all the folders to the second partition. Some would disappear once moved, so I used Robocopy. Robocopy will move all folders within the user profile folder, then delete it once everything has been moved.

• Keithius August 10, 2011 / 8:17 am

I only mention the security issue because it is one of the easier-to-fix potential causes. If Windows can’t read the important bits of your user profile (ntuser.dat, for example) for ANy reason, it doesn’t give an error per-se like you’d expect it to, it just creates a “temporary” profile and loads that. It’s kind of weird. (It happened to me when I first tried this.)

The other thing to check of course is that you did copy those important files – including that ntuser.dat file I mentioned (there are others as well but I forget their names).

Since the event log says the profile couldn’t be found or was corrupted, I’d really start there with my checking.

For the “can’t be found” problem, make sure that in the C:\Users folder, there is a folder (or directory junction, which leads to a folder containing a user profile) that matches exactly your user name. Also make sure your junction is set to the right folder depth – for example, if your user profile folder was originally “C:\Users\Steve,” make sure that the new junction is called “Steve” so that if you browse to C:\Users\Steve, you see exactly the same thing you saw before you moved your profile.

Also, make sure the “special” user profile files are there – these files are typically have both the “hidden” and “system” attributes, so watch out for that.

For the corrupted thing, I’d start by again checking for those “special” user profile files. Did you make a backup copy of your user profile somewhere? Try comparing the original backup copy to the one you’ve junctioned to.

I don’t know if the folder names are case sensitive, but I wouldn’t risk it.

As for the “trailing zeros,” I’m not at all sure what you mean by that. The names MUST match exactly – if your user name is “Steve” then your user profile folder will most likely need to be “Steve” (and after you’ve moved it, the junction you create will need to be named “Steve” as well).

This can get somewhat confusing if your computer has joined or left a domain, and you’ve added or removed users, or if you have a user on the domain with the same name as a local user (e.g., the Administrator account)… because then you get user profile folders that start with the user name, then have a period and the domain (or computer name, depending on which one came first), e.g., “Steve.DOMAIN” or “Steve.COMPUTERNAME”. But, I’ll assume for the sake of simplicity that you don’t have that particular problem… just putting it out there for the sake of completeness.

Also, don’t forget that you can ask a question about trouble you’re having at the site superuser.com – you will often get an answer faster than you will here, and you’ll likely get several answers, which are almost guaranteed to be more useful than my rambling replies! Anyone can ask a question there, you don’t even need an account. Trust me – it’s a really great resource (I’ve used it myself several times).

Anyway, this has gone on long enough… but I hope it was in some small way helpful to you!

80. George August 26, 2011 / 4:40 pm

Thanks so much for this; I heard about it a while back (from an uber-Linux fanatic friend) but didn’t think about it until today, when I was desperately looking for a way to create more space on my C partition.

@Steve – I don’t know if you’ve found the solution yet, but it sounds an awful lot like a corrupted user profile/SID, related to manually removing a profile. MS recommends doing so via the Advanced Settings, User Profiles, Delete Profile option.

Here’s the documentation on how to fix this, however (again, assuming this is your issue):

http://support.microsoft.com/kb/947215

81. Graeme September 24, 2011 / 5:30 am

Has anyone tried this for workgroup to domain migrations?
My laptop moves around several domains, and instead of trying to save all my stuff in ‘Public’ and creating a new user profile every time I need to join another domain, I’d like to find a way to redirect ALL of the profiles to the same profile folder.
Perhaps junctions are a way to do this, but I’d like to hear if someone else has tried this before attempting it with my work laptop.
Alternatively, is there a way to join a domain without adding a new profile???

• Keithius September 24, 2011 / 8:58 am

That I don’t think is possible. When you join a domain, even if the user name is the same as your own computer’s local machine user account, you get a different profile.

Every user account on every different domain is a different account, even if the names are the same. So I don’t think there’s any way to join them together.

As for the the “Public” folder… if you mean the Public/All Users folder that comes by default with Windows, well, that always is in the same place no matter what account you’re logged in as. So you shouldn’t need to move that.

If you’re using Windows 7 (and these days I tend to say, if you’re not, why aren’t you?) you can just add the public folder to your libraries (assuming it’s not already there). Much easier to manage than junctions.

82. Graeme September 24, 2011 / 9:02 pm

I guess what I’d ultimately like to do is use a single profile, and authenticate as a member of multiple domains without switching desktop, files, prefs, etc.

Joining a domain creates a new profile folder (“C:\Users\Username.domainName”). If the only thing that changes (when joining a domain) is the profile folder, then it should be possible to have “C:\Users\Username” and “C:\Users\Username.domainName” both resolving to the same folder in the filesystem. This is what I’d like to do with junctions.

Does anyone know what registry keys are added/changed to authenticate a user for a domain? If these just accumulate for each new domain, then what I’m proposing should be possible However if there are keys that must have a single exclusive domain registration, then it can’t be done.

• Keithius September 25, 2011 / 3:11 pm

I think you are going to find that it is far more complicated than just a few registry keys… there’s a whole bunch of authentication stuff that goes on behind the scenes that would make trying to combine profiles via junctions very difficult (I might even go so far as to say nigh-impossible).

You might want to ask this question over on superuser.com – there are far more experts there than read my little blog.

83. Graeme September 26, 2011 / 4:20 am

Thanks Keithius!

I’ll do a lot more research at superuser & other places before trying anything.