Howto remove Windows 7n MachineKeys restored to alternate location?

06
2014-04
  • DonGar

    1) I backed up a Windows 7 Pro computer to a network drive.

    2) I restored all of the files to the computer, to an alternate location. C:\Users\Me\Desktop\Restore

    3) After going through the restored files, I tried to delete the Restore folder, but get a dialog saying that Administrator permissions are needed. I grant them, then get "Folder Access Denied" because I need permissions from my account to make changes.

    4) Digging around I find that I can delete everything inside Restore except: Restore\C\ProgramData\Microsoft\Crypto\RSA\MachineKeys*

    5) I'm unable to delete, rename, assume ownership, or modify permissions on the files in the MachineKeys folder.

    6) Sadness and gnashing of teeth ensues.

  • Answers
  • DonGar

    While writing up this question, it occurred to me to try and move the MachineKeys folder outside of the Restore folder.

    This worked, and I was then able to delete the folder.

    I still had to delete each folder inside Restore by hand instead of deleting the entre sub-tree in one pass, but I was able to delete them.


  • Related Question

    Moving Windows 7 ProgramData folder after installation
  • thinkzig

    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?


  • Related Answers
  • Aharon Don

    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"
  • CJM

    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.