我正在尝试安装一个只能由某些用户访问的注册表项。安装程序的其他部分都可以工作(它安装一个服务并注册一个组件)。这是片段。
<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" />
<RegistryValue Type="string" Name="Key" Value="SecretKey" />
</RegistryKey>
</RegistryKey>
</Component>安装程序完成后,所有用户都可以读取密钥(而不仅仅是管理员)。我要安装的命令行是:
msiexec /i installer.msi /l*v installlog.txt日志中对权限只字不提。当我在Orca中打开数据库时,LockPermissions表显示了权限行,看起来没有问题。
我做错了什么?
发布于 2011-02-15 12:21:10
在我将权限条目添加到每个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>但它有锁定整个Software\ZZZ密钥的副作用。不太理想,但我可以解决这个问题。
发布于 2015-08-10 23:31:48
如果在多个组件中创建值,或者创建中间键(Software\XXX和Software\XXX\YYY),请确保所有和都有一个子元素。
https://stackoverflow.com/questions/4980452
复制相似问题