Skip to content
⌘ NSIS Forum Archive

write string to existing File

4 posts

ssam#

write string to existing File

i want write some strings to an existing file.
i found this:


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?
Afrow UK#
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