Searching through child registry keys
Hello,
I am currently developing an installer which installs 3 different softwares. Before I install them, I want to check the registry entry for each of them to see if they have already been installed. Currently I have one logic in place which checks the specified registry key, when provided the root and the main key, I loop through under main key to see if I can find the required key.
I encountered one more scenario where the key I am looking for may exist under any of the key, which are under main key.
for ex: I have installed a piece of SOFTWARE-A on my system. Earlier it was version 1.6 what I had on my system and it had a registry entry under HKLM like "SOFTWARE\SOFTWARE-A\1.6\Client". Here I am interested to know If the key "Client" exists.
I upgraded SOFTWARE-A to 1.7 and the registry entry of it also changed and now the "Client" key shows up under 1.7.
In this scenario when I upgraded, a new key 1.7 was created and the "Client" is under it but the earlier key 1.6 is still showing up under the registry and it is empty, it does not have anything under it.
In this case I know the main key till SOFTWARE-A (SOFTWARE\SOFTWARE-A\) under HKLM and I want to check if key "Client" is available under any of the keys under main key.
Can anyone help me in this?