Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to move my C:\ProgramData folder in a Windows 7 installation to D:\ProgramData.

I understand how to make the symlinks and registry changes so this works. My problem is that I'm unable to copy the files in the ProgramData folder because the OS seems to have some of them locked.

Specifically, the files in the C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys folder are blocking the move.

Am I out of luck here? Is there any way to move the folder, create the symlink, and update the registry without any of the files in these folders being locked?

share|improve this question
    
Aside from doing it off-line (i.e. remove the drive and do it on another machine), I don't think this is possible. –  user3463 Dec 17 '09 at 12:49
    
Could you expand on "doing it off-line"? Right now I have 2 drives, an SSD that has win7 on it and a normal drive that has XP on it. In other words, I can still boot into the XP drive and copy the ProgramData from the win7 drive onto the winXP drive without locking issues. My question is: if I do this and go in and change the registry settings on 7, will I risk rendering the win7 installation useless? –  thinkzig Dec 17 '09 at 13:23

2 Answers 2

Move the Profile and ProgramData

start from Windows 7 DVD and choose to repair Windows, open Command Prompt (CMD) and type:

move the "Users" folder to the second partition by this command.

  1. ROBOCOPY "C:\Users" "D:\Users" /COPYALL /MIR /XJ.

move the "ProgramData" folder to the second partition by this command.

  1. ROBOCOPY "C:\ProgramData" "D:\ProgramData" /E /COPYALL /MIR /XJ.

delete the "Users" folder from C: partition.

  1. RMDIR "C:\Users" /S /Q

make Junction link to Profile folder in second partition.

  1. MKLINK /J "C:\Users" "D:\Users"

delete C:\ProgramData (ignore any failed massage)

  1. RMDIR "C:\ProgramData" /S /Q

open the Registry Editor and change the profile values to the new path.

  1. REGEDIT.

navigate to this path: HKEY_LOCAL_MACHINE -SOFTWARE -Microsoft -Windows NT -CurrentVersion -ProfileList and change the values to the new path.

after windows restart open CMD as Administrator and delete C:\ProgramData

  1. RMDIR "C:\ProgramData" /S /Q

make Junction link to ProgramData folder in second partition.

  1. MKLINK /J "C:\ProgramData" "D:\ProgramData"
share|improve this answer

Caveat: I've never done what you are asking before, but...

You can get easily get around the copy problem by down loading a Linux Live CD such as Ubuntu, and booting from it. You will be able to access your drive, and copy the folder from one location to the other.

When you reboot you can make the registry changes, reboot, and thereafter you ought to be able to delete the original.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.