Write text (or variables) to a file

This action lets you write information to a text file; for example to set initial options for your program or store information about the package’s execution, such as the user’s name or the destination directory. All variables can be stored into the text file (additional settings for your application for example).

Another alternative: replace variables in file

Property NameData TypeDescription
AppendCRLFAtEndBooleanIf true, write the string to the file and add an ‘end of line’ character.
ContentsStringString that should be added to the file. Can accept variables.
FilenameStringPath to the file (text file) that the package should create or modify (the filename does not necessarily require the .txt extension).

Do not use this custom action for writing large amounts of data. The Contents property is limited to 4096 wide characters. You can repeat this action several times for the same file and with different content, since contents is added to the end of the existing file.

Notes:

  • If the text file exists, the string is added at the end.

  • The uninstaller will not remove this file unless you specify it.

  • All existing variables and resource strings are replaced.

All available actions

© G.D.G. Software 2018. All rights reserved.