How to move user folders on Windows 10

This article will show you how to move the Users folder, including all user profiles and folders during the new Windows installation, without any user accounts and on preinstalled Windows, already. have an account on the system.

Instructions for moving Users folder on Windows 10

  1. 1. Move the user directory while installing the operating system
    1. Step 1. Install Windows 10
    2. Step 2. Create an unattended answer file
    3. 3. Run Sysprep
  2. 2. Move the Users folder on Windows pre-installed
    1. 1. Create an unattended answer file
    2. 2. Run Run Sysprep
    3. 3. Start OOBE
  3. 3. User folder migration on Windows 10 is upgraded from Windows 7.8 or 8.1
    1. 1. Move the Users folder to drive C:
    2. 2. Edit the Registry

The advantage of this method is that it changes the value of one of the environment variables inside Windows 10. Changing variables involves all user profiles, defining them when creating the drive or partition selected.

When Windows 10 is installed, 5 or 6 system folders are created depending on the selected bit version:

  1. PerfLogs (Performance Logs): where Windows stores logs of performance and reliability.
  2. Program Files : where applications and software are installed. Windows x86 (32 bit) stores all applications here, Windows x64 (64 bit) only stores original 64 bit applications.
  3. Program Files (x86) is only available on Windows x64, all non-x64 applications will be saved here.
  4. Windows : contains operating system files and drivers.
  5. ProgramData : some applications contain application settings, specific users, configuration files.
  6. Users : This is the 'home' of all user profiles. When creating a new user account and when logging on for the first time, Windows creates a specific set of user folders (UsersUsername).

Microsoft does not recommend users to move ProgramData, Program Files, Program Files (x86) and Windows folders. Depending on the information, the data is stored on this folder and moving them may cause serious problems. However, it doesn't matter when we move the Users folder and the data contained in it including the Temp and AppData directories. The article will show you how to move the Users folder by changing the internal Windows environment variable.

Moving the Users folder can save a lot of space on the system drive. Photos, videos, documents, etc. contained in this folder increase subdirectories up to dozens and sizes sometimes up to hundreds of GB.

When installing Windows, if you use Audit Mode to move the Users folder, the system drive only stores Windows and the application.

Note, you can only move the Users folder to an internal HDD or SSD drive.

1. Move the user directory while installing the operating system

Step 1. Install Windows 10

To install a new Windows 10, see the instructions How to install Windows 10 from USB with an ISO file. If you don't have the Windows 10 installation media, download the Windows 10 ISO file.

For some reason, sometimes Sysprep cannot be performed when Windows is installed with a network connection. You can install Windows offline, only connect Windows to the network when accessing Audit Mode.

When installing to the Region Selection screen, press Ctrl + Shift + F3 .

How to move user folders on Windows 10 Picture 1How to move user folders on Windows 10 Picture 1

Now, Windows will reboot into Audit Mode using the integrated admin account. When Windows Desktop appears, you will see the System Preparation Tool dialog in the middle of the screen. Close it by clicking the Cancel button.

How to move user folders on Windows 10 Picture 2How to move user folders on Windows 10 Picture 2

Step 2. Create an unattended answer file

If Windows installation does not have an Internet connection, you can reconnect to the Internet now.

The migration process will be done with the original Windows 10 tool called the System Preparation Tool (Sysprep). Sysprep needs instructions and this guide is contained in the XML script file, the unattended answer file.

In this example, we need a simple answer file containing two important information that guides Sysprep:

  1. Bit version of Windows (32 bit or 64 bit)
  2. New location of Users folder (Example: D: Users instead of C: Users).

Open Notepad, paste the following code into the new file.

  D:Users 

Change the following information if needed:

  1. Line 4: The value of ProcessorArchitecture must be adm64 if you install Windows 64 bit on an Intel or AMD and x86 processor if Windows 32 bit is installed.
  2. Line 6: The value in the ProfilesDirectory tag is the new location for the Users folder. In this example, D: Users . Make sure the drive that moves the Users folder is empty or at least does not contain any Windows system folders, especially the Users folder or part of that folder from previous or current Windows settings .

Warning: You should read before proceeding.

Windows likes to set drive ID characters like this:

  1. C:> drive, Windows system installation drive.
  2. Drive D:>, the first optical drive (CD / DVD drive).
  3. Drive E:>, the second partition on the same C: drive or in case the drive only has one partition, it is the first partition on the secondary drive.

Now, when you use sysprep to tell the system to move the Users folder to a specific drive, after restarting, Windows can find the drive to transfer this user folder with another drive ID character. and drive D: you intend to transfer that user directory now into E :. Sysprep cannot move user folders and you must reinstall.

To make sure you can use the selected partition to move the Users folder and need to set up the manual drive letter before running Sysprep. In Audit Mode, you can change the characters manually using Disk Management.

For example, to make sure the Users folder changes to drive D, execute:

  1. Change the optical drive letter to the letter at the end of the alphabet, such as W :.
  2. Change the drive letter of the partition or drive you plan to use for the Users folder to D :.
  3. If the partition or drive you want to use is already a D: character, change it to another character, close Disk Management, then reopen it and change it back to D :.

Save the file as an XML file to the root of any drive except the C: drive. In this example, we renamed the D: drive to User Profiles and saved the answer file to D: relocate.xml :

How to move user folders on Windows 10 Picture 3How to move user folders on Windows 10 Picture 3

3. Run Sysprep

Open Command Prompt with administrative rights. To stop WMP Network Sharing Service, run the following command:

 net stop wmpnetworksvc 

