Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to determine if a registry key exists in Wix

Tags:

registry

wix

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?

like image 241
Juozas Kontvainis Avatar asked Jan 28 '26 14:01

Juozas Kontvainis


1 Answers

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>
like image 113
CheGueVerra Avatar answered Feb 01 '26 05:02

CheGueVerra