“ICE38:组件安装到用户配置文件"特定组件的错误 [英] "ICE38: Component installs to user profile" error for a specific component

查看:19
本文介绍了“ICE38:组件安装到用户配置文件"特定组件的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 WiX 3.6 中编写一个 Windows Installer 脚本,并且只使用每台机器和 x64 架构设置.我有以下项目结构(缩短):

I am trying to write a Windows Installer script in WiX 3.6 with a per-machine and x64 architecture only setting. I have the following project structure (shortened):

<Directory Id="ProgramFiles64Folder" Name="PFiles">
    <Directory Id="APPLICATIONFOLDER" Name="My Company">
      <Directory Id="ProductFolder" Name="My Product">
        <Component Id="MainComponent" Guid="" Win64="yes" KeyPath="yes">
            ...
        </Component>
        <Directory Id="DataFolder" Name="Data">
          <Directory Id="Machine" Name="Machine" >
            <Directory Id="MachinesFolder" Name="Machines">
              <Component Id="Machine1" Guid="{74341536-72DF-48C3-95E8-2851D9FA8318}" Win64="yes" KeyPath="yes">
                        ...
              </Component>
            </Directory>
            <Directory Id="TemplateFolder" Name="Template">
              <Component Id="TemplateFiles" Guid="{A0D0C225-D604-4B84-971D-41687A30EC36}" Win64="yes" KeyPath="yes">
                <File Id="Template1.rsbak" Source="$(var.SolutionDir)bin\Release\File1.rsbak" />
                            ...
              </Component>
            </Directory>
          </Directory>
        </Directory>
      </Directory>
    </Directory>
</Directory>

问题是我收到错误 ICE38: Component TemplateFiles installs to user profile.当我编译时,它必须使用 HKCU 下的注册表项作为其 KeyPath,而不是 TemplateFiles 组件的文件.让我感到困惑的是,我在另一个项目(工作)中使用了类似的结构,并且在我的项目中有几个具有完全相同设置的组件(上面未显示).当所有其他组件都正确安装时,为什么这个 - 并且只有这个 - 组件坚持安装到用户配置文件,到程序文件?

The problem is that I receive the error ICE38: Component TemplateFiles installs to user profile. It must use a registry key under HKCU as its KeyPath, not a file for the TemplateFiles component when I compile. What confuses me is that I use a similar structure in another project (working), and have several components with the exact same setup in my project (not shown above). Why does this - and this only - component insist on installing to the user profile when all others get installed correctly, to Program Files?

推荐答案

看起来 msiProgram FilesUsers\UserName\Documents 之间有显着差异 文件夹.您的示例中引用了最后一个:

Looks like there's significant difference for msi between Program Files and Users\UserName\Documents folders. The last is referenced in your example:

<Directory Id="DataFolder" Name="Data">

我遇到了类似的问题,并在博客文章中找到了答案 - https://robmensching.com/blog/posts/2007/4/27/how-to-create-an-uninstall-shortcut-and-pass-all-the/

I came to the similar problem and found an answer in the blog post - https://robmensching.com/blog/posts/2007/4/27/how-to-create-an-uninstall-shortcut-and-pass-all-the/

简而言之,您需要将 HKCU 根上的 RegistryKey 定义为 Component 的子元素,并将 RemoveFolder 元素添加为Directory 的子元素.有关完整示例,请参阅上面的链接.另外:

In short you need to define RegistryKey on HKCU root as subelement to Component and add RemoveFolder element as subelement to Directory. See the link above for full example. In addition:

  • Component 元素中移除 KeyPath 属性
  • RemoveFolder 可能必须为所有文件夹定义.为此,我使用了内部没有文件的虚拟组件
  • Remove KeyPath attribute from Component element
  • RemoveFolder possibly have to be defined for all folders. I used dummy component with no file inside for that

这篇关于“ICE38:组件安装到用户配置文件"特定组件的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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