IText File Update Component: Efficient Text Handling

IText File Update Component: Efficient Text Handling

Paul Lv8

IText File Update Component: Efficient Text Handling

Table of Contents

Disclaimer: This post includes affiliate links

If you click on a link and make a purchase, I may receive a commission at no extra cost to you.

ITextFileUpdatesComponent

Declaration

ITextFileUpdatesComponent : IDispatch

https://techidaily.com

Overview

This interface facilitates accessing text file update operations and create a new one

https://techidaily.com

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.

https://techidaily.com

Properties

Array TextUpdateFiles
Gets the collection of text updates file operations

https://techidaily.com

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

Copy

See also

IAdvinstProject

ITempFile

Did you find this page useful?

Please give it a rating:

Thanks!

Report a problem on this page

Information is incorrect or missing

Information is unclear or confusing

Something else

Can you tell us what’s wrong?

Send message

Also read:

  • Title: IText File Update Component: Efficient Text Handling
  • Author: Paul
  • Created at : 2024-10-09 18:56:20
  • Updated at : 2024-10-11 04:19:24
  • Link: https://fox-metric.techidaily.com/itext-file-update-component-efficient-text-handling/
  • License: This work is licensed under CC BY-NC-SA 4.0.