加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

使用WiX添加multiString注册表值?

发布时间:2020-12-14 01:49:18 所属栏目:Windows 来源:网络整理
导读:现在我使用这样的东西: Component Id="RegistryEntries" Guid="guid" KeyPath="yes" RegistryKey Root="HKCU" Key="path" Action="createAndRemoveOnUninstall" RegistryValue Name="myStrings" Action="append" Type="multiString" 1 /RegistryValue Regis
现在我使用这样的东西:
<Component Id="RegistryEntries" Guid="<guid>" KeyPath="yes">  
  <RegistryKey Root="HKCU" Key="<path>" Action="createAndRemoveOnUninstall">  
    <RegistryValue Name="myStrings" Action="append" Type="multiString">  
      1  
    </RegistryValue>  
    <RegistryValue Name="myStrings" Action="append" Type="multiString">  
      2
    </RegistryValue>  
    <RegistryValue Name="myStrings" Action="append" Type="multiString">  
      3
    </RegistryValue>  
    <RegistryValue Name="myString" Value="x" Type="string"/>  
  </RegistryKey>  
</Component>

但我有下一个错误:

主键“reg< key>”在表’注册表’中重复.请删除其中一个条目或重命名主键的一部分以避免冲突.

答案:Yan’s之后回答我的xml看起来像:

<Component Id="RegistryEntries" Guid="<guid>">
  <RegistryKey Root="HKCU" Key="<path>" Action="createAndRemoveOnUninstall">
    <RegistryValue Name="myStrings" Action="append" Type="multiString">
      <MultiStringValue Name="myStrings" Action="append" Type="multiString">  
        1
      </MultiStringValue>
      <MultiStringValue Name="myStrings" Action="append" Type="multiString">  
        2
      </MultiStringValue>
      <MultiStringValue Name="myStrings" Action="append" Type="multiString">  
        3
      </MultiStringValue>
    </RegistryValue>
    <RegistryValue Name="myString" Value="x" Type="string"/>
  </RegistryKey>
</Component>
使用 MultiStringValue元素.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读