Append or prepend text line in file

About

This is a custom created predefined action by the Master Packager team that can add text lines to the beginning or end of a file. It is useful for adding configuration or service entries automatically during installation.

Master Packager Advanced Editor - Predefined Custom Actions - Append or prepend text line in file

Action Name
Describes what the action will do.

Path
Specifies the full file path where text lines will be added or inserted.

Text lines
Lists the exact lines of text that will be written to the file.
Append or prepend text line in file - Text lines
You can:
enter image description here

Encoding
Defines the encoding format for the target file.

Append or prepend text line in file - Endcoding

Placement
Controls whether lines are added to the end (Append) or the beginning (Prepend) of the file.

Check if line already exists in file
When enabled, prevents duplicate lines from being added if the same line is already present.

Non-case sensitive
When enabled, line comparisons ignore upper/lowercase differences.