Changing the Default Drive to Store User Profiles and Data from C to D in Windows 10


In this post we will look at how to change the default drive to store user data from C to another drive like D.
Login to the machine and copy the following code into a file called "relocate.xml" - preferably in D Drive.
[pre class="brush:bash"]
<?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>
</unattend>
[/pre]
  • Open admin cmd
    [pre class="brush:bash"]net user Administrator /active:yes[/pre]
  • Create a password for the Administrator account if you are going to remote login
  • Sign out 
  • Sign into your admin account
  • Open admin cmd
    [pre class="brush:bash"]cd C:\Windows\System32\sysprep
    sysprep.exe /oobe /reboot /unattend:D:\relocate.xml[/pre]
  • This will reboot the machine and then you will have to setup an account
  • Open cmd as admin
    [pre class="brush:bash"]net user Administrator /active:no[/pre]
  • Sign out from the temporary account
Source:  https://www.tenforums.com/tutorials/1964-move-users-folder-location-windows-10-a.html

You may also interested in reading:

No comments:

Post a Comment