Wix RegistryKey Permission

Deadly 提交于 2019-12-04 19:27:42

It seemed to start working after I added the permission entry to each RegistryValue.

<Component Id="cmpXXX" Guid="{YYY}">
    <RegistryKey Root="HKLM" Key="Software\ZZZ" Action="createAndRemoveOnUninstall">
        <RegistryKey Key="Machine" Action="createAndRemoveOnUninstall">
            <Permission User="Administrators" GenericAll="yes" />
            <RegistryValue Type="string" Name="ID" Value="SecretID">
                <Permission User="Administrators" GenericAll="yes" />
            </RegistryValue>
            <RegistryValue Type="string" Name="Key" Value="SecretKey">
                <Permission User="Administrators" GenericAll="yes" />
            </RegistryValue>
        </RegistryKey>
    </RegistryKey>
</Component>

But it has the side effect of locking down the entire Software\ZZZ key. Less than ideal, but I can work around that.

If you create values in multiple components, or you create intermediate keys (Software\XXX and Software\XXX\YYY) make sure that all the and have a child element.

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