Are there any limitations with directory juncions in terms of what folders can be linked?

I'm interested in system folders (Program Files, Program Files (x86), ProgramData and Users (and Recovery, if it's a system folder).

Can they be linked?

Also, if they can, would it cause any trouble?

I would be so happy if all my (default Windows) folders (except for Windows folder) would be located on a "not C:\" disk..


Its a hard question to answer.

Technically, you can link any local folder without problems, and even networked folders using /h, and you will be able to navigate through them.

But the problem is, that some prorams will not work correctly anymore once certain system folders have been linked to.

Program Files, ProgramData are 2 that I know will not always work.

Also \Windows\Winsxs folder will definitely break your windows update if moved.

Program Files can also break your windows update. But on windows 7 it seems to be possible to move it, and on windows 8 it breaks stuff.

Also, the kind of link is important. You have hardlinks, symlinks and junctions. Each behaves differently, and one may not work while the other does.

  • I was considering junctions. – Karlovsky120 Dec 22 '14 at 21:42

Yes. Certain locations cannot be junctions or symlinks because they're accessed before the disk manager is loaded, therfore the junction targets cannot be resolved yet. Raymond Chen writes in The File System Paradox:

[...] in order to read the boot files off the disk, you need the file system driver, but the file system driver is on the disk, which you can't read until you've loaded the file system driver. Oh no, Catch-22!

The vicious cycle is broken by having a miniature file system driver built into the critical boot files. This miniature driver knows just barely enough to locate files in the root directory and load them into memory. [...]

[...] the miniature file system driver doesn't understand mount points, because mount points mean talking to the disk management service, and at the time the system is booting, the computer hasn't even loaded the operating system yet, much less some fancy advanced service that knows how to map drive letters back to ARC paths, and even if you somehow got that service running, you still have to find the device drivers for those other hard drives and load the corresponding file system drivers.

So you could probably get away with making ProgramData a junction, since it's only needed for programs, long after the OS has booted. (That said, services like HyperV also put their data there, so be careful.) Users (aka Documents and Settings) has been moved like this several times.

However, anything that is needed to boot the OS itself, like the \WINDOWS directory, must not be a junction or symlink.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.