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

cheeseman picture cheeseman · Feb 23, 2012 · Viewed 9.9k times · Source

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.

Answer

MethodMan picture MethodMan · Feb 23, 2012

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)