Page 1 of 86 1231151 ... LastLast
    Users Folder - Move Location in Windows 10

    Users Folder - Move Location in Windows 10

    How to Move Users Profile Folder to another Location in Windows 10
    Published by
    2014-10-01
    Designer Media Ltd

    Published by


    Kari's Avatar
    Finnish but not finished


    Location: A Finnish ex-pat in Germany
    Posts: 9,076

    Show Printable Version 


    How to Move Users Profile Folder to another Location in Windows 10


    information   Information
    The method described in this tutorial allows relocating Windows 10 main profile folder Users including all present and future user profiles and folders while installing Windows, before any user accounts are created, as well as later on an already installed system.

    The advantage of this method is that it changes the value of one internal Windows 10 environment variable, being a “Do it once and forget” procedure. Changing the variable takes care of all existing and future user profiles, locating them when created to selected drive or partition. The method is fail proof and reversible.

    When Windows 10 is installed, 5 or 6 system folders are created depending on chosen bit-version:
    • PerfLogs (Performance Logs), where Windows stores performance and reliability logs
    • Program Files, where applications and software are installed. Windows x86 (32-bit) stores all applications here, Windows x64 (64-bit) only native 64-bit applications
    • Program Files (x86), exists only in Windows x64. All non-x64 applications are stored here
    • Windows, which contains core operating system files and drivers
    • ProgramData, where some applications store application and user specific settings and configuration files.
    • Users. This is the “home” of all user profiles. When a new user account is created and this new user logs in first time, Windows creates a set of user specific folders (Users\Username)

    Microsoft does not recommend relocating, moving ProgramData, Program Files, Program Files (x86) and Windows folders. Too much is depending on information and data stored on these folders and relocating them might cause serious issues. However, there's simply nothing preventing us to move the Users folder and everything it contains, including the Temp and AppData folders. This tutorial will show how to move (relocate) the Users folder by changing internal Windows Environment Variables.

    Moving Users folder can save a lot of space on system disk. Pictures, mp3’s videos, documents and so on, a user folder with its subfolders can be tens, sometimes hundreds of gigabytes.

    Personally, when installing Windows I always use Audit Mode to relocate Users folder, leaving system drive only for Windows and applications.

    Please notice that the Users folder can only be relocated to a hard disk or SSD. On tablets with often small internal storage it would be practical to move the Users to an SD card but it can't be done.



     Contents:

    Method One: Relocating Users folder during installation
    Method Two: Relocating Users folder on an existing Windows installation
    Upgrade: Upgrade and Sysprep: what to do




    Users Folder - Move Location in Windows 10 Method One Users Folder - Move Location in Windows 10
    Relocating Users folder during installation




    1. Install Windows 10

    To clean install Windows 10, see this tutorial: Windows 10 - Clean Install

    You can download a Windows 10 ISO image with the install.wim file needed for this procedure by following instructions in this tutorial (Option One): Windows 10 ISO Download

    information   Information
    For some reason Sysprep sometimes fails when Windows is connected to the network when installed. I recommend installing Windows without any whatsoever network connection, connecting Windows to network only when you have entered the Audit Mode as told below.

    Note   Note
    Windows 10, clean install:

    Before starting the installation, create a boot disk for your chosen imaging program. I use Macrium Free, see the tutorial at our sister site the Seven Forums.

    When installation has done the last reboot you will arrive to settings dialog (screenshot from this tutorial):

    Name:  19603d1432307145t-windows-10-clean-install-8-install_windows_10.jpg
