How can I create a txt file in a folder with Inno Setup?
[Run]
SaveStringToFile('c:\filename.txt', #13#10 + 'the string' + #13#10, True);
The code doesn't work, what's the problem here?
How can I create a txt file in a folder with Inno Setup?
[Run]
SaveStringToFile('c:\filename.txt', #13#10 + 'the string' + #13#10, True);
The code doesn't work, what's the problem here?
You need to call the code (
SaveStringToFile) from an event function or possibly from a UI-control handler. You didn't specify when you want the file to be created. Assuming you want to create it as part of the installation, you can useCurStepChangedevent function inssInstall(pre-install) orssPostInstallsteps.Though hard-coding
C:drive seems like a bad idea.