Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Inno Setup scripting to append to a text file?

How can I append text to a file?

like image 367
Brett Avatar asked Sep 14 '25 00:09

Brett


2 Answers

You can use the SaveStringToFile() function to append text to a file.

like image 76
Kyle Alons Avatar answered Sep 15 '25 14:09

Kyle Alons


fileName := ExpandConstant('{pf}\{#MyAppName}\batch.bat');
SetArrayLength(lines, 3);
lines[0] := 'echo hello';
lines[1] := 'pause';
lines[2] := 'exit';
Result := SaveStringsToFile(filename,lines,true);
like image 28
user2754610 Avatar answered Sep 15 '25 16:09

user2754610