How to determine if a registry key exists in Wix

旧巷老猫 提交于 2019-12-23 19:28:12

问题


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?


回答1:


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>


来源:https://stackoverflow.com/questions/1439442/how-to-determine-if-a-registry-key-exists-in-wix

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!