This service is not running, otherwise Sysprep will not run successfully.

Now run the Sysprep command by copying the following command into the Command Prompt.

 %windir%system32sysprepsysprep.exe /oobe /reboot /unattend:d:relocate.xml 

How to move user folders on Windows 10 Picture 4How to move user folders on Windows 10 Picture 4

The above command will tell the system to run Sysprep from the WindowsSystem32Sysprep folder to read instructions from unattended answer D: relocate.xml file, prepare the computer to boot OOBE (OOBE: first boot for new Windows installation).

Press Enter , you will see Sysprep start running.

How to move user folders on Windows 10 Picture 5How to move user folders on Windows 10 Picture 5

Windows will now start OOBE First Run and you will continue to install Windows. Once the installation is complete, you will see the main profile folder and your user account has been moved to the D: drive (or whatever drive you choose).

How to move user folders on Windows 10 Picture 6How to move user folders on Windows 10 Picture 6

2. Move the Users folder on Windows pre-installed

Warning: Do not proceed with the migration before creating the system image.

Running Sysprep on a pre-installed Windows is quite risky. Manufacturers may have their unattended answer file and ignore your custom unattended answer file. Therefore you should not run Sysprep on a pre-installed Windows system.

If you still decide to do it and if something goes wrong, you need to restore the system image you created before you proceed.

In short, moving the Users folder with Sysprep should only be done when installing Windows. If you try the second method to move the user directory on a preinstalled version, you may have to completely reinstall or restore the computer to the factory state.

Here's a video of how to move the Users folder on Windows pre-installed.

Note : With Windows 10 or later version 1703, you do not need to disable the current user account as in the video. In fact, when you do so, you can be completely locked out of Windows, forced to reinstall.

Version 1703 (build 15063 or later), you also do not disable or deactivate the existing user account as in the video.

 

1. Create an unattended answer file

Create an answer file like Step 2 Way 1.

2. Run Run Sysprep

Run Sysprep as Step 3 Way 1.

3. Start OOBE

Although you have Windows 10 installed, starting OOBE for the first time always runs, meaning that Windows has gone through the initial setup process. Now continue the steps to install the new Windows.

However, there are two things to keep in mind:

  1. You do not need to enter the software key, even if Windows requires. Entering the software key is not harmful, but if you want to save time, just click the Skip button.

How to move user folders on Windows 10 Picture 7How to move user folders on Windows 10 Picture 7

  1. Your original user account does not disappear, everything is still there. However, when starting OOBE requires creating user accounts but if you try an existing account, local account or Microsoft account, you will receive the following error message:

How to move user folders on Windows 10 Picture 8How to move user folders on Windows 10 Picture 8

To fix this, simply set up a fake local account. After that, you can log in to your original account and delete this fake local account.

3. User folder migration on Windows 10 is upgraded from Windows 7.8 or 8.1

Note:

With build 10586 (TH2 version 1511) onwards, no matter what the upgrade even if the Users folder has been moved.

If the update from Windows 7 has moved the Users folder and the ProgramData folder, you must transfer the ProgramData back to the C: drive before upgrading. Windows 10 does not support ProgramData migration. You do not need to switch back to the Users folder without moving this folder.

1. Move the Users folder to drive C:

Open Notepad, paste the following code into the new file.

  C:ProgramData 

Change the following information if needed:

  1. The value of ProcessorArchitecture must be amd64 if Windows 64 bit is installed with Intel or AMD processor and x86 on 32 bit Windows.

Save the file as XML to the root of any drive.

How to move user folders on Windows 10 Picture 9How to move user folders on Windows 10 Picture 9

Perform steps 2 and 3 as Method 2 above.

2. Edit the Registry

When running Sysprep on Windows is upgraded, you will receive an error message about Sysprep being unable to authenticate the Windows installation, and it will not run. Check the log file you will find the cause.

 Sysprep will not run on an upgraded OS. You can only run Sysprep on a custom (clean) install version of Windows. 

(Log file: C: WindowsSystem32SysprepPanthersetupact.log)

You need to edit the registry to fool Windows into thinking this is a new installation instead of an upgrade. To do this, open Registry Editor ( Win + R , type regedit , press Enter ), browse to the following key:

 HKEY_LOCAL_MACHINESYSTEMSetup 

Delete DWORD Upgrade (right frame) and key Upgrade (left frame). The system warns that there may be a problem if you delete these two items, you just need to accept and delete it.

How to move user folders on Windows 10 Picture 10How to move user folders on Windows 10 Picture 10

Still on Registry Editor, browse to the following key:

 HKEY_LOCAL_MACHINESYSTEMSetupStatusSysprepStatus 

If DWORD CleanupState or DWORD GeneralizationState has a value greater than 7, change it to 7 by double-clicking on the DWORD and entering the new value:

How to move user folders on Windows 10 Picture 11How to move user folders on Windows 10 Picture 11

Close Registry Editor, open Command Prompt, type slmgr / dli and press Enter to open Software License Manager. Close it immediately after opening and closing the Command Prompt.

Now you can upgrade to the next build and when the upgrade is complete, you can perform the upgraded sysprep Windows. After upgrading, restart the computer, repeat this step (edit the registry and slmgr / dli as above), then perform Method 2 as above.

Note : If you switch the Users folder back to the old drive before upgrading, make sure to back up and delete the drive. It needs to be empty before moving Users from C :, after moving, you can copy the file from the corresponding folder to the new Users folder.

I wish you all success!

4 ★ | 49 Vote