How to write text to a file

ImportantThe following article uses options that are available starting with the Enterprise edition and project type.

NoteIf you need to write information into an XML or INI file, you can use the XML Editor or the INI Editor

Sometimes the installation package must write some information into a file installed by your package. This can be done using the Text File Update feature available in Advanced Installer.

Lets suppose that after the installation is complete you want to have a file which contains the serial number entered by the user. This serial number is stored in the SERIAL_NUMBER property, which is assigned to an edit box control on a custom dialog.

Navigate to Files and Folders page in the folder you want to install it into. Once here, use the [ New Text File Update ] button from the toolbar or from the context menu select the “New Text File Update” item. The Edit Text File Update Set Dialog dialog will appear.

Since we are only appending/creating the file, remove the Replace operation from the left pane by selecting it and press Delete.

In the File Content field, write the above defined property into brackets: [SERIAL_NUMBER]