ICE69

ICE69 检查格式化字符串中形式为 [$componentkey] 的所有 substring 是否没有交叉引用组件。 如果格式化字符串的 [$componentkey] 属性引用的组件不是存储在表的 Component_ 列中的组件,就会发生交叉组件引用。

交叉组件引用的问题源于格式化字符串的计算方式。 如果使用 [$componentkey] 属性引用的组件已安装且在当前安装期间未被更改(例如,正在重新安装、移动到源等),则表达式 [$componentkey] 的计算结果为 null,因为 [$componentkey] 中组件的操作状态为 null。 在升级和修复操作期间可能会出现类似的问题。

结果

如果格式化字符串中的 [$componentkey] substring 交叉引用另一个功能中的组件,ICE69 将返回错误。 如果格式化字符串中的 [$componentkey] substring 交叉引用同一功能中的组件,ICE69 将返回警告。 (FeatureComponents 表用于确定此映射。它必须映射到警告的相同功能。引用父功能中的组件或引用子功能中的组件被视为错误。)

如果格式化字符串中的 [#FileKey] substring 引用了 File 表中未指定为属于同一组件的文件,ICE69 会报告错误。

示例

ICE69 为所示示例报告以下内容。

WARNING: "Mismatched component reference. Entry 'Test' of the Shortcut table belongs to component 'QuickTest'. However, the formatted string in column 'Argument' references component 'Test'. Components are in the same feature."
ERROR: "Mismatched component reference. Entry 'Shortcut2' of the Shortcut table belongs to component 'QuickTest'. However, the formatted string in column 'Argument' references component 'Test2'. Components are not in the same feature."

若要修复此错误,请不要交叉引用组件。 更改 [$componentkey] 以匹配快捷方式的组件。

Shortcut 表(部分)

快捷键 Component_ 参数
测试 QuickTest -v [$Test]
Shortcut2 QuickTest [$Test2]

 

VerbExtension 表是特殊情况,因为 Verb 表引用属于组件的扩展。 但是,一个 Extension 可以属于多个组件,因为扩展表的主键由 Extension 和 Component_ 列组成。 在逻辑上,可以出现以下情况。

Verb 表(部分)

分机 Verb_ 参数
tst 打开 -v [$comp1][$comp2]

 

Extension 表(部分)

分机 Component_
tst comp1
tst comp2

 

FeatureComponents 表

Feature_ Component_
Feature1 QuickTest
Feature1 测试
Feature2 Test2

 

在本例中,必须确保至少有一个 [$componentkey] 属性的计算结果为非 null 值。 但是,Verb 表的 Argument 列中的每个 [$componentkey] 属性(在上述示例中为 [$comp1] 和 [$comp2])必须引用与谓词关联的扩展中包含的可能组件。 类似 [$comp3] 的引用将生成来自 ICE69 的警告。

AppId 表的情况与 Verb 表类似。 它使用 Class 表作为其组件引用。 在本例中,AppId 表的验证方式与 Verb-Extension 验证(现在为 AppId-Class)方式相同。

Class 表的 Argument 列的验证方式与 ShortcutRegistry 和类似表的验证方式一样。

在执行过程中使用的表(仅在找到时使用)

IniFile

RemoveIniFile

注册表

RemoveRegistry

ServiceControl

ServiceInstall

快捷方式

谓词

扩展名

AppId

环境

ICE 参考