PDA

View Full Version : Deep search in registry



Kotiomkin
01-15-2009, 08:19 AM
Hi all
how to search inside of a registry key and all its subkeys looking for a specific value stored inside a subkey?

Ex.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\

and under Uninstall "folder" there are some other sub folders (that I don't know its name...) like follow:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{0001B4FD-9EA3-4D90-A79E-FD14BA3AB01D}

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{03FC0591-AD81-4C50-B2B7-E0BA232AA64E}

...

I want to start searching inside this looking for a value of ProductGuid that must be equal to some string that I want to search.

Note that the only string that I know are:
the "path" ('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall'), the name od the registry value ('ProductGuid ') and its value ('xxxx').

Could you help me to find an alghoritm that search inside all registry subfolder?

Thanks!

RobertDickau
01-15-2009, 10:52 AM
If you're working with InstallScript, perhaps look into RegDBQueryKey?