Skip to content

Instantly share code, notes, and snippets.

@bseddon
Created April 1, 2025 10:04
Show Gist options
  • Save bseddon/8c70a197f49b67da32716d810b2830da to your computer and use it in GitHub Desktop.
Save bseddon/8c70a197f49b67da32716d810b2830da to your computer and use it in GitHub Desktop.
Moving windows profile storage location

By default Windows stores user profile data within the c:\Users<username> folder. Because this default location is on C: which is often the system drive, the drive can easily run out of space. Moving them to a different drive using a junction addresses this problem.

To do this, a user's files have to be moved to a different location and then delected from c:\Users so a junction to the new location can be created. But a user can't delete their own files because they are being... used.

If its possible to boot to safe mode then this is an option but on a live server this may not be an option. In such a case, another administrator can do it for you but can it be done without requiring a different admin? Yes but the account being used does need to be a member of the Administrators group.

First change the registry entry for your user so it points to a nonexistent location. The registry key for all user profiles is:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\

This key shows a list of user SIDs. You can find yours by looking at the key 'ProfileImagePath' in each one. This key holds the path to each user's profile. Once found, change is maybe by adding a suffix. Anything so long as the path is unique.

Signout and sign back in again. You will be allowed when one of two things will happen. Either you will have a new profile or you will be given a temporary profile. Either way, the prior profile folder is not used so can now be moved. I recommend using the xcopy command below so all file ACLs are maintained. The location shown of d:\Users works for me but you might need to use a different location. is the name of the profile folder previously used.

xcopy /I /E /K /O /Y /H /C /B /Q /D c:\Users<username> d:\Users<username>\

Then delete the original c:\Users<username> folder and create a junction:

mklink /j c:\Users<username> d:\Users<username>

Finally, go back to the registry key and set it back to c:\Users<username> and reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment