3

I want to determine if a Registry key exists in Wix. I cannot make any assumptions about value names in that key, but at least one exists. Default value is not set. Is it possible to check if the key exists (and optionally, if it has any values) without using custom actions?

Juozas Kontvainis
  • 9,461
  • 6
  • 55
  • 66
  • 1
    Answer is you can't, see this for more information: [http://stackoverflow.com/questions/1327203/in-wix-how-do-i-test-for-the-existence-of-a-registry-key-not-value-for-oracle][1] [1]: http://stackoverflow.com/questions/1327203/in-wix-how-do-i-test-for-the-existence-of-a-registry-key-not-value-for-oracle – Casper Leon Nielsen Oct 26 '12 at 12:08
  • http://stackoverflow.com/questions/1327203/in-wix-how-do-i-test-for-the-existence-of-a-registry-key-not-value-for-oracle – Casper Leon Nielsen Oct 26 '12 at 12:08

1 Answers1

6

Have a look at the RegistrySearch

Sample of use:

    <Property Id="MYRegSearch" Value="AVaLue" Secure="yes">
        <RegistrySearch Id="RegSearch" Root="HKLM" Key="Software\!(wix.Manufacturer)\!(wix.ShortProduct)" Name="Values" Type="raw"/>
    </Property>
Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
CheGueVerra
  • 7,849
  • 4
  • 37
  • 49