Can I use a Symbolic Link to 'move' C:\Users to another drive?

10,730

"Users" I know works. The other two directories have been known to cause trouble when moved. Your best option is to always install new software to your secondary drive. You can, however, create individual Junction points (see below) for each folder inside your program files folders.

For directories for use by Windows, you need to use NTFS junction points. This means that windows treats the junction point (shortcut) as the actual directory to which it refers, meaning your data will be somewhere else, but your programs won't see any difference. The command for creating them is:

mklink -j path/to/new/link /path/to/linked/folder

This requires that the original folder be moved or renamed before the link is created.

You'll also want to do this through the Administrator account so that no files are in use while you're moving files around.

Another method (and what I did with my SSD setup) Is to change where windows puts the Users folder. You can do this by changing the registry value HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ProfilesDirectory to the path to your new users folder. After doing this, I renamed my user profile folder to Jonah_, restarted the computer, logged into the Administrator account and deleted my user account. I then Created an account with exactly the same credentials and logged into it. After Logging in once I went back into the Administrator account, Deleted the new Jonah folder in the Users directory and renamed Jonah_ back to Jonah. A restart for luck and I could log in to my old account and all my settings and files were there.

As for the missing cmd problem, a system repair disc seems like a valid option.

Share:
10,730

Related videos on Youtube

AStopher
Author by

AStopher

A network engineer went to the doctor. He told the doctor: "It hurts when IP!"

Updated on September 18, 2022

Comments

  • AStopher
    AStopher almost 2 years

    I have an OCZ Agility 3 64GB SSD, and have just downgraded to Windows 7 Professional from Windows 8.1 since I found Windows 8.1 to be too slow when my SSD was filled up.

    After seeing that this is an SSD 'problem', I coplied the C:\Users, C:\Program Files, and C:\Program Files(x86) folders to another internal drive (that I formatted just before I did this), and created a symbolic link, linking the original file locations to the new locations on D:\ via cmd on the Windows installation disc:

    enter image description here

    I restarted my system and proceeded to log on, and Windows logged me on with a temporary profile, essentially meaning that the symbolic link isn't working properly.

    I checked by opening the symbolic link for C:\Program Files, and the appropiate folder on D:\ opened just fine:

    enter image description here

    I did some more testing, and it seems like Windows isn't getting the proper permissions it needs to open the symbolic link. I attempted to change this, and had a 'file not found' error:

    enter image description here

    I found this question, but turns out that cmd no longer works either, which is strange since I never touched C:\Windows, meaning that I can't test the hardlink solution:

    enter image description here

    My question is, is it actually possible to use mklink on C:\Users and C:\Program Files (and the x86 version) to point them to new locations on another drive? If not, how can I have C:\Users, C:\Program Files, and C:\Program Files(x86) on another drive without Windows freaking out?

    Edit The C:\Windows\System32\cmd.exe is here! What's going on?? enter image description here

    • Jonah
      Jonah almost 10 years
      Are you using NTFS junction points? (mklink -j)
    • AStopher
      AStopher almost 10 years
      @Jonah Ah, no. I was using /d. I suppose this matters? :-)
    • Vamsi
      Vamsi almost 10 years
      The recommended way to copy the Users folder is to boot from the repair drive and use xcopy from its command prompt. This will preserve all the permissions and the SIDs as well. You can try creating a new user and check where the profile is being created though.
    • AStopher
      AStopher almost 10 years
      @Vamsi That's exactly what I did.
  • AStopher
    AStopher almost 10 years
    Referring to your note about 'installing software to secondary drive': some installation programs don't let you do this, Google Chrome is a pretty good example (cache files get large pretty quickly), and also the Adobe Suite which always installs the programs to C:\Program Files regardless if you choose to install to another drive or not.
  • Vamsi
    Vamsi almost 10 years
    Just a headsup that some windows updates including Windows 8.1 from 8 will fail if Users is on a different partition. No real workaround apart from moving the directory back to C:\.
  • AStopher
    AStopher almost 10 years
    And about the missing cmd.exe problem: the mklink definately made this happen, since the symbolic link is the first thing I did after installing Windows.
  • Jonah
    Jonah almost 10 years
    Thanks. I have the same setup (small SSD) as the OP, and my (messy) method is to just junction point any directories that are getting too big.
  • AStopher
    AStopher almost 10 years
    Please see the edit, the cmd.exe is there, maybe it's because I'm running on a temporary account..
  • Jonah
    Jonah almost 10 years
    I've added what I did to my answer. Enabling the admin account uses the command net users administrator active:yes, which I'm pretty sure you can do from Run (Win+R) if cmd is still not working.
  • Jonah
    Jonah almost 10 years
    If you've only just installed, then a reinstall sounds like an easy option to fix this. After that I'd do the registry method. It works well and once it's done you can add a junction point in C:\ to point to Users for any programs that point blank refuse to use USERDIR
  • AStopher
    AStopher almost 10 years
    Ended up doing the regedit method that you suggested- works like a charm (thanks for that!). It would be heaven if Microsoft recognized multi-drive setups.
  • AStopher
    AStopher over 6 years
    This answer doesn't add anything to the existing one and is more tiresome than the accepted answer.