Views: 350531
Size:  34.5 KB


    Now turn off the PC. Insert the imaging boot disk and reboot from it, create a system image. As Windows is quite barebone at the moment it only takes a few minutes.

    When the image has been created, remove the imaging boot disk and boot the PC normally. It will resume the setup from the above shown settings dialog. You can now reboot to Audit Mode as told in this tutorial and use Sysprep to relocate the Users folder. Before sysprepping save a copy of your answer file to an external drive.

    If the sysprep fails, it is always (99% of the cases) a user error. A typo in answer file, wrong CPI source (last line in the answer file), invalid install media, wrong drive letters and so on. In this case you can restore the image you created and try again, and ask for help by posting the copy of your answer file here. Often the answer file itself can reveal the cause for the failing sysprep and your next try might be successful when the errors have been fixed

    If you are doing this on an existing Windows installation (Method Two in this tutorial), creating a system image before proceeding is even more important. A failed sysprep, for any reason, can make your system unusable.

    Windows 10, upgrade install:

    Before starting the upgrade process create a system image as told above.


    Be it a clean install or an upgrade install, when you have created the system image continue from below.


    When installation reaches the Settings screen after reboot (as shown in installation tutorial step 15), press CTRL + SHIFT + F3:

    Click image for larger version. 

Name:	2014-10-01_21h28_33.png 
Views:	3314 
Size:	69.1 KB 
ID:	5465

    Windows reboots now entering a so called Audit Mode using the built-in administrator account. When Windows Desktop will be shown you'll notice the System Preparation Tool dialog in the middle of your screen. Close it for now by pressing the Cancel button:

    Name:  2014-10-01_21h08_57.png
Views: 373096
Size:  10.2 KB

    2. Create an unattended answer file

    If you installed Windows without a network connection, you can connect to network now.

    The relocation procedure itself will be done with a native Windows 10 tool called System Preparation Tool (Sysprep). Sysprep alone can quite little, it needs instructions. These instructions it gets from an XML script file, an unattended answer file.

    In our case we need a very simple answer file. It simply contains four important details, instructions to Sysprep:
    • Bit version of the Windows (32 or 64 bit)
    • New location of Users folder (for example D:\Users instead of default C:\Users)
    • Location of Windows 10 install media
    • Which Windows version and edition we are installing


    OK, let's start. Open Notepad, paste the following code to a new file:
    Code:
    <?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>D:\Users</ProfilesDirectory>
    </FolderLocations>
    </component>
    </settings>
    <cpi:offlineImage cpi:source="wim:E:\sources\install.wim#Windows 10 Pro" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    Change the following details if needed (see the parts in red in above code):
    • Line 4: The value of variable ProcessorArchitecture must be amd64 if you are installing a 64 bit Windows regardless of if you have an Intel or AMD processor, and x86 if you are installing a 32 bit Windows
    • Line 6: The value in ProfilesDirectory tags is the new location for the Users folder, in this example answer file it will be moved to D:\Users. Be sure that the drive into which you are relocating the Users folder is empty and does not contain any Windows system folders, especially Users folder or parts of it from a previous Windows installation
    • Line 10: Change the location of Windows 10 install.wim file (CPI Source). In this example the Windows install media is on drive E:
    • Following the install media location, separated with #, see that you have the Windows version correctly (Windows 10, Windows 10 Pro, Windows 10 Education or Windows 10 Enterprise). Notice that the installation media must be present when we continue with Sysprep!


    warning   Warning
    Please read this before proceeding!

    Windows "likes" to set the the drive ID letters like this:
    • Drive C: > The system drive where Windows will be installed
    • Drive D: > First optical drive (CD / DVD drive)
    • Drive E: > Second partition on the same disk where the C: is located, or in case that disk only has one partition, the first partition on the secondary disk

    Now when you sysprep telling it to move the Users to a specific drive, after the reboot Windows might find that intended target drive for Users folder has another drive ID letter and your intended drive D: is now E:. Sysprep fails and you have to reinstall.

    To be sure you are able to use your chosen partition for the relocated Users folder you need to set the drive letters manually before the sysprep is run. In Audit Mode you can do this for instance with Disk Management by manually changing the drive letters. In below example I want to secure that Users folder will be moved to D drive:
    • Change the optical drive letter to something at the end of the alphabet, I use X:
    • Change the drive letter of the partition or disk you intend to use for the Users folder to D:
    • If the partition or disk you want to use already has a letter D:, change it to something else, close the Disk Management, open it again and change the letter back to D:

    See the tutorial at our sister site the Seven Forums: Drive Letter - Add, Change, or Remove in Windows - Windows 7 Help Forums

    I recommend to always set drive letters manually to override the defaults.



    Save the file as an XML file to root of any drive except C:. In this example I have already renamed my D: drive to User Profiles and save the answer file there as D:\relocate.xml:

    Name:  2014-10-01_21h15_17.png
