After deleting a registry key, I try to re-create it, in C#.
I sometimes get the error:
“Illegal operation attempted on a registry key that has been marked for deletion.”
I tried putting in a delay before re-creating it, but didn’t help.
Any tips?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is still an open handle to the key, so even though it has been marked for deletion, it has not yet been purged. So, you can close any handles that you have which reference the key, or better yet, just modify it instead of deleting it first.