move "Users" to another drive

Windows 7 Update Pack discussion.
Post Reply
Posts: 1
Joined: Mon Apr 13, 2009 2:37 am

move "Users" to another drive

Post by electron2 » Wed Mar 23, 2011 10:50 am

To move c:\users to d:\users
works best for c:=ssd d:=hard drive
For this to work best it needs to be done after a "clean install" without any updates.

Moving Windows and Program Files folders is not recommend by Microsoft.
However, moving both Users and ProgramData folders is safe and can save a lot of space on system disk. Pictures, mp3’s videos, documents and so on, a user folder with its subfolders can be tens, sometimes hundreds of gigabytes.

Clean install as user of choice. Shown as "UserName".

Boot into your user account.
Make 'Adminmove' account with full admin rights.
Log out of 'username' and log into 'Adminmove'
Run command prompt as Admin.
At the prompt issue the following commands:

xcopy C:\Users D:\ /v /q /i /s /e /h /x /y :: to copy c:\Users to d:
xcopy C:\ProgramData D:\ /v /q /i /s /e /h /x /y :: to copy c:\ProgramData to d:
:: ProgramData is a hidden folder in the system drive and needs to be moved to keep c: small and static.
cd d:\ :: to change active folder to d: root
D: :: to select the D: drive
attrib ProgramData +H :: to set the hidden attribute on D:\ProgramData folder

Run regedit as Admin

Change the registry to alter the location for new user accounts
-- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList]
-- Replace all '%SystemDrive%' with 'D:' for all keys I.E.

Default = D:\Users\Default
ProfilesDirectory = D:\Users
ProgramData = D"\ProgramData
Public = D"\Users\Public

Boot into the 'UserName' account.
Check envirment vars in command prompt with "set" command.
With the current user shown as "UserName"
The following vars should be as shown bellow:

CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files

If system vars are as above then
Delete "adminmove" user.
do not save files.
Delete c:\Users.

System ready for updates and third party installs.

The best way I have found.
It needs to be used at "a clean install" of OS because not all apps are frendly to d:\users but they will install any needed folders in c: and then they will run fine.
this will reduce the installed size of C: to less than 30Gig, and it should not grow very much at all.
I suggest a 60Gig SSD with read and write in the 2xxMb range to make a "VERY" fast system.
Millard M Watson, II

User avatar
Posts: 824
Joined: Thu May 18, 2006 5:56 am
Location: Cambridgeshire, UK

Post by mr_smartepants » Wed Mar 23, 2011 2:25 pm

Why not just use symbolic links? ... ile_system

With the /D flag, mklink creates a directory symbolic link. This is just a symbolic link that points to a whole directory rather than a file. You would generally use such a link the same way you would use a shortcut to a directory. As an example, it could look like this:

mklink /D D:\Photos \\\photos
Some heroes don't wear capes, they wear Kevlar and dog-tags!

Posts: 1131
Joined: Wed Sep 14, 2005 11:31 am

Post by newsposter » Wed Mar 23, 2011 8:25 pm

yup, using symlinks to shift the position of users takes about a gnatstail worth of time and maintains the expected c:whatever file path structures.

It's also worth noting that with ntfs you can format a disk and 'mount' it as a direct directory path without a drive letter.

Plenty of ways to do this without resorting to overly complex methods that date back to DOS 6 and Win98.

Post Reply