Views: 375686
Size:  30.4 KB


    3. Run Sysprep

    Almost there! Press WIN + X, select Command Prompt (Admin). To ensure that WMP Network Sharing Service is stopped, give the following command:

    net stop wmpnetworksvc

    The service is most probably not running but if it is, it will now be stopped. When this service is running, Sysprep fails.

    Now the Sysprep command itself. Type the following:

    %windir%\system32\sysprep\sysprep.exe /oobe /reboot /unattend:d:\relocate.xml

    Click image for larger version. 

Name:	2014-10-01_21h21_06.png 
Views:	2890 
Size:	22.6 KB 
ID:	5458


    The above command tells system to run the Sysprep from Windows\System32\Sysprep folder reading instructions from the unattended answer file D:\relocate.xml, prepare the computer for an OOBE boot (OOBE = the first boot of newly installed Windows) and finally reboot when ready.

    Hit Enter, you will see Sysprep starting to do its magic:

    Name:  2014-10-01_21h22_22.png
Views: 372540
Size:  2.6 KB


    That's it. Windows runs now the OOBE First Run boot and you can continue from the installation tutorial step 12 where we left the installation in the beginning of this tutorial. When finally at Windows Desktop, you will notice that the main profile folder and your user account in it have been moved to drive D: (or any other drive you selected):

    Click image for larger version. 

Name:	2014-10-01_21h34_56.png 
Views:	2871 
Size:	18.8 KB 
ID:	5461




    Users Folder - Move Location in Windows 10 Method Two Users Folder - Move Location in Windows 10
    Relocating Users folder on an existing Windows installation


    Remember to create a system image before proceeding!

    warning   Warning
    In Windows 10, this method might cause existing user accounts losing Start Menu and Search functionality. All new accounts will be OK.


    There are two workarounds for the issue mentioned in above warning.

    First. a simple workaround is to create a new user account for yourself after running the Sysprep to relocate the Users folder, make it an administrator account, then copy your data from the original user account to the new account, and finally delete the original account.

    This video shows another workaround for this issue; simply disable existing accounts before sysprep is run then enable them when finished:




    1. Create an unattended answer file

    Create an answer file exactly as told above in Method One Step 2.

    2. Run Sysprep

    Run Sysprep exactly as told above in Method One Step 3.

    3. OOBE Boot

    Although you already had Windows 10 installed, after Sysprep the first run OOBE boot is always run. This means that Windows goes through the initial setup process. You continue now from step 12 in installation tutorial.

    Two things to notice now:
    • You don't have to enter the product key now even Windows will ask it. Entering it does no harm but if you want to save some key presses, you can simply click Skip button:
      Click image for larger version. 

Name:	2014-10-02_00h17_19.png 
Views:	2416 
Size:	45.5 KB 
ID:	5469


    • Your original user accounts have not disappeared, everything is still there. However, the OOBE boot requires a user account to be created but if you try your existing account, local or Microsoft account, you get an error message:
      Click image for larger version. 

