Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wix - How to get the default value of a registry key

Fairly straight forward question but can't seem to find an example on the net.

Currently I have the following wix snippet which, although the default value is set in the hkcr.gz registry key, is simply setting PREV_GZ_DEFAULT_APP to a blank empty string.

<Property Id="PREV_GZ_DEFAULT_APP">
   <RegistrySearch Id="Current_GZ_DEFAULT_APP"
                  Root="HKCR"
                  Key=".gz"
                  Name="(Default)"
                  Type="raw" />
</Property>

Any one know what's wrong with this code?

like image 943
Ben Cawley Avatar asked Sep 15 '25 00:09

Ben Cawley


1 Answers

"(Default)" isn't a real name. To get the key's default value, just omit the Name attribute.

like image 88
Bob Arnson Avatar answered Sep 17 '25 00:09

Bob Arnson