Contacts

Transferring users to another drive. Transferring user folders. How to move standard user folders in Windows to another drive

Transferring user profile folders from system disk to another disk is needed to free up a relatively small system disk (for example, an SSD).
The operation is unsafe and controversial - anyone who doesn’t know how and why should not do it.

Additional will be required. xxcopy utility. Required Pro version. Although it is paid, its official trial period of 60 days is quite sufficient for our task.
So:

  1. Install xxcopy.
  2. Creating a new one temporary user with a name, for example, “TU”, which will be used to perform the data transfer operation and give it administrator rights.
  3. We reboot (to remove locks on used files) and log in under the new user (“TU”).
  4. We launch the command Windows string in administrator mode. To copy a folder from drive C: to drive D:, run the command:
    xxcopy c:\Users d:\Users /E /H /K /SC /oE1
    If your drive letters are different, substitute yours. As a result, the folder will be copied properly. You don’t have to pay much attention to errors, if there are any.
  5. Next we run the command regedit.In it we find the registry branch HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList.In this branch we change the values ​​of the keys:
    • Default to "D:\Users\Default"
    • ProfilesDirectory to "D:\Users"
    • Public to "D:\Users\Public"
  6. In the same branch there are branches with the parameters of the profiles of users already registered in the system (the branches with long names are what they are) - for each user you need to change the value of the key " ProfileImagePath» to a directory on the portable disk.
  7. The temporary user is no longer needed - everything that was required of him has been completed. At the same time, nothing irreversible has been done so far - all the data was actually copied and not transferred. Therefore, in the case of “something went wrong...” you can always return to the status quo. Now we reboot again and log in under a real administrator account.
  8. We make sure that the login occurs correctly and the system boots without any questions. Now you can proceed to further steps.
  9. Launch the Windows command line again in administrator mode and run the commands:
    • rd "C:\Documents and Settings"- removing the symbolic link to the old Users folder
    • rd "C:\Users" /S- deleting the oldest Users folder
    • mklink /D "C:\Documents and Settings" "D:\Users"
    • mklink /D "C:\Users" "D:\Users"

Now on your system the user profile folder Users is located at the desired disk and, in addition, there are symbolic links to new folder, which protect the system from incorrect access to the old address.

For some reason, Microsoft has abandoned the ability to transfer profiles for client versions of its operating systems, starting with Windows Vista. I don’t know what this is connected with, but when you go to the “User Profiles” menu, you will see that the profile copy button is disabled.

But like many other restrictions imposed by Microsoft, this too can be circumvented, do everything according to the instructions and you will succeed ;)

This article is suitable for Windows Vista, Windows 7, Windows 8, Windows 8.1. So, in order:

1) Log in under your administrator account.

2) Create a new folder to store your accounts; in my case it will look like this:

3) Next, you need to create a new user with administrator rights. To do this, go to “Control Panel” → “User Accounts” → “Adding and Removing User Accounts” → “Creating account" Enter any name, select “Administrator” and click “Create an account”:

4. Reboot the computer and log in as our new user:

5. Copy the folder with the profile of our main account. To do this, go to the path: C:\Users and copy the folder with the required user name to our new folder.

6. Next, go to the properties of both folders and go to the “Security” tab. Here we need to create in the folder on drive D all the same user groups as in the folder on drive C, and also give them the same access rights.

As you can see, you need to delete the “Authenticated” and “Users” groups, you also need to add the site user and the “HomeUsers” group.

In order to add or remove a user or group, you must click the “Edit” button. In the window that opens, select a user or group and click the “Delete” button or simply click the “Add” button to add a new group.

A window for selecting users and groups will open:

Click the “Advanced” button and in the new window on the right, the “Search” button:

Select the desired group and click OK until only the “Group Permissions” window remains.

As a result, you should get a full copy of the rights of the child folder:

If everything matches, press the OK button to apply the change and move on to the next step.

7. When trying to remove/add a user, the system may show the following window:

We need to get around this, so we need to disable inheritance of rights for this folder. To do this, in the folder properties in the “Security” section, click the “Advanced” button:

In this window, click the “Change permissions” button and uncheck the “Add permissions inherited from parent objects” checkbox:

Click OK and answer the question Windows security We answer “Delete” (although you can also “Add” - this will simply save the current groups and users, but will also allow you to change them):

Also click the OK button in the window additional parameters security.

8. Open the registry. To do this, press the key combination Win + R and in the “Run” window that opens, write regedit and click OK. (You can also search the Start menu in Windows 7 or Vista by typing regedit)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

