beware of moving Profiles and User data

In Vista (and Win7) beware of moving Profiles (and so) User data to another drive without doing some reading….

This used to work fine in XP with the standard My Document>Properties>Move>yes

UPDATE: Found MS knowledgebase on this where they say its possible,

BUT DON’T SUPPORT IT, OR RECOMMEND IT. Blah

http://support.microsoft.com/kb/949977

Various alternative methods are discussed in detail here http://joshmouch.wordpress.com/2007/04/07/change-user-profile-folder-location-in-vista/,  and I have quoted extensively from that article, but the outcome of this long discussion is that I would opt to only do this when rebuilding Vista.

As an aside, I learnt a useful tip from the thread – as well as the fact that MS has finally caught up with ‘Nix and has symbolic links…

To get a CMD prompt with Administrative privileges, all you need to do is:
1, Click the Start Button
2, Type ‘CMD’ in the Start Search box
3, Press and hold down [Ctrl]+[Shift]+[Enter]
You should then be able to create the links you need (symbolic links)  such as:

http://www.howtogeek.com/howto/windows-vista/using-symlinks-in-windows-vista/

Or use the tool LINKD

Get the tool LINKD.exe from Windows Server 2003 Ressourcekit tools. Copy it to c:\
Start Vista from CD into repair mode Konsole window or you can use BartPE or a second Windows XP/Vista installation.
Now rename c:\users into c:\users.old
type LINKD c:\users D:\Users
Now copy all files from c:\users.old into c:\users Restart.

The thread starts back in 2007, and continues right to the present day. Some ppl have had success using mklink

1) Created a new partition (“d”) for my data.
2) Backed up up my drive (just in case).
3) Loaded the Windows Vista installation disk and got to the command prompt.
4) Once at the command prompt, I entered the following commands:
robocopy C:\Users D:\Users /MIR /E /XJ [Enter]
rmdir /S /Q C:\Users [Enter]
rmdir “C:\Documents and Settings” [Enter]
mklink /J C:\Users D:\Users [Enter]
mklink /J “C:\Documents and Settings” D:\Users [Enter]
The robocopy took about 15 minuted for 5 gigs worth of data. The other commands took no time at all.
5)I exited and rebooted.
6)Voila. I was good to go.


When I look in my c partition, I see “junction pointers” for c:\Users and c:\Documents and Settings both pointing to d:\Users.
Everything seems smooth and I haven’t noticed any slow down.

Then some success:

Richard on January 22, 2009

I think you guys all think Vista is a real new OS. It is much more simple than any of the above optiosn to move a profile directory and maintain its rights.

First I did as others mentioned. I changed the default location of users in the registry (HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList). I set the Default, ProfilesDirectory and Public keys to point at a seperate volume. (in my case D:\Users}. I then copied the C:\Users\Default and C:\Users\Public directories to the target (D:\Users in this case).

Then I created a dummy admin, and logged in as my dummy admin, confirmed the location of the new admin profile in the secondary volume (i.e. D:\Users\Dummy)

Now the trick: I first set my file view to allow my dummy admin to see invisible, hidden and system files. Then I right-click the Computer icon (or go to System in the Control Panel), select Properties and then choose Advanced System Properties. In the Advanced tab is a User Profiles section. Click the Settings button and you can move each profile right there, Be sure to move the profile to the same folder name. So if you are moving user JDoe and his profile is C:\Users\JDoe then make sure to move it to the same folder (i.e. d:\Users\JDoe). This will move the whole profile and keep the same user rights! No screwing around with command line or anything. In the registry make sure all your user profiles point to the right folders now. The user profiles will start with S-1-5-21-(lots of numbers) usually. If you see Short names like S-1-15-18, those are Service profiles, leave those be, only edit your user profile paths. Now log back in a your migrated user and enjoy.

Caveat: Because you did not change the rights of the original C:\Users\profile directory you will not be able to rename or remove C:\Users. This isn’t a big deal as you are not using it anyway.

Richard on January 22, 2009

Actually a correction to the above. You can actually log in as the migrated user and delete the old C:\User\ profile of that specific user, since they still own the folder.
I menation that for the guy who had a 100 gig profile above. And sorry this still requires a copy.

Some arguments continues as to whether symbolic link should or should not be used, and success with Win7 has been reported:

cdr on October 2, 2009

In our school we have dual boot xp/vista computers.
This is how we move the entire Vista User profiles folder to a different partition
(E: in our case).
First we do a regular Vista installation.
Then we run the following startup script:
REM robocopy the user profiles folder to E:
robocopy C:\Users E:\Users /MIR /E /XJ /COPYALL /DCOPY:T
REM remove user profiles folders/link from C:
rmdir /S /Q C:\Users
rmdir “C:\Documents and Settings”
REM create on C: symbolic links that refer to E:
mklink /J C:\Users E:\Users
mklink /J C:\Documents and Settings” E:\Users
We activate this script with a local policy (gpedit.msc): Computer configuration – Windows settings
– Scripts – Startup. We also enable two other options: Computer configuration – Administrative
Templates\System\Scripts\Run startup scripts asynchronously and Run startup scripts visible.
The script has to be a computer startup script in order to run it before any profile is loaded.
After we reboot the pc and the script has run once, we remove all previously mentioned settings.
We’ve been doing this for some time and until now everything seems to work fine.

Comments are closed.