AS detailed in this guide: http://www.tenforums.com/tutorials/1964-users-folder-move-location-windows-10-a.html, I've moved my Users directory from the default C:\Users to D:\Users. I used this answer file, which I saved as relocate.xml:

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






<cpi:offlineImage cpi:source="wim:X:\sources\install.wim#Windows 10 Pro" xmlns:cpi="urn:schemas-microsoft-com:cpi" />


But I also figure that I need to move ProgramData as well. So to the relocate.xml, I added:


at the line 7.

When I do this command:

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

It runs Sysprep, but after it asks me to enter my settings, the system just seems to get stuck in a loop. Unlike when I use the original relocate.xml as it was in the guide, which completes and logs me to a new account.

A general search about relocating the ProgramData directory doesn't seem to lead to any guides. So what's the reason for not having a straight-forward way of relocating ProgramData?


I have discovered the same issue even when it is documented as a valid parameter seems it does not.

There is a work around though. You can copy the entire folder (programdata) to your new destination (I would use a winpe boot and use robocopy to preserve everything exactly the same)

Something like

robocopy "C:\ProgramData" "D:\ProgramData" /E /ZB /DCOPY:T /COPYALL /R:1 /W:1 /V /TEE

After that you can delete the programdata folder and add a junction to it

mklink /j "C:\ProgramData" "D:\ProgramData"

Just remember that this could not work in some scenearios, I would try on a clean installation or a virtual machine first.

  • I'm in the exact boat as the OP. This IS a valid workaround. Why is this downvoted? – Shaamaan Nov 12 '16 at 11:13

Since this question comes up high on Google when searching for information about unattended answer files, I decided to add another reply even though the question is old.

The Official Documentation on Unattended Answer Files clearly states:

ProgramData - Specifies the path to the program-data folder.

Warning Use this setting only in a test environment. If you change the default location of the program-data folders to a volume other than the system volume, you cannot service your image. Any updates, fixes, or service packs may not be applied to the installation.

I therefore assume (even though I haven't tested it) you get stuck in a boot loop as you tried to install all latest updates during the isntallation process, which keeps failing and windows keeps re-trying.

Since this is known and documented behaviour, the only solution to this is relocating the folder by other means (see @Varacolaci's reply for an example) or keep it at the default location.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.