And we see several groups of records in this section:

We are interested in groups of the format S-1-5-21-xxxxxxxxxx-xxx... select them one by one and look at the value of the ProfileImagePath parameter. The path should lead to the folder for the profile that we need to transfer. In my case it's this one:

Next we need to change the ProfileImagePath value to the path to the new folder. To do this, right-click on the parameter and select “Change”. I write my way, and this is what I got:

10. To be on the safe side, let’s create a symbolic link to the old location; this will solve many problems, especially if some program decides to ignore the new location. To do this, delete the old user folder and open the command line and write the following there:

mklink /J “C:\Users\*user*” “D:\Users\*user*”

Where instead *user* you need to write the name of your folder. For example, " C:\Users\Vladimir"

All that remains is to restart the system and log in with your main account.

That's all. I hope you found this article useful, click one of the buttons below to tell your friends about it. Also subscribe to site updates by entering your e-mail in the field on the right or subscribing to the group on VKontakte.

Good day, one of the first articles I wrote on this site was an article about p. The instructions were written for those who already have an operating system installed, although it is advisable to do this on a freshly installed system, it was still possible to transfer the profile even on a system that had been used for quite a long time. Today we’ll look at another, not very bad solution - transferring the profile at the installation stage operating system. All you need to do is install the system as usual, but stop at the user creation screen and then follow the instructions:

1) Press the key combination Shift+F10, a command prompt window will open.

Robocopy "C:\Users" "D:\Users" /E /COPYALL /XJ

Upon successful completion, the console will indicate the end date and time.

3) Delete the old folder and create a symbolic link to link the new folder to the old location (just in case;). To do this, enter two commands one by one:

Rmdir "C:\Users" /S /Q mklink /J "C:\Users" "D:\Users"

The first command is used to delete folders, the second is for .

4) Now enter the command regedit, in order to get into the registry editor.


5) In the window that opens, go to the branch:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\ProfileList

And change the parameter ProfilesDirectory to the path to our profiles folder. I change it to a folder D:\Users.

Close the Registry Editor window.

6) Now let’s restart the computer, to do this in command line write the following command:

Shutdown -r -f -t 00

7) After restarting, create a profile, all profile folders will be saved in the location you specified.

Update : Site visitor BoontOff in the comments he suggested a good option. To avoid writing all the commands manually, you can use the file .bat. To do this, create a file users.bat and put it in the root of some drive (but not C, of ​​course). Open it with notepad and copy the following into it:

Robocopy "C:\Users" "d:\Users" /E /COPYALL /XJ rmdir "C:\Users" /S /Q mklink /J "c:\Users" "d:\Users" REG ADD "HKLM\ SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" /f /v "ProfilesDirectory" /t REG_EXPAND_SZ /d "d:\Users" Shutdown -r -f -t 00

If necessary, change the path “D:\Users” to your own. And now, when executing the instructions, immediately after the first point, just enter the following on the command line:

D:\users.bat

The script will run the sequence of actions specified in this article. It will create and copy the users folder, delete the old folder and create a symbolic link in its place, and also make a change to the registry, then the computer will restart and you can continue installing the system. If you reinstall the system quite often, you can also add a line at the beginning of the file containing the following (adjusted for your path):

Move /Y "d:\Users" "d:\Users_OLD"

After this, the old Users folder will be renamed to Users_OLD.

Thank you for this.bat BoontOff. Ready-made files can be downloaded: and .

That's all. I hope you found this article useful, click one of the buttons below to tell your friends about it. Also subscribe to site updates by entering your e-mail in the field on the right.

When creating a new user in Windows, the system allocates special folders for him to save various data: documents, images, music, videos, etc.; creating folders of the same name for this. By default, they are all stored in the user's folder on the disk with installed system, most often this is drive C. Most users store all their files in these standard folders.

But different situations happen, and at some point the operating system may crash and stop loading; the only way out is to completely reinstall Windows. Accordingly, all user files that were stored in the Downloads, Documents, Music, Videos, Images folders will be deleted without a trace. To prevent this and in the future not to think that your photos, documents and music collection may be lost, you need to move standard folders user to another drive.

How to move standard user folders in Windows to another drive

You can move folders either to another partition of the disk, if it has several partitions, or to another physical disk: internal or USB. For example, when Windows is installed on an SSD drive, and a regular HDD is used for data.

Step 1 Go to the user folder, it is located at:

