Archive: write string to existing File


write string to existing File
i want write some strings to an existing file.
i found this:
http://nsis.sourceforge.net/Simple_write_text_to_file

but if i want to use this, i get the following error:

Invalid command: ${WriteToFile}

on the site http://nsis.sourceforge.net/Simple_write_text_to_file
stand nothing about what i need to use this command. is there a headerfile which i musst include?


You have to insert a function, macro and define from wiki into your script.


And make sure they are inserted above where you want to call it. That function should really only be used for writing a single line entry. If you want to write multiple lines, do it like so:

FileOpen $R0 `file\path` a
FileSeek $R0 0 END
FileWrite $R0 `new line 1$\r$\n`
FileWrite $R0 `new line 2$\r$\n`
FileWrite $R0 `new line 3$\r$\n`
FileClose $R0

Stu


ok thx