Name:	2014-10-02_00h20_43.png 
Views:	1049 
Size:	8.8 KB 
ID:	5470


    • To work around this, simply set up a dummy local account (see installation tutorial step 19). You can then later log in to your original account and remove this dummy local account.




    Users Folder - Move Location in Windows 10 Upgrade Users Folder - Move Location in Windows 10
    Upgrade and Sysprep: what to do


    • See 1. Move Users back to C: drive below for how to prepare Windows for an upgrade by moving the Users folder back to C: drive.
    • See 2. Edit Registry to Sysprep an Upgraded Windows below for how to run Sysprep on an upgraded Windows.


    Note   Note
    Please notice that with the Build 10586 (TH2 version 1511) and later there has been no issues in upgrading even with relocated Users folder.

    If upgrading from Windows 7 with not only the Users folder but also the ProgramData folder relocated, you have to move the folders back to C: drive before upgrading. as told below. This is not necessary if the ProgramData folder is not relocated.


    The upgrade requires a bit registry editing. First delete a key and a DWORD and change two values in registry. After the upgrade you can then repeat the process to relocate the Users folder again (relocating ProgramData is not supported in Windows 10).

    Don't panic, this is quite easy .

    Note   Note
    The more data you have in current Users folder and its subfolders, the longer this process takes because all data will be moved.

    I prefer backing up all personal files and folders from all user profiles first to an external backup, then delete the backed up content from Users to make it as small as possible. Do that first, then follow the steps below to move Users to C:, upgrade and follow instructions to re-sysprep Users back to another drive, and finally copy the user files from backup to new user folders.


    1. Move Users (and possible ProgramData) back to C: drive

    Open Notepad, paste the following code to a new file:
    Code:
    <?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>C:\Users</ProfilesDirectory>
    <ProgramData>C:\ProgramData</ProgramData> (this line only needed if ProgramData has been relocated)
    </FolderLocations>
    </component>
    </settings>
    <cpi:offlineImage cpi:source="wim:E:\sources\install.wim#Windows 10 Pro Insider Preview" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    Change the following details if needed (see the parts in red in above code):
    • The value of variable ProcessorArchitecture must be amd64 if you are installing a 64 bit Windows regardless of if you have an Intel or AMD processor, and x86 if you are installing a 32 bit Windows
    • The value in ProfilesDirectory tags tells the location where we want move the Users folder, in this example answer file it will be moved back to C:\Users
    • On the last line of code, change the location of Windows 10 install media. In this example the media is on drive E:
    • Following the install media location, separated with #, see that you have the Windows version correctly:
      • Windows 10 Home, Windows 10 Pro, Windows 10 Home Insider Preview, Windows 10 Pro Insider Preview for Windows 10
      • Windows 8, Windows 8.1, Windows 8 Pro or Windows 8.1 PRO if you came here from the Eight Forums for instructions
      • Windows 7 STARTER, Windows 7 HOMEBASIC, Windows 7 HOMEPREMIUM, Windows 7 PROFESSIONAL, Windows 7 ULTIMATE if you came here from the Seven Forums for instructions

    • If you have upgraded to later builds of Windows 10, you can create your own Windows 10 ISO as told in this tutorial: ESD to ISO - Create Bootable ISO from Windows 10 ESD File


    Save the file as an XML file to root of any drive except C:. In this example I have already renamed my D: drive to User Profiles and save the answer file there as D:\relocate.xml:


    Name:  2014-10-01_21h15_17.png
Views: 375686
Size:  30.4 KB

    Now do steps 2 and 3 in Method Two above, continue from below when done.

    2. Edit Registry to Sysprep an Upgraded Windows

    When running Sysprep on an upgraded Windows you will get an error message about Sysprep not being able to validate your Windows installation, Sysprep will simply not run. Checking the log file you will find out the reason in plain text:

    Code:
    Sysprep will not run on an upgraded OS. You can only run Sysprep on a custom (clean) install version of Windows.
    (Log: C:\Windows\System32\Sysprep\Panther\setupact.log)

    We need to edit Windows registry to "fool" Windows to think this is a clean install instead of an upgrade. To do this open the Registry Editor (WIN + R, type regedit, hit Enter), browse to key HKEY_LOCAL_MACHINE\SYSTEM\Setup


    Delete both the DWORD Upgrade (right pane) and KEY Upgrade (left pane), see screenshot. The system warns you that skies can fall down if you delete these items, just laugh loud and accept the deletion :

    Name:  7387d1414118859t-esd-iso-create-bootable-iso-windows-10-esd-file-2014-10-24_01h33_53.png