C:\Users\Username

Step 2 Select the folder you want to transfer, right-click on it and context menu select Properties


Step 3 In the window that appears, go to the Location tab. Click the Move button and specify the path where you want to move this folder. You can move either to an existing folder or create a new one

Step 4 Click the Apply button for the changes to take effect

Step 5 In the dialog box that appears, confirm the move by clicking Yes


Perform similar operations for other user directories.

Now your folders will no longer be stored on the system drive, and after the next restart Windows installations all data will be intact. You will only need to re-specify the path to the data folders on another drive.

But I think it’s very useful, so I’m posting it corrected and expanded copy.

The task of moving the user profile folder from the system drive to another logical or physical drive in the OS Windows family is very important for a number of reasons:

  • The need to separate operational information (system) and archival data (user data) due, for example, to the need for storage system files on a high-speed but less reliable RAID0 disk array.
  • There is no need for additional information transfer when reinstalling the OS.
  • Compared to transferring an individual user profile, transferring the Users folder is more preferable, since the profiles of all subsequent users of the computer will also be saved in the right place, and there will be no need to go through the transfer procedure again.
One of the most elegant and efficient methods for carrying out such a transfer is the ability to determine the location of the user profiles folder during the system installation stage. Microsoft provides us with this opportunity for Windows 7 under the name Audit Mode. You can read more about this mode in the next article.

Now about the actual scenario for transferring the Users folder:

  1. You should perform a normal installation of Windows 7 in any way convenient for you, stopping at the step where the installer program will ask you to enter the computer name and user name.
  2. At the screen for entering your computer name and username, press CTRL + SHIFT + F3. The computer will restart and boot into Audit Mode. In this case, the system will be in this mode until you run the sysprep utility with the /oobe switch or select the appropriate item in the windowed version of this utility, which starts in Audit Mode every time the system starts.

  3. Since at this point you will already have Windows 7 installed, but not fully configured, before assigning a new location for the user profiles folder, you must first prepare the disk subsystem, that is, create and format the partition that you plan to use to house the Users folder .
  4. Now you need to create a configuration file to configure the location of the Users folder, here are its contents:

    x86 version (download):
    D:\Users D:\ProgramData
    Version for x64 (download):
    D:\Users D:\ProgramData
    Save it under any name, for example unattend.xml.

    Attention! The file must be saved in UTF-8 encoding (and for those who understand UTF8 + BOM).

  5. The window with the title "System Preparation Program 3.14" must be closed. Otherwise, when you run the following command, you will receive the error: “Another copy of this application is already running.”

    It is better to save the "unattend.xml" file on your hard drive rather than on a flash drive, because when using this file, the next time you reboot, the flash drive will not yet be connected and the system will report an error and will constantly reboot. The entire installation process will have to start over. Assuming that the unattend.xml file has been saved in the root of the C drive, then the command to apply it will be as follows:

    C:\Windows\System32\sysprep\sysprep.exe /oobe /reboot /unattend:C:\unattend.xml


    The computer will restart.

    If the file is NOT saved in UTF-8 encoding (as described above), you will receive the following error: “A fatal error occurred while running the Sysprep program on the computer.”

  6. Returning to the window for setting the computer name and user name, complete the installation.
  7. After booting the computer, make sure that the D:\Users and D:\ProgramData folders exist and that the folder of the user whose name you specified at the final installation stage is in D:\Users.

As a bonus, you can also take advantage of the so-called junction points to prevent errors associated with explicitly specifying the previous paths of user profile folders. To do this, create two symbolic links using the mklink utility (run with administrator rights):

Mklink /J C:\Users D:\Users mklink /J C:\ProgramData D:\ProgramData
Thus, now, even when accessing the same paths, any program will not notice the substitution and will work with folders on drive C, although in fact they will be located in the location you configured.

To make some applications compatible with Windows XP, I recommend making the following symbolic link:
mklink /J "C:\Documents and Settings" D:\Users
If the users folder already existed and you specify the same user name during the initial setup of the operating system, then another folder for the profile will be created, and the old one will remain untouched. All files from the old folder should be transferred to the new one manually (it is advisable to boot under a completely different user so that files in the profile folder are not blocked).


Therefore, I recommend that after installing Windows and after creating user profiles (for this you need to log in interactively once as each user), create a system image on the C: drive. In the event of a failure, you deploy the system from an image in which user profiles are linked to their folders, and the problem described in the paragraph above will not occur.
Did you like the article? Share it