Record.FormatText 方法

Record物件的FormatText方法會根據欄位 0 中的範本來格式化欄位。

語法

Record.FormatText()

參數

這個方法沒有任何參數。

傳回值

這個方法不會傳回值。

備註

如果MsiFormatRecord傳遞 Null 安裝程式控制碼做為其第一個參數,FormatText方法會遵循MsiFormatRecord函式的功能。 因此,只會處理記錄欄位參數,而且屬性無法用於替代。

例如,「format this field: [1], format this property: [property]」 的字串會解析為 「format this field: value from field 1, format this property: [property].」

格式化 的參數會以方括弧 [...]括住。方括弧可以逐一查看,因為替代專案是從內部解析而來。

如果字串的一部分以大括弧 { } 括住,且不包含方括弧,則會保持不變,包括大括弧。

請注意,在 延後執行自訂動作的情況下, FormatText 僅支援一組有限的屬性:CustomActionData 和 ProductCode 屬性。 如需詳細資訊,請參閱 取得延後執行自訂動作的內容資訊

規格需求

需求
版本
Windows Server 2012、Windows 8、Windows Server 2008 R2 或 Windows 7 上的 Windows Installer 5.0。 Windows Server 2008 或 Windows Vista 上的 Windows Installer 4.0 或 Windows Installer 4.5。 Windows Server 2003 或 Windows XP 上的 Windows Installer
DLL
Msi.dll
IID
IID_IRecord定義為 000C1093-0000-0000-C000-000000000046

另請參閱

MsiFormatRecord

格式 化

資料行資料類型