如何修复 ICE57.Per-User 安装 [英] How to fix ICE57.Per-User installation

查看:14
本文介绍了如何修复 ICE57.Per-User 安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的应用程序在运行时将一些设置写入注册表到 HKCU 配置单元中.我想在卸载过程中删除此设置.这是代码:

Our application writes some settings to the registry into the HKCU hive during runtime. I want to delete this settings during uninstall. Here is code:

  <Fragment>
    <DirectoryRef Id="INSTALLLOCATION" DiskId="1" FileSource="$(var.SourceDirProject)\">
      <Component Id="DeleteHkcuManufacturerHive" Guid="GUID">
        <Condition>REMOVE="ALL" AND NOT UPGRADINGPRODUCTCODE</Condition>
        <CreateFolder/>
        <RemoveRegistryKey Action="removeOnUninstall"
 Id="HKCUkey" Root="HKCU" Key="Software\$(var.Manufacturer)"/>
      </Component>
    </DirectoryRef>
  </Fragment>

ICE57:组件DeleteHkcuManufacturerHive"具有每个用户和每个机器的数据以及每个机器的 KeyPath.
为什么我得到 ICE57?安装是按用户进行的.提前致谢.

ICE57: Component 'DeleteHkcuManufacturerHive' has both per-user and per-machine data with a per-machine KeyPath.
Why I'm getting ICE57? Installation is per-User. Thank's in advance.

UPD: 每台机器的元素在哪里?可能是 INSTALLLOCATION=Program Files\ManufacturerDirectory?

UPD: Where is here the per-machine element? May be it is an INSTALLLOCATION=Program Files\ManufacturerDirectory?

推荐答案

我在 wix-users 邮件列表. 这是 Peter Shirtcliffe 的回答:

I've got an answer on wix-users mailing list. Here is Peter Shirtcliffe's answer:

ProgramFiles 是每台机器的位置.您只能在提升时访问它.如果要在每用户安装中安装程序代码,则应安装到 %LocalAppData%\Programs.

ProgramFiles is a per-machine location. You can only access it when elevated. If you want to install program code in a per-user installation, you should install to %LocalAppData%\Programs.

完全消除条件.该组件将被安装,但在您卸载应用程序之前不会生效.此时,当组件被删除时,registrykey 也将被删除.

Remove the condition entirely. The component will be installed but will have no effect until you uninstall the application. At that point, when the component is removed, the registrykey will be removed also.

这篇关于如何修复 ICE57.Per-User 安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