Moving users folder on Windows Vista/7 to another partition

45,536

Solution 1

mklink /d myuser d:\moved\myuser

On modern versions of NTFS, junction points which you used on XP are replaced with directory symlinks.

Though, I don't really recommend doing this... you're not likely to see any performance benefit.

Solution 2

The easiest and most reliable method of getting your user profile onto another (i.e., non-system) partition is to have Windows create it there for you. On Vista, I've used the following steps to have my user profile created on D: instead of C:.

  1. Install Vista and make the first user account "Administrator".

  2. Login. Use regedit.exe to modify the ProfilesDirectory registry key to point to the D: partition.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
      ProfilesDirectory = D:\Users
    
  3. Create your normal user account, login, logout.

  4. Login to Administrator and change the ProfilesDirectory registry key back to its original value (%SystemDrive%\Users).

  5. Use the account created at step (3) as your normal user account (for application install and use).

This works much better than manually moving the folders and creating symlinks/junctions.

Solution 3

There is a similar question on serverfault, you should check that out.

But I have had serious second thoughts about this being a good idea.

Solution 4

Well - it's taken Microsoft decades to impliment yet another Unix feature with symbolic links. 'Nix had this in the 70's - wonder how long it will take them to work out that the Users folder also could be placed elsewhere? Standard question during a 'Nix install. I always put the Home directory in it's own partition and judging by the amount of questions about it on the net it's a popular question with Windows too. Symlinks are probably the best, cleanest and easiest way to do this. It means that any apps that have the Users folder hard-coded still work without modifications, and it saves all the messy registry hacking. Best one I've seen -

http://lifehacker.com/5467758/move-the-users-directory-in-windows-7

I like to keep the OS and user data seperate both in a corporate environment and at home. Corporately an AD user profile or GPO can redirect the My Docs folder to a NAS/SAN or other network share. Simple reeasons - backups are handled by the data centre or systems guys and not end users, and the PC isn't THEIR PC anyway - it's the company's (so is the data, btw) - so if it dies give them another PC to log in to and they carry on as they were within minutes.

At home, I want to put it on a seperate disk/partition. If my OS fails I want the user data unaffected - makes restores quicker and you also end up with a less fragmented disk as user data changes all the time.

BTW - I also use mirrored disks - having a 1TB+ drive at home is great but it's an awful lot of data to loose if it goes pop! AND you end up with a lot of data to back up unless you use incremental - which is a pain in the arse to recover! And yes - I do back up both online and sync user data to an external HDD as well.

Solution 5

Since I use Windows, I move my documents folder to another location.

But, I'm tired to do moving manually, and I don't found any method to do that automatically.

That's why I wrote a script to modify Windows.

This script modifies the registry hive of the default user.

After this change, all new users will have their folders at the selected location.

In addition, the junctions are created correctly.

Can you read this post in English (not my post)

http://www.sevenforums.com/tutorials/117308-user-folders-moving-user-folders-modular-script.HTML#post1008268

or read the Original post, in french : see english post

Share:
45,536

Related videos on Youtube

Click Ok
Author by

Click Ok

Amo louvar a Deus, namorar minha esposa, jogar com meu filho, programar no PC (I love to praise my Lord, to date my wife, to play with my son and to code on PC)

Updated on September 17, 2022

Comments

  • Click Ok
    Click Ok almost 2 years

    When I format the computer and reinstall Windows, my first step is move the My Documents folder to another partition. In Windows XP it wasn't enough because the desktop folder and another user folders was in the primary partition.

    Now in Windows Vista and 7 we can use junctions/symlinks to "move" the folder to another partition and Windows and another programs will think that the data is in the primary partition.

    What the fastest and secure steps to move the Users folder to another partition and to create the hardlinks correctly?

    • jota3
      jota3 almost 13 years
      Why (TF) do MS insist on redefining important core concepts in their own special way? Since when do hardlinks work across seperate devices? well since MS decided that's what they'd call it of course!
    • surfasb
      surfasb over 12 years
      @barrymac: Hardlinks have never worked across devices. The OP is wrong.
    • David
      David over 9 years
      @surfasb NTFS "junctions" can and do work across partition / volume / filesystem boundaries. I don't remember whether it was Windows 2000 or XP, but I was able to mount a separate volume inside an empty folder on the C: volume, at which point the OS would convert the empty directory to a "junction". I understand that this is not how hard links work on UNIX/Linux, so calling a junction a "hard link" is confusing -- that was barrymac's point.
    • JackTheKnife
      JackTheKnife over 9 years
      Here is better answer: serverfault.com/questions/8187/…
  • Benjol
    Benjol almost 15 years
    You miss the step where you copy the users folder... And nobody said anything about performance benefit. The aim is to be able to differentiate backups and restores of system vs. user files, I believe.
  • James McMahon
    James McMahon over 14 years
    This is the most in-depth answer I've found, serverfault.com/questions/8187/…
  • Benjol
    Benjol over 14 years
    @James, yes, I know, I commented on it...
  • Lars D
    Lars D over 14 years
    This solution has one problem: If the separate drive disappears, for instance, if it's truecrypt encrypted and you forget to mount it, then Windows 7 will create a temporary profile, which takes significant time, and log you on anyway. In order to use this method for TrueCrypt, you need to create another profile on the C: drive, to mount it, and remember so unset the option that unmounts when you log off that other profile.
  • Admin
    Admin over 14 years
    "This works much better than manually moving the folders and creating symlinks/junctions." What? Using NTFS junctions is a fast and clean method for accomplishing this. How could using a second-level OS functionality possibly be better than using NTFS junctions?
  • IsmailS
    IsmailS over 13 years
    I'm installing a fresh windows 7. Can you please give me the exact steps for this?
  • Sasha Chedygov
    Sasha Chedygov over 13 years
    I'm curious, how does it work better than manually creating junctions?
  • Alex R
    Alex R over 13 years
    Was there any particular reason for using /D as opposed to /J?
  • davefiddes
    davefiddes over 11 years
    This should be /J to create a junction point (windows directory hard link). If you fail to do this I have discovered you get funny errors with Adobe Acrobat Reader reporting internal errors as it starts on a symlinked profile.
  • Cristian Ciupitu
    Cristian Ciupitu over 7 years
    @SashaChedygov, I think he's just referring to the fact that you don't have to recreate the junctions (e.g. Local Settings) by other means, especially by hand. Everything's done automatically by Windows when the profile is created.
  • ivan_pozdeev
    ivan_pozdeev almost 6 years
    This misses the critical step of moving the folder itself -- it's completely nontrivial since it's always in use and has symlinks. serverfault.com/questions/8187/… covers that step as well as explains the consequences.