Junctions to move Users and ProgramData in Windows 8

augiem

Senior member
Dec 20, 1999
746
0
76
Has anyone had success in using directory junctions to move the Users and ProgramData folders to another drive in Windows 8? I used this technique successfully on 2 Windows 7 systems and 1 Vista system when I upgraded them with SSD's. (Put Windows and Program Files on SSD, user data on HD). It doesn't seem to work in Windows 8 anymore.

I installed Windows 8 on the empty SSD. I then copied Users and ProgramData to the HD using a combination of Robocopy and Xcopy to copy those folders and then manually rebuilt all the internal symlinks (about 36 I think) at the new location (checked and double checked for accuracy). Copying skipped about 7 files in ProgramData, but I couldn't determine which ones they were or why it skipped them. There were no access denied errors and I tried Robocopy and Xcopy with all the relevant options trying to get around the problem (copy NTFS data, backup mode, raw mode, etc.) (I don't really think this was the source of the problem but I thought I should mention it.)

Anyway, Windows booted and everything seemed fine. Windows and Modern programs ran fine as well. So I installed a few programs. No problems. Eventually I tried to add Windows Media Center through Control Panel. It failed to install over and over even after reboots. So eventually I gave up on WMC. I figured it MAY have been due to moving the user data folders, but I wasn't sure.

Anyway, after a while I ended up doing a Windows Update, two updates installed fine but one critical update failed to install. After that, almost all the icons in the start menu and the "all apps" page were gone, including the default Windows accessories and even the desktop icon. Both Start Menu folders for his user and for all users were wiped. I was pretty sure by now it was the fault of the junction, so I went back and removed it and put back the default Users and ProgramData folders Win8 created which I kept in a subfolder on C. Sure enough, I had zero problems after that. Updates installed, Media Center installed, all start menu items were fine.

I really liked using junctions, so I'm not to happy about this. I was able to use the manual way to redirect his user folders by right clicking on the user folder, properties, location tab, and choosing the folder on drive D. But this technique only works for the basic user data folders, not AppData or ProgramData or any of the hidden folders in the Users tree. This wouldn't be so bad but some programs are hogs like Adobe Premiere which makes a 30GB cache file in AppData. That's going to be a serious problem for him on a 120 GB SSD because he had a ton of programs installed before the format and will likely be reinstalling them. That's going to mean having to offload some of the bigger programs like his 3D modeling stuff to D using junctions (already did that for the games), etc. which partially defeats the purpose of an SSD. Plus I really hate the idea of all the temp files and such putting constant wear on the SSD.

Like I said, I've done this on 3 other PC's with no issues. They've been running like this for 2+ months and have survived many Windows Updates.
 
Last edited:

MichaelD

Lifer
Jan 16, 2001
31,529
3
76
I thought you'd like to know that you're not alone with this type of problem. Win8 and Server2012 are the same code base/kernel and they seem to have the same idiosyncracies.

I installed Server 2012 Essentials (formerly Small Business Server and WHS2011...MS combined them into this) and while it runs fine it's got some real PITA "features."

Such as you must dedicate an entire physical HD to Server Backup. Not a partition, the whole drive. Then you cannot move or copy those backup files to another folder or HD, even if it's internally installed. The dedicated backup HD is invisible to Windows Explorer and to Disk Manager. You can only see it in the backup utility.

You can physically remove that backup drive, insert another one and start new backups on the new HD, but Windows will give you constant critical error popups that "Backup Drive #1 is missing." Real bother, that is. I do not know if you can later on re-insert the original backup drive and restore backups from it...not something I'm willing to test ATM.

TBH, I've done quite a bit of digging in the GUI and even posted on Technet and AFAIK, it can't be done (moving or copying backups). Maybe some future patch, third party util or Powershell trickery will allow it, but right now, you are stuck with your server being backed up one HD and if it dies so do your backups. Apparently, even in Server 2012, we still need 3rd party backup utilities like Ghost/Acronis TI/etc.

Not the same but similar to your problem of not being able to move User and Program Data folders without borking the OS entirely. Hopefully these functions are restored soon. Good luck. :)
 
Last edited:

