winutil icon indicating copy to clipboard operation
winutil copied to clipboard

Relocate Users folders to different partition

Open IgorKerstges opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. On an existing Windows 10/11 would like to be able to re-register the default user profile to a different partition (nót "C:").

Describe the solution you'd like Allow to relocate and re-register default location of the user data to a partion which will not be affected when re-installing windows.

Mind:

  1. This can be achieved with a parameter-driven unattended answerfile for sysprep
  2. 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 sysprep tells windows to move the User's data-location to a specific drive, after the reboot Windows might find that intended target drive for Users folder has another drive ID letter and the intended drive D: is now E:. Sysprep fails and windows needs a reinstall.

To be able to use the chosen partition for the relocated Users folder we need to set the drive letters manually before sysprep is run. Re-Set any drive-letter for optical drives to a new drive-letter (i.e. "O:" as in "O"ptical).

For guidance A: example unattended answer file:

<?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>

For guidance B: running sysprep for this change ("d:\relocate.xml" is the unattended answerfile):

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

For guidance C: Don't forget to clean up after done.

Describe alternatives you've considered Details are found at: https://www.tenforums.com/tutorials/1964-move-users-folder-location-windows-10-a.html I have executed these steps many times, but as a manual process. It works very reliable.

IgorKerstges avatar Jan 20 '23 09:01 IgorKerstges

id also like this, i do it for every windows install so the only thing on that drive is windows itself and the base apps i use that come with it

d0x360 avatar Feb 25 '23 09:02 d0x360

Dig adding this to the utility section with autologin.

ChrisTitusTech avatar Jul 23 '23 20:07 ChrisTitusTech

Closed due to inactivity

github-actions[bot] avatar Feb 21 '24 00:02 github-actions[bot]