Go to ...

RSS Feed

Relocating Users folder – Yes, it is 100% safe!


Always when installing or deploying Windows, I prefer separating the Windows operating system and its user profile files into separate partitions, preferably on separate disks. I’ve done this hundreds of times, since the days of Windows 7, on each and every physical Windows installation I’ve got, and often also on virtual installations. I’ve never had this cause a single issue. My tutorial on Ten Forums about how to relocate the Users folder has picked up about 1.6 million views. If you read all 1,300 posts on that tutorial thread, you will notice that absolutely all issues, without exception, that users have posted have been self-inflicted (caused by user error), not the method itself.

Even some globally known IT writers have posted articles about how the relocation should not be done because it, according to them, makes updates and upgrades impossible. Unfortunately, some users believe these comments from writers and have never tried and tested this on their own, only because those writers are known as “experts.”

Let me echo the title of this post: Relocating all user profiles (the main user profile folder Users) to another partition is 100% safe, and does not cause any issues. Windows Update works perfectly, as does upgrade, be it an upgrade from Windows 7 with relocated Users folder to Windows 10, or a Windows 10 feature upgrade from one version to the next.

The benefits are obvious, especially if the profile partition is on another disk instead of the Windows system disk. Take this HP ProBook laptop of mine as an example; it shipped with a 128 GB m.2 SSD and a 1 TB HDD, with formatted capacities of about 120 GB and 930 GB, respectively. There is no way I could install all my software and put all user data on the small SSD I want to use as the Windows OS disk. However, if I move the Users folder to that bigger HDD, and change the software install location also to the HDD, that small SSD will be more than enough for Windows. In fact, I could cope well with a 64 GB SSD for Windows, without any issues whatsoever.

To relocate the Users folder means that all user profiles will be created in another location, for example on E:\Users instead of the default, C:\Users. All user accounts / profiles created after this relocation will be created in the new location. In this post, I will show two totally different methods to relocate the Users folder, one for beginners and one for advanced users.

1.) Relocating in OOBE

Maybe the simplest method, and the one I recommend to beginners, is to use a simple answer file. Click expand source below to view the answer file code, copy it and paste into Notepad, save it as Relocate.xml on the root of your Windows install media:

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <FolderLocations>
                <ProfilesDirectory>E:\Users</ProfilesDirectory>
            </FolderLocations>
        </component>
    </settings>
</unattend>

Boot your PC from the install media, then install Windows normally. On the OOBE Region Selection screen, press SHIFT + F10 to open Command Prompt:

Click screenshots to open them enlarged in a new tab.

In Command Prompt, enter the command diskmgmt.msc to open Disk Management. Partition disks as you wish, creating a partition for user profiles. In this sample, I have used all of the secondary HDD for my user profiles partition. Be sure to assign the User Profiles partition the same drive letter as found in the ProfilesDirectory tags in the answer file:

Close Disk Management. While still in Command Prompt, enter the command diskpart to open the built-in Windows partitioning utility (#1 in next screenshot), and, just to be sure, check the drive letter for your install media with the command list vol (#2). In my case now, it is drive D: (#3). Notice that as the screenshot is from a virtual Hyper-V installation, the ISO containing Relocate.xml file is shown as DVD drive. In your case, be sure to find the letter for your USB flash drive.

Enter command exit (#4) to quit Diskpart:

In Command Prompt, switch to the Sysprep folder using the command cd sysprep (#5). Enter the following command to run the Windows System Preparation Tool (Sysprep) to apply your answer file (#6):

sysprep.exe /oobe /reboot /unattend:D:\Relocate.xml

See the blue highlighted path in the preceding command. Because my install media where Relocate.xml is located is on drive D:, my path would be as shown above, D:\Relocate.xml. Change yours according to your install media drive letter and the name of your XML answer file.

Sysprep will run, apply your answer file, and restart back to Region Selection. Finish the installation normally. Then, when you’re on the desktop you will see that the Users folder is now in whatever location you specified. All future user account profile folders will be created there, too.

2.) Relocating in MDT LiteTouch Deployment

First, if you are not familiar with MDT (Microsoft Deployment Toolkit), we have published a series of posts that will help you to get started: Windows Deployment with MDT. In the last post of that series, I show how to manage and create partitions for MDT deployment.

In my case, again using this laptop as an example, this is how I created partitions. I prefer having dedicated partitions for various purposes. For instance, having Hyper-V virtual machines stored on a dedicated partition makes it easy to exclude them from Macrium image backups; no need to include a few hundred gigabytes of virtual machines in backup because I always export them to external storage anyway. It’s both easy and fast to import a VM whenever I need one.

OK, here’s how I partition SSD and HDD in the Task Sequence I use for clean deployment on this laptop. First, for the SSD which I will use as the Windows OS disk, I accept the MDT defaults. All remaining space after EFI, MSR and WinRE partitions will be used for Windows as shown in these Task Sequence properties:

Next, I will create a second disk for this Task Sequence, and partition it as I’d like. I will create a 150 GB partition Software for later software installs, a 200 GB User Profiles partition on which I will relocate the Users folder, a 500 GB Hyper-V partition to store my virtual machines, and finally, because I normally use this laptop as my MDT Workbench machine, a partition for MDT Deployment Shares. I do not define its size but instead, I tell the system to use 100% of the remaining space for it:

Did you notice in the preceding screenshots that, somewhat illogically, the Windows OS disk is the secondary Disk 1, and the data disk for other partitions is primary, Disk 0? MDT deployment assigns drive letters in the order partitions will be created. Because hardware setup on this HP laptop has a small SSD as Disk 1, not Disk 0 as would be logical, I need to put Disk 1 partitioning first in the Task Sequence properties (#1 in screenshot, compare to previous screenshots), and Disk 0 with Software, User Profiles and other partitions after that (#2):

Read more about partitioning in MDT.

Now I know that partitions will get the correct letters. The Windows partition will be C, Software partition D, User Profiles partition E, Hyper-V partition F, and Deployment partition G.

OK, now I just need to edit the Task Sequence Unattend.xml answer file in WSIM (Windows System Image Manager) to add the new Users folder location. First, in the Windows Image pane, I’ll add a FolderLocations setting from the Shell Setup component to the pass 7 OobeSystem:

Then, I will enter a new value for the user profile folder, selecting the FolderLocations setting in the Answer File pane:

All done, the setting will be added to the answer file:

When deployed using this Task Sequence, partitioning will now be done as I specified, and the Users folder is now on the User Profiles (E:) drive:

That’s it. This gives you two different methods from which to choose. Because all user profile folders including AppData folders (also the Temp folder!) are now on another partition, the Windows partition does not require much space. In my case, most of my 50 GB+ software is installed on D: and the Users is folder on E:. Thus, the Windows partition C: currently consumes only 34 GB:

Kari

 

Author: Kari Finn

A former Windows Insider MVP, Kari started in computing in the mid 80’s writing code for VAX / VMS systems. Since then, he’s worked in a variety of IT positions. He specializes in Windows image capture, customization, repair and deployment as well as Hyper-V virtualization. Kari is a proud Team Member at number #1 Windows site TenForums.com.

Leave a Reply