Tutorial :How to use Inno Setup scripting to edit a text file?



Question:

How can I append text to a file?


Solution:1

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


Solution:2

fileName := ExpandConstant('{pf}\{#MyAppName}\batch.bat');    SetArrayLength(lines, 3);    lines[0] := 'echo hello';    lines[1] := 'pause';    lines[2] := 'exit';    Result := SaveStringsToFile(filename,lines,true);  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »