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

Record.FormatText method

· 52CE 我爱测

The FormatText method of the Record object formats fields according to the template in field 0.

The FormatText method of the Record object formats fields according to the template in field 0.

Syntax

Record.FormatText()

Parameters

This method has no parameters.

Return value

This method does not return a value.

Remarks

The FormatText method follows the functionality of the MsiFormatRecord function if MsiFormatRecord was passed a null installer handle as its first parameter. As a result, only the record field parameters are processed and properties are not available for substitution.

For example, a string such as "format this field: [1], format this property: [property]" is resolved to "format this field: value from field 1, format this property: [property]."

Parameters that are to be formatted are enclosed in square brackets [...]. The square brackets can be iterated because the substitutions are resolved from the inside out.

If a part of the string is enclosed in curly braces { } and contains no square brackets, it is left unchanged, including the curly braces.

Note in the case of deferred execution custom actions, FormatText only supports a limited set of properties: the CustomActionData and ProductCode properties. For more information, see Obtaining Context Information for Deferred Execution Custom Actions.

Requirements

Requirement Value
Version Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003 or Windows XP
DLL Msi.dll
IID IID_IRecord is defined as 000C1093-0000-0000-C000-000000000046

See also

MsiFormatRecord

Formatted

Column Data Types

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)

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

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