Windows 7 Move the Users and Program Files Directories To A Different Partition

Wed, Aug 5, 2009

Misc, Windows

  1. After installing windows 7 you will be greeted with a user creation prompt press shift+f10 and you should get a cmd window up like in the image belowcmduser
  2. Copy the Users Profiles, Program Files And ProgramData Folders onto the Partition you want to use
    robocopy "C:\Users" "D:\Users" /E /COPYALL /XJ
    robocopy "C:\Program Files" "D:\Program Files" /E /COPYALL /XJ
    robocopy "C:\ProgramData" "D:\ProgramData" /E /COPYALL /XJ
  3. Delete the old folders and create links
    For Program Files:

    rmdir "C:\Program Files" /S /Q
    mklink /J "C:\Program Files" "D:\Program Files"

    For the User Profiles:

    rmdir "C:\users" /S /Q
    mklink /J "C:\users" "D:\users"

    and lastly ProgramData:

    rmdir "C:\ProgramData" /S /Q
    mklink /J "C:\ProgramData "D:\ProgramData"

    If you have any permissions issues while deleting C:\ProgramData don't worry about them just try to delete it and make the links again after first reboot

  4. Now open regedit simply by typing regedit on the cmd window
  5. To change the program files path navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion and edit the ProgramFilesDir and CommonFilesDir as needed
    regeditproc
  6. For the user profiles you'll need to go to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\ProfileList and again edit the paths as needed
    regeditprof
  7. Exit Regedit and the cmd window
  8. Continue to create your user
  9. Reboot your machine and you should be good to go
, , , , , ,

This post was written by:

Duffy - who has written 48 posts on Tuts4Tech.

I am the owner of this website, please feel free to ask me any questions you have

Contact the author

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

51 Responses to “Windows 7 Move the Users and Program Files Directories To A Different Partition”

  1. Duffy
    Duffy Says:

    Hi The Man,
    Your final recommendation of the imaging would work however would still break the windows search feature.

    Hardlinks no matter what would be broken even if copied as they will not work unless they are on the same partition.

    This is somewhat like the moving of winsxs debate seen at http://aspoc.net/archives/2007/12/05/how-to-move-the-winsxs-directory-in-vista/

    To conclude, it works, doesn't show any viable OS cripplingly effects, if the user wants to do it then that is their choice.

    Reply


Leave a Reply