为什么我们在每台机器安装中收到非广告快捷方式的 ICE57 错误? [英] Why do we get an ICE57 error for non advertised shortcuts in per machine installations?

查看:20
本文介绍了为什么我们在每台机器安装中收到非广告快捷方式的 ICE57 错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题是询问 ICE57 验证器之一是否创建了误报错误报告.

This question is asking whether one of the ICE57 validators creates a false positive error report.

我正在使用 WIX 3.9 生成安装程序.我想要一个带有非广告快捷方式的每台机器安装.

I am using WIX 3.9 to generate an installer. I want a per machine installation with non advertised shortcuts.

这个 WXS 示例安装了一个文本文件和一个打开文本文件的快捷方式:

This WXS example installs a text file and a shortcut to open the text file:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*" Name="ShortcutTest" Language="1033" 
           Version="1.0.0.0" Manufacturer="Widget Co" 
           UpgradeCode="--YOUR GUID1--">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate EmbedCab="yes"/>

    <Feature Id="ProductFeature" Title="ShortcutTest" Level="1">
      <ComponentRef Id="TextFile" />
      <ComponentRef Id="ShortCut" />
    </Feature>

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLFOLDER" Name="ShortcutTest">
          <Component Id="TextFile" Guid="--YOUR GUID2--">
            <File Id="File" Name="TextFile.txt" Source="TextFile.txt" KeyPath="yes"/>
          </Component>
        </Directory>
      </Directory>

      <Directory Id="ProgramMenuFolder">
        <Directory Id="ApplicationProgramsFolder" Name="Shortcut Test">
          <Component Id="ShortCut" Guid="--YOUR GUID3--">
            <RegistryValue Root="HKMU" Key="Software\WidgetCo\ReadMeTextFile\TextFile" Name="Installed" Type="string" Value="yes" KeyPath="yes"/>
            <Shortcut Id="Shortcut"
                Name="Open Text File"
                Description="Opens a text file"
                Target="[INSTALLFOLDER]TextFile.txt"
                WorkingDirectory="INSTALLFOLDER"/>
            <RemoveFolder Id="ApplicationProgramsFolder" Directory="ApplicationProgramsFolder" On="uninstall"/>
          </Component>
        </Directory>
      </Directory>
    </Directory>
  </Product>
</Wix>

如果您将上述示例构建到 MSI 包中,您将获得此 内部一致性评估器 (ICE) 错误:

If you build the above example into an MSI package, you get this Internal Consistency Evaluator (ICE) error:

D:\Robert\Documents\Visual Studio 2013\Projects\ShortcutTest\Product.wxs(27,0): error LGHT0204: ICE57: Component 'ShortCut' 具有每用户数据和一个可以是每一个的键路径- 用户或每台机器.

D:\Robert\Documents\Visual Studio 2013\Projects\ShortcutTest\Product.wxs(27,0): error LGHT0204: ICE57: Component 'ShortCut' has both per-user data and a keypath that can be either per-user or per-machine.

ICE57 暗示每用户和每台机器数据之间的不一致.但是,组件的关键路径是 HKMU,它在每台机器安装中解析为 HKLM (HKEY_LOCAL_MACHINE).快捷方式的位置来自ProgramMenuFolder",它在每台机器安装中解析为 C:\ProgramData\Microsoft\Windows\Start Menu\(在 Windows 8.1 上).该组件的所有资源似乎都没有任何用户关联.

ICE57 is implying an inconsistency between per-user and per-machine data. But, the key path of the component is HKMU, which in a per machine installation resolves to HKLM (HKEY_LOCAL_MACHINE). The location of the shortcut derives from 'ProgramMenuFolder', which in a per-machine installation resolves to C:\ProgramData\Microsoft\Windows\Start Menu\ (on Windows 8.1). None of the component's resources appear to have any per-user association.

您可以通过抑制 ICE57 将安装程序包构建到 MSI 中.生成的 MSI 包安装没有任何明显错误.多个用户可以登录并访问快捷方式.任何用户都可以卸载该包,该包中的所有资源都将被删除.

You can build the installer package into an MSI by suppressing ICE57. The resulting MSI package installs without any obvious errors. Multiple users can log on and access the shortcut. Any user can un-install the package and all of the resources in the package are removed.

Wix 创建非广告快捷方式的答案所有用户/每台机器 有一个有趣的解决方法,即编写广告的快捷方式,然后关闭广告.似乎是一种创建非广告快捷方式的方法.

The answer to Wix create non advertised shortcut for all users / per machine has an interesting workaround, which is to author advertised shortcuts and then turn off advertising. Seems a round about way of creating un-advertised shortcuts.

ICE57 错误的常见修复方法是将 根目录更改为 HKCU (HKEY_CURRENT_USER).然而,这会创建一个安装程序,在卸载时可能会留下用户注册表项.例如,如果用户 A 安装了该程序包,则会将一个注册表项添加到用户 A 的注册表配置单元中.如果用户 B 删除包,则不会从用户 A 的注册表配置单元中删除注册表项.

A common fix for the ICE57 error is to change the <RegistryValue...> root to HKCU (HKEY_CURRENT_USER). However this creates an installer that can leave a user registry key behind when un-installed. For example if user A installs the package, a registry entry is added to user A's registry hive. If user B removes the package, the registry entry is not removed from user A's registry hive.

在这种情况下,ICE57 错误是内部一致性评估器中的错误吗?或者有什么我没有理解的地方?

In this scenario is the ICE57 error a bug in the Internal Consistency Evaluators? Or is there something I have miss-understood?

推荐答案

在研究另一个问题时,我在 http://sourceforge.net/p/wix/mailman/message/26687047/ 来自 Rob Mensching:

While researching another problem I found this comment on http://sourceforge.net/p/wix/mailman/message/26687047/ from Rob Mensching:

IIRC,这是 ICE57 中的一个错误.Windows Installer 团队没有看评估这些值时的 ALLUSERS 属性......那是很久以前的事了不过这样我的记忆力可能有点衰退了.

IIRC, this is a bug in ICE57. The Windows Installer team didn't look at ALLUSERS property when evaluating these values... that was a long time ago though so my memory may have decayed a bit.

看起来像是 ICE57 中的一个错误.

It looks like a bug in ICE57.

这篇关于为什么我们在每台机器安装中收到非广告快捷方式的 ICE57 错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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