Develop Paper
  • Program
  • Server
  • Development Tool
  • Blockchain
  • Database
  • Artificial Intelligence
  • Blogs
Position: Home > Blogs > OS > Windows > Content

Migrate and configure the default directory location of user account userprofile in Windows 7

Time:2021-2-20

 

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\ProfileList
If 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 fileCorrect 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.

 

Tags: Account number, Catalog, Machine code, system administrator, user

Recommended Today

Cloud Native Virtualization: Building Edge Computing Instances with Kubevirt

With the popularity of Kubernetes, more and more businesses are running on containers, but there are still some business forms that are more suitable for running on virtual machines. How to control virtual machines and containers at the same time has gradually become a mainstream demand in the cloud-native era. Kubevirt gave came up with […]

  • What does the vidctrl.exe process mean?
  • Where are the updated drivers for Windows 11 computers? Tips for updating drivers for Windows 11
  • What process is videodrv.exe
  • How to install cad2021 in win11? Detailed graphic tutorial of windows11 installation CAD
  • What process is view.exe
  • Win11 released kb5007215 security patch and announced that the preview version was updated in December due to the holiday
  • Security personnel found that the infection of the new extortion virus increased sharply, mainly through the advertising space of pornographic websites
  • What does the viewport.exe process mean
  • What process is virtualbouncer.exe
  • How to activate win11 Enterprise Edition? Win11 enterprise activation key sharing with activation tool
Pre: Python crawls the barrage of houlang and displays the data in a word cloud.
Next: Interface testing tool eolinker makes post request

    Tags

    address algorithm array assembly attribute Browser c Character string Client code command configuration file container data Database Definition Edition element Example file function java javascript Journal link linux Memory method Model Modular mysql node object page parameter php Plug-in unit project python Route source code The server Thread time user

    Recent Posts

    • Cloud Native Virtualization: Building Edge Computing Instances with Kubevirt
    • Start the vue project with idea
    • R language uses multivariate ARMA, GARCH, EWMA, ETS, stochastic volatility SV model to model financial time series data
    • Map
    • XML grammar rules

    Recent Comments

    • waker on Answer for Word segmentation search solution
    • Shangguan Yuanheng on [Data Structure] What kind of tree is this called?
    • aristotll on Answer for Does the &- syntax in Less have a similar implementation in Sass?
    • Pines_Cheng on Answer for Does the &- syntax in Less have a similar implementation in Sass?
    • sole on Answer for Setting width of table to td in tr in second row doesn't work?

    Categories

    • .NET Core
    • Agile Development
    • Algorithm And Data Structure
    • Android
    • Apple MAC
    • Architecture Design
    • Artificial Intelligence
    • ASP.NET
    • Backend
    • Blockchain
    • C
    • C#
    • C++
    • Cloud
    • Database
    • Design Pattern
    • Development Tool
    • Embedded
    • Erlang
    • Freshman
    • Game
    • Golang
    • HTML/CSS
    • HTML5
    • Informal Essay
    • Information Security
    • IOS
    • Java
    • JavaScript
    • JSP
    • Linux
    • Lua
    • MongoDB
    • MsSql
    • MySql
    • Network Security
    • OOP
    • oracle
    • Other DB
    • Other Technologies
    • Other Technology
    • Perl
    • PHP
    • Program
    • Python
    • Redis
    • Regular Expression
    • Ruby
    • Rust
    • SAP
    • Server
    • Software Testing
    • Team Management
    • VBS
    • VUE
    • WEB Front End
    • Windows
    • XML/XSLT
  • java
  • php
  • python
  • linux
  • windows
  • android
  • ios
  • mysql
  • html
  • .net
  • github
  • node.js

Copyright © 2021 Develop Paper All Rights Reserved      Sitemap    About DevelopPaper    Privacy Policy    Contact Us