ITextFileUpdatesComponent
Declaration
ITextFileUpdatesComponent : IDispatch
Overview
This interface facilitates accessing text file update operations and create a new one
Methods
NewTextUpdateFile(IFolder TargetFolder, String
FileName) returns ITextUpdateFile
Creates a new text file
update.
NewTextUpdateFileS(String PathToTargetFolder, String
FileName) returns ITextUpdateFile
Creates a new text file
update.
Properties
Array<ITextUpdateFile> TextUpdateFiles
Gets the collection of text updates file operations
Example
$advinst = new-object -com AdvancedInstaller $project = $advinst.CreateProjectS("architect") $project.TextFileUpdatesComponent.TextUpdateFiles $textFileUpdate = $project.TextFileUpdatesComponent.NewTextUpdateFileS("appdir\pgsql\data", "postgresql.conf") $textFileUpdate.CreateBackupFileBeforeUpdate = $true $textFileUpdate.AbortInstallationOnError = $true $updateCheckpoint = $textFileUpdate.NewReplaceOperation("checkpoint_completion_target") $updateCheckpoint.Find = "#checkpoint_completion_target = 0.\d+" $updateCheckpoint.UseRegularExpressions = $true $updateCheckpoint.Replace = "checkpoint_completion_target = 0.9" $updateCheckpoint.MatchCase = $true $updateCheckpoint.ReplaceOnlyFirstOccurence = $true $updateStatementTimeout = $textFileUpdate.NewReplaceOperation("statement_timeout") $updateStatementTimeout.Find = "#statement_timeout = \d+" $updateStatementTimeout.UseRegularExpressions = $true $updateStatementTimeout.Replace = "statement_timeout = 1800000" $updateStatementTimeout.MatchCase = $true $updateStatementTimeout.ReplaceOnlyFirstOccurence = $true