大网数据广告活动
安装更新与部署

Building An ICE

· 52CE 我爱测

If you are unable to find the Internal Consistency Evaluators you need among the existing ICE custom actions listed in the ICE Reference, you will need to prepare your own ICE to validate your package.

If you are unable to find the Internal Consistency Evaluators you need among the existing ICE custom actions listed in the ICE Reference, you will need to prepare your own ICE to validate your package.

When authoring ICE custom actions you should do the following:

  • Base the ICEs only on custom actions of types listed in the table shown.
  • Call MsiProcessMessage and post an INSTALLMESSAGE_USER type of message. When authoring your ICE messages follow the message format in the ICE Message Guidelines.
  • Write your ICE such that it captures any API errors and always returns ERROR_SUCCESS. This is necessary to allow subsequent custom actions to run following the failure of an ICE.

ICE custom actions are limited to the following custom action types.

Custom action type Description
Custom Action Type 1 DLL in binary stream
Custom Action Type 2 EXE in binary stream
Custom Action Type 5 JScript in binary stream
Custom Action Type 6 VBScript in binary stream
Custom Action Type 37 JScript code as string
Custom Action Type 38 VBScript code as string

When authoring an ICE custom action, do not do the following:

  • Do not assume that the handle to the engine that the ICE receives is an installation instance of the installer database. If it is not an installation instance, certain properties are not defined, the source and target directories are not resolved, and current feature states are not defined.
  • Do not rely on the prior execution, or non-execution, of any installer action, custom action, or another ICE. Because a prior ICE may have created temporary columns in any table, authors should reference columns by name whenever possible. ICEs should cleanup any temporary columns or tables before they exit.
  • Do not assume that authors have access to an image of the source directory of the database.
  • Do not assume that changes made to the database do not persist.

Related topics

Sample ICE in C++

Sample ICE in VBScript

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。