Reprinted from:
http://moonwulk.blogspot.com/2010/06/windows-7-userprofile.html
After measuring a variety of different methods, the synthesis of one is feasible and quite satisfactory (at least there is no dead or defect), the process is fast and smooth, as long as attention is paid to the problem of authority, and some small manual modifications are added.
Understand the local account directory of Windows 7 system. The location structure of userprofile is as follows:
-
The default directory of the account is C:: users\
-
The directory of shared accounts is “C: \” users \ “public\
-
The default configuration account directory (hidden) is ﹣ C: ﹣ users ﹣ default\
-
The directory of personal user account is C: \% users \% user name%\
There are many misjudgments or defects in many methods spread on the Internet
-
Of course, Microsoft’s easy transfer can’t easily transfer the user account directory to other hard disks in the system’s “C: \” users \ “directory, and there’s no need to think about it
-
After migrating the user account directory, use the mklink command to use the connection mode of junction point (NTFS). This method has serious adverse consequences (the reason is unknown, it may be the permission problem of junction). When using some personal configuration functions of windows after login (such as desktop background, etc.), the whole GUI interface will be dead or very slow, Some software (e.g. outlook) will be out of state after setting
-
It’s too manual to change the location of each user account directory in the file explorer interface, and the “appdata” account configuration data (and temporary files) in the user account subdirectory still use the C: system disk. This method is just a temporary and simple solution for personal environment without (or can’t use) system administrator‘s permission
-
Change the system key to HKEY_ LOCAL_ The default, public and profile directory of machine, software, Microsoft, Windows NT, current version and profile list are all modified to other hard disk locations. This method is feasible, and it is also a complete modification for this machine. However, the system administrator account of C: already exists, you still need to manually migrate and modify the system key
To migrate personal user account directory to other hard disk drive, you must make a full backup of the system in any case!!
The measured application installs the prepared hard disk (and partition), as shown in Figure e: hard disk
The implementation steps are as follows:
1. Log in to the system administrator account
2. Modify the system key, point the new user account directory to e: hard disk, and execute regedit as the system administrator:
Looking for key “HKEY”_ LOCAL_ MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileListIf you need to migrate all user account directories (including default configuration, shared and new accounts) to e: hard disk, modify the three default keys as follows:
Default default: the default is changed from% SystemDrive% \\\\\\\\\\\\\\
The profile directory default is changed from% SystemDrive% \ users% to% e:\
The default of public is changed from% SystemDrive% \ \ users \ \ public to% e \ \ public
If you only need to add a new account to migrate to the E: hard disk, you only need to modify the default key of “one” as follows:
The profile directory default is changed from% SystemDrive% \ users% to% e:\
The implementation steps are as follows:
1. Log in to the system administrator account
2. Execute command prompt as system administrator
3. Copy the user account directory (e.g. doggie account) to the hard disk of the specified location (E:), and execute in the command prompt character:
robocopy c:\Users\ e:\ /e /copyall /xj /xf c:\Users\ desktop.ini /XD “default” “public” “% other user account%”
The above replication methods exclude exclude (/ XD)% other user account directory% and default and public account directory that are not migrated
The advantage is that as like as two peas, the /xj directory does not bother to manually modify directory read and write permissions, which is exactly the same as the original account directory permissions. Instead, the junction does not copy the point link (otherwise the loop is unlimited, and it is necessary to manually build 16 junction in the account directory).
4. Create another 16 junctions (directory architecture compatible with old software) in the “migrated” E: hard disk user account directory
Check the old junction directory as follows (e.g. doggie Account No.):
dir c:\Users\Doggie /al /s
Manually create another 16 junctions to the E: hard disk (e.g. doggie account), and execute the command prompt as the system administrator
Execute within the command prompt character:
e:
cd Doggie
mklink /j “Application Data” “AppData\Roaming”
mklink /j “Cookies “AppData\Roaming\Microsoft\Windows\Cookies”
mklink /j “Local Settings” “AppData\Local”
mklink /j “My Documents” “Documents”
mklink /j “NetHood” “AppData\Roaming\Microsoft\Windows\Network Shortcuts”
mklink /j “PrintHood” “AppData\Roaming\Microsoft\Windows\Printer Shortcuts”
mklink /j “Recent” “AppData\Roaming\Microsoft\Windows\Recent”
mklink /j “SendTo” “AppData\Roaming\Microsoft\Windows\SendTo”
mklink /j “Start Menu” “AppData\Roaming\Microsoft\Windows\Start Menu”
mklink /j “Templates” “AppData\Roaming\Microsoft\Windows\Templates”
mklink /j “AppData\Local\Application Data” “AppData\Local”
mklink /j “AppData\Local\History” “AppData\Local\Microsoft\Windows\History”
mklink /j “AppData\Local\Temporary Internet Files” “AppData\Local\Microsoft\Windows\Temporary Internet Files”
mklink /j “Documents\My Music” “Music”
mklink /j “Documents\My Pictures” “Pictures”
mklink /j “Documents\My Videos” “Videos”
5. Modify the system key, point the user account directory to e: hard disk, and execute regedit as the system administrator:
Deployer code “HKEY”_ LOCAL_ MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
Find a long code containing the user account name, and change the “profileimagepath” code from “C: \% users \% user account name% to” E: \% user account name% (as shown in the figure)Real time effective after modification
remarks:
1. If the account directory to be migrated is the system administrator in use, you must create and log in to use another temporary system administrator account. Otherwise, some files in use cannot be completely copied because the system is in use.
2. If the account directory is copied and pasted in “xcopy” or file explorer as the system administrator, the permission of the account directory will be wrong, resulting in some function errors of the user and the lack of secret reading and writing permission
For example, all default icons are missing (as shown in the figure)Wrong account directory permission (as shown in the figure), any user can erase the file
Correct account directory permissions
Finally, I suggest that:
If you want to migrate the user account directory (including all its file data), don’t delete the old account directory immediately after migration. According to different situations, keep the old directory data for a period of time. In case of emergency, it can also be used to save the state.
corrections:
Mklink – J? Is corrected to mklink / J? Instruction.