Problem after moving users folder on Windows 7

Solution 1:

The problem seems to be with the different drive letter mappings in repair mode compared normal mode. What I did and worked for me is to run DISKPART (good reference here: http://ss64.com/nt/diskpart.html) remap the partition/devices and then make the junction with the drive letters which windows will normally use.

Solution 2:

See in this thread the comment made by ohdannyboy on December 4th, 2009 2:33 pm, and the following comment by imadman.

They detail how to relocate the Users folder in a way that supposedly works.

From wikipedia Robocopy :

The Windows Volume Shadow Copy service is the only Windows subsystem that can copy open files, which it does by snapshotting them for point-in-time consistency. Robocopy does not implement accessing the Volume Shadow Copy service in any way, inhibiting its usefulness as a backup utility for volumes that may be in use. However, one can use separate utilities such as VSHADOW or DISKSHADOW (included with Windows Server 2008) to create a shadow copy of a given volume with which to back up using Robocopy.

If uncopied in-use files are the cause of the problem, it is still unclear how you could have deleted e:\users, but many miracles are possible in Windows.

However, the article Backup/Copy Files that are "In Use" or "Locked" in Windows advocates using HoboCopy instead of robocopy.

As another remark, I cannot understand how you claim to have mapped the system drive to another letter than C:. As far as I know, this is absolutely impossible.

Solution 3:

I ran into this previously. You have to make sure you use the remapped volume letter for the SOURCE parameter on the mklink command and your actual Windows-recognized volume letter for the DESTINATION parameter. Windows does NOT remap symlinks when you change the volume letters of what they point to. They're dumb like that.

E.G. According to your configuration, the following command should suffice:

mklink /J E:\Users E:\Users

Also, NOTE: if you remap your users directory elsewhere as a subdirectory (E.G. E:\Storage\Users as I once did) be careful that robocopy does not skip over any files, ASIDE from any failing. My experience with this tells me that Windows will not copy critical Users files that only work with the default directory scheme (E.G. [DRIVE]:\Users). I found out that putting the Users directory into a subdirectory would cause critical files to pass their filename length quota, and it would thus skip over them.

Solution 4:

The problem is that the \xj option on the robocopy EXCLUDES JUNCTION POINTS, creating the issue (missing junction points) later clarified by Simon. Unfortunately, if you leave this option out, the process chokes on the junction points. This is a serious catch 22 with the proposed approach.

If you didn't create a recovery point and are desperate, I reinstalled and identified the following juctions that need recreated (replacing ? with your profile). I did not actually restore a system this way so I cannot guarantee that this is exhaustive, but I believe it to be so.

As you can verify for yourself, the junctions continue to point at "C:" even after the drive letter has changed (during Windows Repair Command Prompt). I believe, therefore, that the new junctions should be pointed at their "usual" locations (standard drive letters) despite the fact that the instructions above show different drive letters (on the Repair Command Prompt).

  • Users\Default User <==> Users\Default
  • Users\?\My Documents <==> Users\?\Documents
  • Users\?\Local Settings <==> Users\?\AppData\Local
  • Users\?\Application Data <==> Users\?\AppData\Roaming
  • Users\?\Cookies <==> Users\?\AppData\Roaming\Microsoft\Windows\Cookies
  • Users\?\NetHood <==> Users\?\AppData\Roaming\Microsoft\Windows\Network Shortcuts
  • Users\?\PrintHood <==> Users\?\AppData\Roaming\Microsoft\Windows\Printer Shortcuts
  • Users\?\Recent <==> Users\?\AppData\Roaming\Microsoft\Windows\Recent
  • Users\?\SendTo <==> Users\?\AppData\Roaming\Microsoft\Windows\SendTo
  • Users\?\Start Menu <==> Users\?\AppData\Roaming\Microsoft\Windows\Start Menu
  • Users\?\Templates <==> Users\?\AppData\Roaming\Microsoft\Windows\Templates
  • Users\?\Documents\My Music <==> Users\?\Music
  • Users\?\Documents\My Pictures <==> Users\?\Pictures
  • Users\?\Documents\My Videos <==> Users\?\Videos
  • Users\?\AppData\Local\Application Data <==> Users\?\AppData\Local
  • Users\?\AppData\Local\History <==> Users\?\AppData\Local\Microsoft\Windows\History
  • Users\?\AppData\Local\Temporary Internet Files <==> Users\?\AppData\Local\Microsoft\Windows\Temporary Internet Files

You may also need to add a SYMLINKD using "mklink /d ". Note the substitution of the /D option for the /J option:

  • Users\Application Data\ <==> C:\ProgramData (unless you have also moved this directory)

Naturally, additional links may have been created by other programs, but this should fix the major items broken by the inadequate instructions.