ViRGE

Elite Member, Moderator Emeritus
Oct 9, 1999
31,516
167
106
Maybe junctions aren't the right answer? With Vista Microsoft depreciated junctions for symbolic links, so that may be worth giving a shot.
 

augiem

Senior member
Dec 20, 1999
746
0
76
Maybe junctions aren't the right answer? With Vista Microsoft depreciated junctions for symbolic links, so that may be worth giving a shot.

Are you sure? A junction is just a type of symbolic link. You can create it with mklink /J. How could they be depricated when even Windows 8 makes use of them heavily? Go to cmd, cd to your Users folder and type "dir /s /al". You'll find a bunch of Junction type symbolic links in there for all the "My Documents", "My Pictures", etc.

According to http://msdn.microsoft.com/en-us/library/windows/desktop/aa365006(v=vs.85).aspx:
There are three types of file links supported in the NTFS file system: hard links, junctions, and symbolic links.

A hard link is the file system representation of a file by which more than one path references a single file in the same volume.

A junction (also called a soft link) differs from a hard link in that the storage objects it references are separate directories, and a junction can link directories located on different local volumes on the same computer. Otherwise, junctions operate identically to hard links

I can't find what the specific differences are between Directory Symbolic Links and Junctions are except for this on a forum:

"symbolic links work across file systems and networked resources, junctions don't. There's a couple paragraphs on the differences in Windows Internals 5th edition (book) to that effect."
 
Last edited:

KeypoX

Diamond Member
Aug 31, 2003
3,655
0
71
Can you not just right click on user folder and move it? appdata I never moved but that does build up some size too.
 

augiem

Senior member
Dec 20, 1999
746
0
76
Can you not just right click on user folder and move it? appdata I never moved but that does build up some size too.

Windows has that built in Location stuff for relocating the maybe 10 user data folders within a user's profile only (Contacts, Links, Documents, Videos, etc.). It doesn't have a way to move the entire Users folder, nor the ProgramData folder. Nor can you do that for Users/USER/Appdata, which as I said can grow to 30+ GB with Adobe Premiere installed (and other progs may need caches also so the answer isn't just to try to reroute the Premiere cache location if that's even possible). If you were to just grab the users folder and try to move it somewhere within Windows, it would fail because files are in use. If you were to reboot into command prompt and move it without creating a symbolic link to the new location, Windows wouldn't load anymore.
 
Last edited:

augiem

Senior member
Dec 20, 1999
746
0
76
Not the same but similar to your problem of not being able to move User and Program Data folders without borking the OS entirely. Hopefully these functions are restored soon. Good luck.

That's too bad. I hope you get it worked out.

I'm a little surprised to see these new administration difficulties with Windows 8 as its a relatively small update compared to the XP -> Vista -> 7. I'm also surprised at some of the decisions they made to this area purposely like removing F8 on boot for safe mode.

Anyway, I'm gonna give it another try using a Directory Symbolic Link just to be sure. I just wish I could get those User and ProgramData folders to copy over COMPLETELY. The only way I can think of would be to make a drive image, dump to the HD, then delete away the Windows folders and such. But I can't do that because the HD has a ton of user data on it already and I don't have any other drives I can use to offload it. Seriously, there should NEVER be a file you cannot copy on a hard disk.
 

sm625

Diamond Member
May 6, 2011
8,172
137
106
I dont know why you'd want to bother with this. The only things you should bother moving to a large hdd are game installations, and media folders. Anything else should be able to fit onto your typical 32-64GB SSD. Write a script to clean up your users folder. Otherwise it can easily fill with 3GB of temporary files that Disk Cleanup wont get.
 

augiem

Senior member
Dec 20, 1999
746
0
76
I dont know why you'd want to bother with this. The only things you should bother moving to a large hdd are game installations, and media folders. Anything else should be able to fit onto your typical 32-64GB SSD. Write a script to clean up your users folder. Otherwise it can easily fill with 3GB of temporary files that Disk Cleanup wont get.

