C# loop through the registry searching for keys containing certain text

10,605

Try looking at this StackOverFlow Link it appears that the individual has come up with a way to look for "VisualStudio" hope this helps

How to Query Registry for a Specific Key(s)

Share:
10,605
deepseapanda
Author by

deepseapanda

Updated on June 04, 2022

Comments

  • deepseapanda
    deepseapanda over 1 year

    Is it possible to go through the registry and copy the names of all keys found with a certain text?

    For example, say I had keys under SOFTWARE of item1, item2, item fred, item34 etc. Am I able to do a search under software for all keys containing the word item and save their name to a variable, where I can later display these items on a winform of detected software.

    Microsoft.Win32.RegistryKey pathKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SOFTWARE");
    

    Not that I want someone to code it for me, rather give me a starting place for the loop.