Windows XP Service Pack 2 (SP2) gave my dad the “access is denied” error. We found a Microsoft suggestion about what to do, but that is really complex and basically involves running the SP2 update, finding which Registry Key can’t be opened, fixing that problem, and then running it again.
Only this forum entry had a more reasonable suggestion: Go to start -> run, then type
secedit /configure /cfg %windir%repairsecsetup.inf /db secsetup.sdb /verbose
This resets your security policy, so that registry keys that may have given you errors like “Error while opening key” will be reset.