How to use Inno Setup scripting to append to a text file?
How c开发者_高级运维an I append text to a file?
You can use the SaveStringToFile()
function to append text to a file.
fileName := ExpandConstant('{pf}\{#MyAppName}\batch.bat');
SetArrayLength(lines, 3);
lines[0] := 'echo hello';
lines[1] := 'pause';
lines[2] := 'exit';
Result := SaveStringsToFile(filename,lines,true);
精彩评论