To recreate the junction points so that they point to the correct target, follow these steps:
1. Install the User Profile directory on another volume, and then delete the incorrect junction point(s).
2. Use MKLink to recreate the junction points using the following command line:
MKLink /J <link name> <target path>
For example, to recreate the junction point
Documents and Settings in a new target volume where the Users directory is F, the command line would then be:
MKLink /J
<drive letter>:\documents and settings f:\users
So the following could be used:
mklink /j "c:\Documents and Settings" D:\Users
mklink /j %ProgramData%\Desktop d:\Users\Public\Desktop
mklink /j %ProgramData%\Documents d:\Users\Public\Documents
mklink /j %ProgramData%\Favorites d:\Users\Public\Favorites
3. Recreate the permissions for the new junction point.
a. For the junction points
Desktop,
Default User,
Documents and Settings,
Favorites, and
Documents, use the ICACLS tool. For more information about the ICACLS tool, see
http://technet.microsoft.com/en-us/library/cc753525.aspx .
Note The following commands must be done in the order shown as it affects the resulting permissions on the junction point.
icacls "c:\Documents and Settings" /grant:r System:(F) /inheritance:r
icacls "c:\Documents and Settings" /grant *S-1-5-32-544:(F)
icacls "c:\Documents and Settings" /grant *S-1-1-0:(RX)
icacls "c:\Documents and Settings" /deny *S-1-1-0:(S,RD)
icacls "%ProgramData%\Desktop" /grant:r System:(F) /inheritance:r
icacls "%ProgramData%\Desktop" /grant *S-1-5-32-544:(F)
icacls "%ProgramData%\Desktop" /grant *S-1-1-0:(RX)
icacls "%ProgramData%\Desktop" /deny *S-1-1-0:(S,RD)
icacls "%ProgramData%\Documents" /grant:r System:(F) /inheritance:r
icacls "%ProgramData%\Documents" /grant *S-1-5-32-544:(F)
icacls "%ProgramData%\Documents" /grant *S-1-1-0:(RX)
icacls "%ProgramData%\Documents" /deny *S-1-1-0:(S,RD)
icacls "%ProgramData%\Favorites" /grant:r System:(F) /inheritance:r
icacls "%ProgramData%\Favorites" /grant *S-1-5-32-544:(F)
icacls "%ProgramData%\Favorites" /grant *S-1-1-0:(RX)
icacls "%ProgramData%\Favorites" /deny *S-1-1-0:(S,RD)
b. For the junction point
All Users, use ICACLS with the following command lines.
Note The following commands must be done in the order shown as it affects the resulting permissions on the junction point.
icacls "<drive letter>:\users\all users" /grant:r System:(CI)(OI)(F) /inheritance:r
icacls "<drive letter>:\users\all users" /grant Administrators:(OI)(CI)(F)
icacls "<drive letter>:\users\all users" /grant "Creator owner":(OI)(CI)(IO)(GA)
icacls "<drive letter>:\users\all users" /grant Users:(OI)(CI)(RX)
icacls "<drive letter>:\users\all users" /grant Users:(CI)(WD,AD,WEA,WA)