How to use Inno Setup scripts to edit a text file?

How to add text to a file?

+3
source share
2 answers

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

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

Source: https://habr.com/ru/post/1739473/


All Articles