View Single Post
  #3 (permalink)  
Old 05-30-2008
reinux reinux is offline
 

Join Date: May 2008
Posts: 2
reinux is on a distinguished road
Thanks: 0
Thanked 0 Times in 0 Posts
Really easy, robust way to move the Program Files and Users folders
Hey people, I figured out a good way to do this.

Start the computer with the Vista installer CD and run the system recovery tool -- specifically, the command prompt. Windows will have some files in the Users and Program Files folders locked, so it has to be done from another OS instance.

First we xcopy the Users and Program Files folders to the destination drive; then we rename (or remove) the original folders and replace them with junctions (EDIT: use symbolic links instead!) pointing to the copied folders. For all intents and purposes, Vista becomes oblivious to the fact that anything had moved. You don't have to tinker with the registry.

I think this trick would probably work for Windows XP as well.

I've made a .bat script that does this; you can either use this or punch everything in in the command prompt yourself. %1 is assumed to be the source drive and %2 is assumed to be the destination drive. Be sure to specify these parameters before you run the script.

Code:
%2 cd \ mkdir "Program Files" cd "Program Files" %1 xcopy "%1\Program Files" %2 /s /h rename "Program Files" "Program Files_" mklink /d "Program Files" "%2\Program Files" %2 cd \ mkdir "Users" cd "Users" %1 xcopy "%1\Users" %2 /s /h rename "Users" "Users_" mklink /d "Users" "%2\Users"
Sample usage would be as follows:
Code:
movefolders.bat c: b:
Hope this helps,

Rei


Edit: Looks like this causes some complications with certain updates. The workaround here: Vista: Windows Update Error 80070011 Semi-Automated Fix - Moblog[csuccess]=moderate

Edit 2: Don't use junctions; use symbolic links instead. That seems to work flawlessly. When you call mklink, use /d instead of /j.

Edit 3: Nevermind, that got me a little further but still doesn't work completely. It might be better to move just the Users folder and leave the Program Files folder as it is; just install new apps to the other volume.

Edit 4: I ended up just copying the Program Files folder back to let the updates run.

Last edited by reinux : 06-01-2008 at 22:22. Reason: Switched to using symbolic links
Reply With Quote