Questions

Registry: Error opening key - can't delete it

+
0 Votes
Locked

Registry: Error opening key - can't delete it

marshall1956
I have a key in the registry I can't open or delete. I get the error message "Error opening key - Cannot open keyname: Error while opening key."

I have read as many posts as I can find but no help. Everyone talks about being sure you have adminstrator rights, assigning right to the key, safe mode. No one seems to have any ideas after that. I've tried booting into safemode, signing on my account with administrative privileges or the default adminstrator acoount. I've tried to assign the key Full Control and check box to replace all child objects for Administrator and All Accounts, and it works for all but the problem key, get error message: "Registry editor could not set security in the key currently selected, or some of its subkeys."

This all started when I tried to update Windows Media Player to version 11 so I can download and play files from my TIVO. I have version 10 and they say I have to upgrade to version 11 to play the files. In running the upgrade it always fails at the very end. The log file gives the error message as access denied on the key HKLM\Software\Microsoft\Mediaplayer\Settings\MP3encoding\lowrate. One suggestion given to me to fix it was to delete the key in question and reinstall. Well I can't access HKLM\Software\Microsoft\Mediaplayer\Settings so there are no subkeys. I tried to open all the subkeys under HKLM\Software\Microsoft\Mediaplayer and I can open everyone except ...\Settings and ...\Player\CDData. I can open ...\Player\Extensions.
How do I fix or delete or rename the key in question? I'm in safe mode, I'm in the administrator account, I've tried to change the permissions for the parent key and give to the child key, so please don't suggest doing that again. I can't rename it or insert another key with the same name.
When Mediaplayer 11 fails it resets to Mediaplayer 10 which still works, but I'm frustrated that I can't access or change the keys in question.
Windows XP SP2, McAfee antivirus, I've scanned with Spybot S&D and Adware-SE.
  • +
    0 Votes
    Jacky Howe

    using Regedit.exe to do this or Regedt32.exe.
    Regedt32.exe gives you a lot more control over the Registry.

    +
    0 Votes
    marshall1956

    I thought with WinXP that regedit32 went away and just have regedit now.

    +
    0 Votes

    Did

    Jacky Howe

    you try it. regedt32.exe

    +
    0 Votes
    marshall1956

    I went to Start/Run, regedt32.
    Started regedit, the same program that runs when I run regedit: Microsoft Registry Editor v 5.1. Get the same errors.

    +
    0 Votes
    Jacky Howe

    http://support.microsoft.com/kb/313222

    It will allow you to set the Registry Settings back to default.

    To reset the registry permissions, add this to the secedit command line:

    /areas REGKEYS

    +
    0 Votes
    alxcsby

    Try running a program like boostxp to root out bad registry keys and delete them. Then maybe try a reinstall.
    Just a thought, probably not the answer you'd want though.

    +
    2 Votes
    bojek

    Hey, I had similiar problems with not being able to remove keys. After many reads, tries I came up with this solution:

    1. on key that gives you msg "error deleting key", add yourself with full control to permission, apply
    2. go advanced, owner tab, check "replace owner on...", click OK, you'll get an error but just ignore it
    3. refresh, that will give you access to subkey
    4. now you'll be able to able to change permissions on the subkey and eventually delete the lowest subkey

    follow these step to delete each level of keys individaully.

    I know it's painful and lots of clicking but can be done.

    Please post reply if helped
    thanks

    +
    0 Votes
    pdesrivieres

    I also am having the problem that several keys are corrupted and I can't delete them. I think this is related to my computer losing power while shutting down.
    First I go into regedit/regedt32 as an admin user. When I right-click on one of the keys an select Permission... I get the message that I don't have access to view the permissions but may change them. I give Everyone full control and hit OK but then I get an error message that I can't save the changes to the permissions. I click Cancel and hit F5(refresh). I'm still unable to access or delete the key!

    +
    0 Votes
    tt111r

    Here is the step I use to unlock the key using regedit:
    1) right click on the problem key
    2) select Permission and click OK
    3) add yourself to Group or user names
    4) give yourself Full Control
    5) click Advance
    6) Choose Owner tab
    7) Change Owner to yourself and check the box to Replace owner ... and click OK
    Ignore the Access denied error message
    9) click OK twice
    10 Voila, you have full access

    Tony

    +
    0 Votes
    sdubbs

    I just wanted to reply letting you know that this worked for me also. I did get the access denied error trying to apply it. I had the choice to retry or cancel. I hit cancel and then ok out of the permissions area and voila -- full access.

    +
    0 Votes
    marshall1956

    Following your advice I was finally able to delete the keys. I had to try it several times on each key so not sure why it didn't work first time. On one key I had to right click key and chose exppand option and a hidden subkey opened up which I could own and delete, then I could delete the parent.

    +
    0 Votes
    jdmcguire

    Dude, you rule! I followed your solution exactly and it didn't work the first time. But I went back in and suddenly whereas I could not see any users listed in the permissions window now I could see two. A numbered account name and the SYSTEM account - I gave permissions to both and hit apply.
    I then added a couple of accounts like Administrators (local) and my own user account. I repeated the process you outlined and this time when I hit F5 and refreshed the problem key, a sub key appeared under it. I performed the same routine on that key and was able to delete the key! Thanks Man! I almost disregarded this post because it seemed illogical. Good work dude!

    +
    0 Votes
    javierx2010

    It works! Thanks!

    +
    0 Votes
    locoulysses

    I signed up for this site just to thank you. This is the only solution that works, of many, many hours of searching. This should be spread around the whole internet, and I intend to do it. Thank you again!

    +
    0 Votes
    Tayvl

    When I choose "Permissions", the tab contains the message "Unable to Display Security Information". In other words, no way to edit permissions.

    +
    0 Votes
    seanferd

    or something is broken.

    Operating system & version? Which registry key?

    +
    0 Votes
    Tayvl

    Something certainly is broken.
    Windows XP Pro SP3

    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\xxxxxxx (2 sub-keys under 2 separate keys under "CLSID". RegSweep indicates that they both have "invalid class identifier format". I'm suspecting it's from a virtual device added by Magic ISO at some point, but that's just a guess.)

    EDIT: I should have noted that only those 2 keys don't allow me to delete. I have full permission on any other key. AND... when I click on either key I get the error message "Cannot open {xxxxxxx....xxx}: Error while opening key."

    It's as if one part of Windows knows it's there and another part knows it's not there...

    +
    0 Votes
    IC-IT

    if you started a new question. ;-)

    +
    0 Votes
    MsLadyRed

    I backed up my registry before trying this. Even though the key was showing in regedit, when I looked at my backup, the key was not there! I tried your steps here and wowziers, it worked! I was in to the key and saw all that was there. When I again backed up my registry, the key showed up. Since this is a work computer I don't mind saying, I was VERY concerned! Now it looks like I will have a MUCH better work day today than I did yesterday. Thanks so much!!!!

    +
    0 Votes
    rrajeshkannan

    Hi, I am not the person who originally posted this issue. But, I also faced the same problem on a different key. Your solution worked for me. Thanks.

    Rajesh

    +
    0 Votes
    sgt_shultz

    have you tried exporting that key or a portion of the registry with the bad part?
    or the whole thing?
    export usually will skip corrupt keys. how you get it back as the new hklm registry, i'd have to go look up at mskb.
    say, can you delete ANY keys?
    other thought--a system restore ought to put back an uncorrupted, pre mp 11 registry.
    i also had problems with mp 11. bet they fix the bug soon, maybe it'll fix the corrupt key also.
    third thought - what if you constructed a registry snippet named same as bad key and imported it. wouldn't that overwrite the bad key?

    +
    0 Votes
    pdesrivieres

    I can export the registry and it does skip the corrupted keys. I get an error if I try to import the reg file. I also tried adding the corrupted key to the reg file but with the minus sign indicating it should be deleted, to no avail!

    +
    0 Votes
    pdesrivieres

    I tried resetting permissions on the corrupted keys using secedit to no avail.
    I have tried several problems that claim to fix registry problems but they only deleted invalid(hopefully, some can cause more problems) keys that are accessible.
    I'll try the programs you have suggested and report back.

    +
    0 Votes
    pdesrivieres

    I tried RegASSASSIN 1.02. If I gave it the keyname it claimed to successfully delete the key but the key remained. If I tried to delete the accessible parent(with delete all subkeys selected) of the inaccessible key, it said it could not delete the key.

    I tried RelDelNull v1.1 but it did not find any registry keys with embedded nulls.

    +
    0 Votes
    IC-IT

    be worth a shot. Choose with command prompt.
    At the prompt type in the regedit.exe command and try again to take over the permissions and delete the key.
    Or type explorer.exe and run the RegAssassin.

    +
    0 Votes
    ctrservices

    reading the above, but did you try in Safe Mode? Also, System Restore, as mentioned above often works wonders.

    +
    0 Votes
    pdesrivieres

    I did not try deleting the registry keys in Safe Mode but others did to no avail.

    I have System Restore disabled as I have read that it sometimes really messes up your system when used.

    +
    0 Votes
    Jacky Howe

    it may help you out.

    http://tinyurl.com/2rbyj8

    +
    0 Votes
    menikalavera

    Same problem here, registry was messed. I couldn't register mp3 files via windows explorer and/or add/delete any other registry key. Now it's ok thanks to this:

    secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose

    copy all this (i don't know what it means andhow it works exactly but it's ok) and start>run>cmd right click and paste. It takes a while but works.
    I hope it helps. Let me know

    +
    0 Votes
    pdesrivieres

    Your suggestion resets security settings back to the defaults; see:
    http://support.microsoft.com/kb/313222

    I'll give this a try.

    +
    0 Votes
    jaimohan

    I found this solution on another forum and it finally got me out of the registry mess I was in. Use the systernals psexec.exe file to grant permission to the registry editor. psexec.exe is part of the (free) systernals suite from microsoft here:

    http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx

    Below is an example of a batch file that I run to start registrar (rr.exe) my registry editor. You can of course use this with any registry editor including regedit.

    Start ?? ?e:\psexec\psexec.exe? -i -d -s ?c:\Program Files\Registrar Registry Manager\rr.exe?

    You can now delete any registry entry (including legacy keys).

    Btw, the Registrar Lite is a terrific (free) registry editor; among other things allowing you to search for detritus from uninstalls better & quicker than any reg cleaner. You can find it here

    http://www.resplendence.com/download/RegistrarLite.exe

    (IMHO, the free version is just as functional as the paid version, save for minimal nag screens).

    Thanks
    VJ

  • +
    0 Votes
    Jacky Howe

    using Regedit.exe to do this or Regedt32.exe.
    Regedt32.exe gives you a lot more control over the Registry.

    +
    0 Votes
    marshall1956

    I thought with WinXP that regedit32 went away and just have regedit now.

    +
    0 Votes

    Did

    Jacky Howe

    you try it. regedt32.exe

    +
    0 Votes
    marshall1956

    I went to Start/Run, regedt32.
    Started regedit, the same program that runs when I run regedit: Microsoft Registry Editor v 5.1. Get the same errors.

    +
    0 Votes
    Jacky Howe

    http://support.microsoft.com/kb/313222

    It will allow you to set the Registry Settings back to default.

    To reset the registry permissions, add this to the secedit command line:

    /areas REGKEYS

    +
    0 Votes
    alxcsby

    Try running a program like boostxp to root out bad registry keys and delete them. Then maybe try a reinstall.
    Just a thought, probably not the answer you'd want though.

    +
    2 Votes
    bojek

    Hey, I had similiar problems with not being able to remove keys. After many reads, tries I came up with this solution:

    1. on key that gives you msg "error deleting key", add yourself with full control to permission, apply
    2. go advanced, owner tab, check "replace owner on...", click OK, you'll get an error but just ignore it
    3. refresh, that will give you access to subkey
    4. now you'll be able to able to change permissions on the subkey and eventually delete the lowest subkey

    follow these step to delete each level of keys individaully.

    I know it's painful and lots of clicking but can be done.

    Please post reply if helped
    thanks

    +
    0 Votes
    pdesrivieres

    I also am having the problem that several keys are corrupted and I can't delete them. I think this is related to my computer losing power while shutting down.
    First I go into regedit/regedt32 as an admin user. When I right-click on one of the keys an select Permission... I get the message that I don't have access to view the permissions but may change them. I give Everyone full control and hit OK but then I get an error message that I can't save the changes to the permissions. I click Cancel and hit F5(refresh). I'm still unable to access or delete the key!

    +
    0 Votes
    tt111r

    Here is the step I use to unlock the key using regedit:
    1) right click on the problem key
    2) select Permission and click OK
    3) add yourself to Group or user names
    4) give yourself Full Control
    5) click Advance
    6) Choose Owner tab
    7) Change Owner to yourself and check the box to Replace owner ... and click OK
    Ignore the Access denied error message
    9) click OK twice
    10 Voila, you have full access

    Tony

    +
    0 Votes
    sdubbs

    I just wanted to reply letting you know that this worked for me also. I did get the access denied error trying to apply it. I had the choice to retry or cancel. I hit cancel and then ok out of the permissions area and voila -- full access.

    +
    0 Votes
    marshall1956

    Following your advice I was finally able to delete the keys. I had to try it several times on each key so not sure why it didn't work first time. On one key I had to right click key and chose exppand option and a hidden subkey opened up which I could own and delete, then I could delete the parent.

    +
    0 Votes
    jdmcguire

    Dude, you rule! I followed your solution exactly and it didn't work the first time. But I went back in and suddenly whereas I could not see any users listed in the permissions window now I could see two. A numbered account name and the SYSTEM account - I gave permissions to both and hit apply.
    I then added a couple of accounts like Administrators (local) and my own user account. I repeated the process you outlined and this time when I hit F5 and refreshed the problem key, a sub key appeared under it. I performed the same routine on that key and was able to delete the key! Thanks Man! I almost disregarded this post because it seemed illogical. Good work dude!

    +
    0 Votes
    javierx2010

    It works! Thanks!

    +
    0 Votes
    locoulysses

    I signed up for this site just to thank you. This is the only solution that works, of many, many hours of searching. This should be spread around the whole internet, and I intend to do it. Thank you again!

    +
    0 Votes
    Tayvl

    When I choose "Permissions", the tab contains the message "Unable to Display Security Information". In other words, no way to edit permissions.

    +
    0 Votes
    seanferd

    or something is broken.

    Operating system & version? Which registry key?

    +
    0 Votes
    Tayvl

    Something certainly is broken.
    Windows XP Pro SP3

    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\xxxxxxx (2 sub-keys under 2 separate keys under "CLSID". RegSweep indicates that they both have "invalid class identifier format". I'm suspecting it's from a virtual device added by Magic ISO at some point, but that's just a guess.)

    EDIT: I should have noted that only those 2 keys don't allow me to delete. I have full permission on any other key. AND... when I click on either key I get the error message "Cannot open {xxxxxxx....xxx}: Error while opening key."

    It's as if one part of Windows knows it's there and another part knows it's not there...

    +
    0 Votes
    IC-IT

    if you started a new question. ;-)

    +
    0 Votes
    MsLadyRed

    I backed up my registry before trying this. Even though the key was showing in regedit, when I looked at my backup, the key was not there! I tried your steps here and wowziers, it worked! I was in to the key and saw all that was there. When I again backed up my registry, the key showed up. Since this is a work computer I don't mind saying, I was VERY concerned! Now it looks like I will have a MUCH better work day today than I did yesterday. Thanks so much!!!!

    +
    0 Votes
    rrajeshkannan

    Hi, I am not the person who originally posted this issue. But, I also faced the same problem on a different key. Your solution worked for me. Thanks.

    Rajesh

    +
    0 Votes
    sgt_shultz

    have you tried exporting that key or a portion of the registry with the bad part?
    or the whole thing?
    export usually will skip corrupt keys. how you get it back as the new hklm registry, i'd have to go look up at mskb.
    say, can you delete ANY keys?
    other thought--a system restore ought to put back an uncorrupted, pre mp 11 registry.
    i also had problems with mp 11. bet they fix the bug soon, maybe it'll fix the corrupt key also.
    third thought - what if you constructed a registry snippet named same as bad key and imported it. wouldn't that overwrite the bad key?

    +
    0 Votes
    pdesrivieres

    I can export the registry and it does skip the corrupted keys. I get an error if I try to import the reg file. I also tried adding the corrupted key to the reg file but with the minus sign indicating it should be deleted, to no avail!

    +
    0 Votes
    pdesrivieres

    I tried resetting permissions on the corrupted keys using secedit to no avail.
    I have tried several problems that claim to fix registry problems but they only deleted invalid(hopefully, some can cause more problems) keys that are accessible.
    I'll try the programs you have suggested and report back.

    +
    0 Votes
    pdesrivieres

    I tried RegASSASSIN 1.02. If I gave it the keyname it claimed to successfully delete the key but the key remained. If I tried to delete the accessible parent(with delete all subkeys selected) of the inaccessible key, it said it could not delete the key.

    I tried RelDelNull v1.1 but it did not find any registry keys with embedded nulls.

    +
    0 Votes
    IC-IT

    be worth a shot. Choose with command prompt.
    At the prompt type in the regedit.exe command and try again to take over the permissions and delete the key.
    Or type explorer.exe and run the RegAssassin.

    +
    0 Votes
    ctrservices

    reading the above, but did you try in Safe Mode? Also, System Restore, as mentioned above often works wonders.

    +
    0 Votes
    pdesrivieres

    I did not try deleting the registry keys in Safe Mode but others did to no avail.

    I have System Restore disabled as I have read that it sometimes really messes up your system when used.

    +
    0 Votes
    Jacky Howe

    it may help you out.

    http://tinyurl.com/2rbyj8

    +
    0 Votes
    menikalavera

    Same problem here, registry was messed. I couldn't register mp3 files via windows explorer and/or add/delete any other registry key. Now it's ok thanks to this:

    secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose

    copy all this (i don't know what it means andhow it works exactly but it's ok) and start>run>cmd right click and paste. It takes a while but works.
    I hope it helps. Let me know

    +
    0 Votes
    pdesrivieres

    Your suggestion resets security settings back to the defaults; see:
    http://support.microsoft.com/kb/313222

    I'll give this a try.

    +
    0 Votes
    jaimohan

    I found this solution on another forum and it finally got me out of the registry mess I was in. Use the systernals psexec.exe file to grant permission to the registry editor. psexec.exe is part of the (free) systernals suite from microsoft here:

    http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx

    Below is an example of a batch file that I run to start registrar (rr.exe) my registry editor. You can of course use this with any registry editor including regedit.

    Start ?? ?e:\psexec\psexec.exe? -i -d -s ?c:\Program Files\Registrar Registry Manager\rr.exe?

    You can now delete any registry entry (including legacy keys).

    Btw, the Registrar Lite is a terrific (free) registry editor; among other things allowing you to search for detritus from uninstalls better & quicker than any reg cleaner. You can find it here

    http://www.resplendence.com/download/RegistrarLite.exe

    (IMHO, the free version is just as functional as the paid version, save for minimal nag screens).

    Thanks
    VJ