Since Vista, Microsoft implemented a more serious protection system concerning core operating system files, preventing many of the accidental or malicious changes that were possible in older versions, including Xp.
Because of this, replacing, editing, deleting or making any changes to protected files is a tedious task, requiring the additional step of obtaining the appropriate rights and permissions on the files first.
Gaining ownership and permissions on protected operating system files in Windows 7 is not a recommended procedure, but it’s sometimes required and needed.
There are several methods of obtaining permissions, ranging from using running commands in a command prompt to actually performing the file change outside of the operating system itself (and beyond its protection).
But the simplest method I found so far and the easiest to use is provided by Ultimate Windows Tweaker (local copy of UWT v2.2).
Under Tweak Settings you can find two Take Ownership checkboxes, first one covering folders and the second for files. Check both and click Apply to activate the two commands in the folders/files context menu.
Now you can use the Take Ownership functionality on any file or folder to grant yourself the proper permissions and perform the necessary operations.