Archive: Is maximum string length documented?


Is maximum string length documented?
Within my scripts I have the following code:

StrCpy $R1 "some long string...$\r$\n\
that continues over serveral$\r$\n\
lines$\r$\n\
...$\r$\n"
FileOpen $0 "my.new.filename" "w"
FileWrite $0 $R1
FileClose $0

But this string seems to get truncated, implying there is a maximum length. I couldn't find this in the documentation.

However, there is the obvious workaround which is:

StrCpy $R1 "some long string...$\r$\n\
that continues over serveral$\r$\n\
lines$\r$\n\
...$\r$\n"

StrCpy $R2 "the long string...$\r$\n\
continues over serveral$\r$\n\
more lines$\r$\n\
...$\r$\n"

FileOpen $0 "my.new.filename" "w"
FileWrite $0 $R1
FileWrite $0 $R2
FileClose $0

If others have come across this problem I hope this helps.


yes there is, the standard size is 1024, though there's a special build (linky which has a max size of 8192.

by re-compiling makensis it's possible to increase the buffer size to what you want via one of the config #defines

-daz