Views: 374074
Size:  224.2 KB

    Still in Registry Editor, browse to key HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus, if either DWORD CleanupState or DWORD GeneralizationState has any other value than 7, change it to 7 by double clicking the DWORD in question and entering the new value:

    Name:  7388d1414118861t-esd-iso-create-bootable-iso-windows-10-esd-file-2014-10-24_01h39_24.png
Views: 374329
Size:  189.5 KB

    Close the Registry Editor. Open Command Prompt, type slmgr /dli and hit Enter to open Software License Manager. Close it as soon as it opens, close Command Prompt.

    You can now upgrade to next build, and when the upgrade is done you can sysprep the upgraded Windows . After the upgrade has finished and you have rebooted back to desktop, repeat this step (registry editing and slmgr /dli as told above), then do the Method Two from above. For Windows 8 and 8.1 users, continue from step 1.2 in the Eight Forums tutorial http://www.eightforums.com/tutorials...tion-disk.html.

    Note   Note
    If you will move the Users back to the same drive where it was earlier before the upgrade, be sure to empty the drive first to a backup location. Drive should be empty before moving the Users from C:, you can after the relocation process then copy your files back to corresponding folders in the new Users folder.


    That's it folks, have fun with Windows 10!

    Kari



  1. Joined : Oct 2013
    Texas
    Posts : 7,378
    Windows 10 Pro X64
       2014-10-02 #1

    Very good Kari
      My System SpecsSystem Spec


  2. Joined : Oct 2013
    A Finnish ex-pat in Germany
    Posts : 9,076
    Windows 10 Pro
       2014-10-03 #2

    Thanks Dude.

    Already when installing my first Windows 10 I decided to give this a try and it went so smoothly I was surprised myself, although I have always used Sysprep to relocate the Users since Vista days. I now have the Users folder on E: drive on each Windows 10 system I have installed (three physical and two virtual ATM ), no issues whatsoever.
      My System SpecsSystem Spec


  3. Joined : Nov 2013
    Houston
    Posts : 1,394
    Win-7Prox64 Win-8.1Prox64 Win-10Prox64
       2014-10-03 #3

    Saved
      My System SpecsSystem Spec


  4. Joined : Oct 2014
    Posts : 27
    Windows 10 x64 (b9841)
       2014-11-04 #4

    I am doing the Update process. Does the sysprep move the actual data for me then? I ran the sysprep, system rebooted, and has been sitting at a blank (black) screen for about 10 minutes now, though I do see hard drive activity. When should I begin to panic?
      My System SpecsSystem Spec


  5. Joined : Oct 2013
    A Finnish ex-pat in Germany
    Posts : 9,076
    Windows 10 Pro
       2014-11-04 #5

    On phone, let me go to computer. 15 minutes?
      My System SpecsSystem Spec


  6. Joined : Oct 2013
    A Finnish ex-pat in Germany
    Posts : 9,076
    Windows 10 Pro
       2014-11-04 #6

    OK, back on computer.

    Yes, sysprep moves everything what's in Users. That's why in tutorial I suggest to empty Users as much as you can before sysprepping it back to C:, to shorten the time needed.

    If you mean that you sysprepped the Users back to C: in order to be able to upgrade to Build 9860 and now you stare a black screen, it really can take quite a while. In my tests for instance after first reboot while upgrading to the new build, I had 20 to 26 minutes (depending on if vm or real machine) a totally black screen with nothing on it, no pointer or indicator before next reboot.
      My System SpecsSystem Spec


  7. Joined : Oct 2014
    Posts : 27
    Windows 10 x64 (b9841)
       2014-11-04 #7

    Kari,

    Everything came back. Just install 9860 now.Yeah, i guess I should have emptied E out more.

    I really have to say, your support is above and beyond the call of duty.

    When 10 goes into production, will this still be required for every windows update? Just for SP's?

    ~S
      My System SpecsSystem Spec


  8. Joined : Oct 2013
    A Finnish ex-pat in Germany
    Posts : 9,076
    Windows 10 Pro
       2014-11-04 #8

    Thanks .

    Again, upgrade not update.

    Windows 10 Technical Preview makes this whole update or upgrade thing even more confusing as it has been in previous versions due the fact that the Upgrade is given through Windows Update. A Windows Update is a file with a name KBXXXXXX where the letters are short from Knowledge Base and XXXXXXX a numerical string. An update does not change Windows version and build, it just adds something to already exisiting drivers, dynamic libraries (DLL files), apps and programs or replaces them with a newer one. Whereas an update only repairs / changes / replaces one or more files, an upgrade means a totally new Windows version and build, replacing all Windows core and system files.

    Here's how it works on a sysprepped system when Users or any other system folder is relocated away from C: drive:


    • Windows update works totally normally regardless where Users folder is located
    • When a new version of Windows is released and you want to upgrade, the Users folder must first be moved back to C: in order to upgrade the operating system
    • The above in real life example, an older test desktop I have which has never been reinstalled, only upgraded:
      • I installed Windows 7 in 2009, sysprepped Users to E:, used it a few years, updated often, Users were always on E:
      • When Windows 8 was released I moved Users back to C:, upgraded to 8, sysprepped Users back to E:. Updated normally
      • When Windows 8.1 was released, I again moved first Users back to C:, upgraded to 8.1, moved Users back to E:. Updated normally, used it like that about a year
      • A month ago Windows 10 TP Build 9841 was published. Sysprepped Users back to C:, upgraded to 10 Build 9841, sysprepped Users back to E:, updated normally
      • A week ago new version, Build 9860 was released. Users back to C:, upgrade to Build 9860, Users to E:, updating normally
      • Since installing 7 back in 2009 I have as told above sysprepped Users back to C: and again to E: 4 times, two of them in last month. You only have to do this when the Windows version changes, not when you update your existing Windows version. The issue with testing a preview OS is that the version changes are more regular, each new build is a completely new OS requiring Users back to C: before you can upgrade
      My System SpecsSystem Spec


  9. Joined : Oct 2013
    A Finnish ex-pat in Germany
    Posts : 9,076
    Windows 10 Pro
       2014-11-12 #9

    warning   Warning
    Third Windows Technical Preview build, build 9879 was released today (12-NOV-2014). The sysprep method described in this tutorial has worked perfectly from Vista to W10TP build 9860 but this latest build seems to have issues with it. The method does not work, I have now tested past hours all possible scenarios.

    I believe this is a temporary issue and will again be fixed in later builds. I also continue searching for a solution. In the mean time, please do not use this method!

    For now you can use the registry editing method as told in this tutorial on our sister site the Seven Forums: http://www.sevenforums.com/tutorials...-location.html

    I have tested the above method now with build 9879 and it works without issues

    Kari
      My System SpecsSystem Spec


 
Page 1 of 86 1231151 ... LastLast


Similar Threads
Tutorial Category
"Folder access denied" C:\Users\<truncated name>\One Drive
Unable to delete folder, unable to change permissions, and unable to get One Drive to read to Documents folder correctly. I have attempted five times and each time it fails. So I try to delete the One Drive folder so I can reboot and try again,...
General Support
Solved Cannot move documents folder
I am trying to move my documents folder from the external drive I put it on before installing Win10. It looks like its going to move, then says its done but nothing has moved. Any ideas?
General Support
More Users Move to Windows XP Ahead of Windows 10 Launch
Source
Windows 10 News
Solved Startup Folder Location
Exactly where is the Startup Folder for Windows 10 located? Thank you.
General Support
Solved Linking to Users folder on different drive
Hello, Has anyone had any trouble linking the C:\users folder on another machine? I have successfully done this all the last 3 installs of windows I have done following these instructions: How To Change User Profile Location in Windows 8 without...
General Support
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 03:41.
Find Us
Twitter Facebook Google+



Windows 10 Forums