cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
IS-mike
Level 2

System Search: Find registry key (Basic MSI)

Hello everybody!

I have the problem that I want to search for a product which must not be installed on the same machine where my product will be installed.
Therefore I am using the "System Search" functionality using the "Search for registry key" method.

Here are my parameters:
Registry Root: HKEY_CLASSES_ROOT
Registry Key: Installer\Products\52F9BF50AE8512A4E863F9E2305EB041
Registry Value:

Then I am storing the result in a property called "NOTALLOWEDPRODUCTS" using the option to store it as an Install Condition.
Well, my problem is that the error message is ALWAYS displayed (message from the created Install Condition) no matter if the key I am searching for exists... I also tried different setting different values, e.g. "ProductName" or "Version" but with no result.

I also tried to change the condition expression to NOTALLOWEDPRODUCTS<>"" or NOTALLOWEDPRODUCTS or Not NOTALLOWEDPRODUCTS but neither worked... Well why should it work because the property is ALWAYS set to "" when I write the value using [NOTALLOWEDPRODUCTS] in a message box. But I can prove that the key is existing, because the "regedit" tool on my Windows XP finds it.

All help or hints would be really appreciated.

Thanks very much,
Mike
Labels (1)
0 Kudos
(3) Replies
Holger_G
Level 10

Have you checked the property table?
0 Kudos
mberterm
Level 7

When searching for a registry key, the 'Registry entry' selection in the System Search Wizard, you must define a value.

From your example:
Registry Root: HKEY_CLASSES_ROOT
Registry Key: Installer\Products\52F9BF50AE8512A4E863F9E2305EB041
Registry Value:

Unless you define a registry value, it looks to the key's default value. If this is undefined (and I think merely being empty/'value not set' produces the same result), the search fails and no property will be defined.

If I understand the scenario correctly, this is expected MSI behavior.
0 Kudos
RobertDickau
Flexera Alumni

(As an aside, that registry search depends on an undocumented MSI implementation detail; arguably better techniques would be a detect-only major upgrade item or a system search for a component unique to that product...)
0 Kudos