Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

C# How to find a registry entry with a changing name

idonotcare

New Coder
Hi, sorry if this is a dumb question, I'm making a program that deletes specific registry entries/keys. But the entries name is not the same always. How can I ensure that I find and delete the correct entry and not something critical?

Example. Entry is located at "Computer\HKEY_CURRENT_USER\Software\Microsoft", and its name is "thisentry" when I delete it
its name changes to "thatentry". I need to find it on demand but can't no longer find it by searching for "thisentry"
 
There is no definitive answer to this question since the name of a registry entry can change for any number of reasons. However, one possible way to find a registry entry with a changing name is to use a registry editor tool to search for all entries that have been modified within a certain time frame. This will allow you to see all entries that have been created or modified recently, which may include the entry you are looking for.
 
It's not a dumb question, it just seems a dangerous thing to do. Why does the name of the registry entry change, specifically when you delete it ? Is this indeed a Microsoft key ? Those you typically want to stay clear of. Or is it your "own" key ? In which case perhaps you might be better off working in some less sensitive registry branch ? How and why exactly does the name change ? Is there a pattern to it that you can implement ?
More questions than answers I'm afraid...
 
Hi, sorry if this is a dumb question, I'm making a program that deletes specific registry entries/keys. But the entries name is not the same always. How can I ensure that I find and delete the correct entry and not something critical?

Example. Entry is located at "Computer\HKEY_CURRENT_USER\Software\Microsoft", and its name is "thisentry" when I delete it
its name changes to "thatentry". I need to find it on demand but can't no longer find it by searching for "thisentry"
Just seen this... sorry for the extremely long time lol... but is there a particular reason why you would want to delete registry keys?
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom