[wix-users] Multiple RegistrySearch under Property element

Tigran Galoyan tigran.galoyan at gmail.com
Tue Jun 20 10:21:57 PDT 2023


Hi folks,

I found this question asked at some forums, but I couldn't find a final
answer to it.

Let's say I have multiple registry search elements defined under a Property
element:

<Property Id="MyProp">
  <RegistrySearch Id="Reg1" Root="HKLM" Key="SomePath1"
Name="Reg1Name" Type="raw" />
  <RegistrySearch Id="Reg2" Root="HKLM" Key="SomePath2"
Name="Reg2Name" Type="raw" />
  <RegistrySearch Id="Reg3" Root="HKLM" Key="SomePath3"
Name="Reg3Name" Type="raw" />
</Property>


As far as I can understand the order I have them listed inside Property is
not guaranteed and whichever search results in a value last, that will be
assigned to MyProp (the last one overwrites the previous assignment).
However, my question is what if one of the searches resulted to some value
and was assigned to MyProp, but the last search didn't find anything, no
result, then will MyProp value be assigned NULL or the last successful
search assignment will stay intact and MyProp will have a value at the end.

Thank you in advance.

Best,
Tigran


More information about the wix-users mailing list