Record.FormatText Method

Windows Installer

Record.FormatText Method

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

Syntax

Script
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

VersionWindows Installer 5.0 on 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, Windows XP, and Windows 2000
DLLMsi.dll
IIDIID_IRecord is defined as 000C1093-0000-0000-C000-000000000046

See Also

MsiFormatRecord
Formatted
Column Data Types

Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.