The steps I use are as follows. I moved
ProgramData to another drive.
1) boot into system disk, access command prompt, find your old
C:\ Drive, and make a note of the destination drive letter
robocopy /copyall /e /xj Users <CURRENT_LETTER_OF_DESTINATION_DRIVE>:\Users
robocopy /copyall /e /xj ProgramData <CURRENT_LETTER_OF_DESTINATION_DRIVE>:\ProgramData
Rename Users Old_Users
Rename ProgramData Old_ProgramData
attrib desktop.ini -S -H
Rename desktop.ini desktop.ini.old
This keeps a copy of your users folder as "Old_Users". I moved this elsewhere as a backup. If you don't change the
.ini file you might not be able to distinguish the two folders later!
rmdir /s /q Users and
rmdir /s /q ProgramData if you are clearing the space.
mklink /J Users <USUAL_LETTER_OF_DESTINATION_DRIVE>:\Users
mklink /J ProgramData <USUAL_LETTER_OF_DESTINATION_DRIVE>:\ProgramData
rmdir "Documents and Settings"
mklink /J "Documents and Settings" "<USUAL_LETTER_OF_DESTINATION_DRIVE>:\Documents and settings"
Now when you restart windows all should be OK.
If you make a mistake, you might end up with a broken user profile.
In that case, go to safe mode (or another user) and open
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. Your old user profile will probably be in the list with a
.bak extension, and a new dummy one in its place. Delete the dummy profile and rename the
.bak key without the "bak".
You may then encounter several security errors. I had to also do the following:
icacls "%programdata%\Microsoft\Internet Explorer\Quick Launch" /SetIntegritylevel (OI)(CI)Medium
icacls "%userprofile%\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch" /SetIntegritylevel (OI)(CI)Medium
icacls "%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu" /SetIntegritylevel (OI)(CI)Medium
The ownership of my files also changed somehow and I needed to use "Take ownership", or "Properties/Security/Advanced/Owner/Edit/Replace owner on subcontainers" to get everything working.