ssam
12th June 2008 10:30 UTC
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?
pospec
12th June 2008 10:46 UTC
You have to insert a function, macro and define from wiki into your script.
Afrow UK
12th June 2008 11:14 UTC
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
ssam
12th June 2008 11:16 UTC
ok thx