Windows Installation Tips: Moving User Folder To Another Drive

Why move user folder to another drive?

Solid-state drives (SSD) are known for their performance, but its price is not cheap. Hard disk drive (HDD), on the other hand, have slower performance, but it can offer you much larger storage space at a cheaper price. A lot of user choose a SSD+HDD combination. By this way, they can garner performance and large storage space at one place.

With this combination, it is recommended to install only the operating system (OS) and application software in SSD due to precious storage space. The remaining files would be some application data, personal documents, pictures, and media files, which can be quite large and used less often, and therefore they should be stored in the hard disk drive. The result is a faster boot time and snappier application launches, while the documents and files can be accessed at normal speed.

Steps to move user folder to another drive or partition:-

The following steps are applicable for Windows 7 and 8.

  1. Boot from your windows installation CD.
  2. During the installation, when asked to locate a partition to install Windows, choose the whole SSD.
  3. Next, at some point when the installer asks for the username and machine name, do not enter it yet.
  4. Press the key combination: Ctrl + Shift + F3. Windows will reboot into Audit mode. Audit mode creates a temporary administrator account and it shows a normal desktop.
  5. The Sysprep.exe GUI will pop up and offer to restart Windows in Out-of-Box-Experience (OOBE) mode, which is to resume the normal installation process. Do not choose to restart.
  6. We want to move the C:/Users and C:/ProgramData folders to the hard disk drive. Identify the drive letter of the hard disk drive (eg: "D:\").
  7. If the drive letter does not exist, you need to partition and format the hard disk drive. In current Audit mode, just right-click on "Computer" icon, and select "Manage" to open the Computer Management console. Under Storage->Disk Management, you can create a partition and assign it a drive letter.
  8. An answer file, or unattend.xml (hint: "unattended installlation"), can be used to ask Windows to move the Users and ProgramData folders to another partition. The content of a unattend.xml file, for relocating the folders to D:\ drive, is shown below:
    <?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>
                   <ProgramData>D:\ProgramData</ProgramData>
               </FolderLocations>
           </component>
       </settings>
       <cpi:offlineImage cpi:source="wim:E:/sources/install.wim#Windows 8 Pro" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    
  9. Using another computer, copy the above content into Notepad, save it as "unattend.xml" and put the file in a pendrive. You may need to modify three things:
    1. Change the drive letter D: in "D:\Users" and "D:\ProgramData" to reflect the hard disk drive letter.
    2. Change the drive letter E: in "wim:E:/sources/install.wim#Windows 8 Pro"  to reflect the installation CD drive letter.
    3. Change the operating system name in "wim:E:/sources/install.wim#Windows 8 Pro" to the windows version you are installing. Some choices are: Windows 7 HOMEPREMIUM, Windows 7 PROFESSIONAL, Windows 7 ENTERPRISE, Windows 7 ULTIMATE, Windows 8, and Windows 8 Pro.
  10. Plug in the pendrive to the computer which you are performing the installation on. Identify the location of the unattend.xml file in your pendrive, eg: F:\unattend.xml
  11. Open a command prompt and run the following command:
    C:\Windows\System32\Sysprep\Sysprep.exe /audit /reboot /unattend:F:\unattend.xml
  12. Once again, Windows reboot back into Audit mode. In the Sysprep.exe GUI which pops up, choose to initialize the OOBE mode.
  13. Continue until the installation is done.
  14. Now, you will see the D:\Users and D:\ProgramData folders being created. It is suggested that you create the Junctions, C:\Users and C:\ProgramData, to redirect another program that may try to write in the default path. Execute the following in a command prompt:
    mklink /J C:\Users D:\Users
    mklink /J C:\ProgramData D:\ProgramData
    
  15. Finally, the relocation is done. Your Libraries folder (i.e. Documents, Music, Pictures, and Videos), Downloads, and Desktop are located in the hard disk drive.