How do I replace/repair riched20.dll in Windows Vista?

Recently, I've been receiving all kinds of error messages regarding the riched20.dll file in the c:\windows\system32 directory.  I want to repair/replace it, but Windows Vista will not let me rename or move the file even with administrator permission.

One recent error when trying to run a nVidia Forceware driver upgrade I get is "The procedure entry point RichEdit10ANSIWndProc could not be located in the dynamic link library RICHED20.dll."

I also try to unregister the .dll but it won't let me do that telling me it can't find the entry point.  I've Googled this to death and can't find a fix.  Please help!!

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Do a system restore
you might want to reboot in the Safe mode (press F8 while booting) and try to replace the file (or boot into another OS if you have dual-boot).

you can get the file from many sites, just google "RICHED20.dll download" and pick a site that's free.

System Restore is also worth a try, assuming that you know the approximate date this problem started happening.
elronAuthor Commented:
Interestingly, I was unable to change, delete or move the files even when I rebooted into my other partition with WindowsXP.  The files were STILL locked.

I found a solution from the how-to geek, however and this is very useful for anyone needing to change a system file in Windows Vista.

Start a DOS console as administrator and perform the following.

First, you need to take ownership of the file:

takeown /f <filename>

You then need to give yourself full access to the file:

cacls <filename> /G <username>:F
where the username is your login name

Now you should be able to move or copy the file as needed, and it solved my problem.

Thanks for the suggestions.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Vista

From novice to tech pro — start learning today.