Not all users have the same needs. My friend is an industrial designer and photographer. Like me, he also has a ton of gigantic programs and suites installed (Adobe Master Collection, a huge amount of Autodesk software, etc.) I already know how much space his stuff was taking because I set his machine up on the SSD under Windows 7. With NO user data whatsoever on C, and games moved to D, his 120GB SSD had about 30GB free. And you never want to fill an SSD up too much because it needs space to shuffle around the writes to reduce wear on the disk. Plus you want space for future Windows updates. If I'm forced to leave AppData on C, there's going to be another 30-40GB of stuff in there which would be more than the SSD's capacity. Also, the swap file is on D and no hibernate file, so I've trimmed this down pretty well.

My disk is even worse, but luckliy I have 2x 120GB SSD's on Raid 0 making one large 240GB disk.
 
Last edited:

Bubbaleone

Golden Member
Nov 20, 2011
1,803
4
76
@ augiem....This thread interests me because I too have been considering how to move space-hog directories off an SSD without taking a performance hit, and maintaining directory structure. In searching for answers, I found this Wikipedia article that provides a clear explanation of how to use the NTFS symbolic link.
 

augiem

Senior member
Dec 20, 1999
746
0
76
@ augiem....This thread interests me because I too have been considering how to move space-hog directories off an SSD without taking a performance hit, and maintaining directory structure. In searching for answers, I found this Wikipedia article that provides a clear explanation of how to use the NTFS symbolic link.

Thanks for the link. I knew how to use them as I've set up 3 systems before with this method. The only part I didn't know for sure were the differences between directory symlinks and junctions. Dir symlinks sound like they're a little more versatile because you can span network volumes and use relative paths, but other than that, they're no different it seems.

Junctions/Directory Symlinks are awesome. You can just grab your game folders out of Program Files and shove them onto another drive, create a junction, and everything works. You can even create junctions to offload parts of program folders such as the "steamapps" folder in Steam without having to actually move the Steam program folder itself to another drive. That way Steam runs off your SSD, but the games run off your HD. It should even work to create a junction in your C:\Program Files folder BEFORE you install something and just install to that junction pointing to a folder on another drive (in the case of installing a new game on your C drive when you really want it to go to D and not take up all the space on your SSD.)

As geeky as it is, I think they're a lot of fun. They give you a lot more control over the system again and are completely transparent to Windows and programs. That's why I'm bummed Windows 8 broke them.
 

Auric

Diamond Member
Oct 11, 1999
9,596
2
71
FreeFileSync (can copy locked files) and Junction Link Magic may be useful.
 

vennacher

Junior Member
Jan 10, 2013
1
0
66
You may find this useful. After much research, trial and error, and grief I was finally successful at moving my Users folder to a different drive. Not for the faint of heart.

http://vennacher.wordpress.com/2010/03/07/moving-windows-7-users-accounts-to-another-drive/

I wrote this after my first success and only recently tested it with a system rebuild/clean install. Everything is working so I think the instruction set here is pretty sound.

On a machine with multiple user accounts there are more junctions to manage than with a clean install, but this should work on existing installations provided you get all the junctions right.

I am guessing, based on the initial post that either one or more junctions were missed and/or that the ownership and privileges, and attributes were not correctly reset with the move. Ownership, privileges, attributes...this from experience seems the biggest challenge, and makes up most of the work in doing this.

One thing i did find, after i set things up is i needed to change the attributes of the programdata folder. The folder after all this had the SH and I attributes and the windows default is just H and I. I needed to -H (remove the H attribute) and -S (remove the System attribute) and then +H to reset the hidden attribute.

Now i didn't try moving the ProgramData folder but the process should be much the same, and I use a "mountvol" to make an entire drive looks like the Users folder, but don't see a reason why just creating a junction to a Users folder on a separate drive would not work.

If you give it a try would like to see a post confirming success (or cursing at me).
 

PaulAtrides

Junior Member
Dec 3, 2013
1
0
0
I've managd to solve the issue with failed critical updates by temporary modifying keys HKLM\SOTWARE\Microsoft\Windows\CurrentVersion\CommonFilesDir and HKLM\SOTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir. Set there actual path of ProgramFiles. Don't forget to restore initial values after updating Windows. And yes, every critical update of IE would require you to do this action.