Large strings build only supports 1024 characters?
I have an installer that posts data to a webservice which may be a string larger than 1024 characters. I tried the Large string builds found from the wiki, but the "string_size" passed via the plugin API is still only 1024. I tried building my own version from the source, but was unsuccessful. Could someone provide me a version that works properly?
Here is a sample script which fails to properly write a file with a string larger than 1024 characters:
!include "WinMessages.nsh"
!include "MUI2.nsh"
Name "TestString"
OutFile "TestString.exe"
BrandingText " "
; The default installation directory
InstallDir $TEMP
;--------------------------------
;Interface Settings
;--------------------------------
;Pages
!insertmacro MUI_PAGE_WELCOME
Page Custom page.TestString
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
Section
SectionEnd
Function page.TestString
; Verify 8192 capable
MessageBox MB_OK ${NSIS_MAX_STRLEN}
; 1024 char string
StrCpy $0 "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
StrCpy $1 "$0BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"
StrCpy $2 "$1CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"
StrCpy $3 "$2DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
StrCpy $4 "$3EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"
StrCpy $5 "$4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
StrCpy $6 "$5GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG"
StrCpy $7 "$6HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH"
; Append a few more characters
StrCpy $8 "$7QQQQQ"
; No Q's in message box
MessageBox MB_OK $8
; Write to file
FileOpen $9 TestString.txt w
FileWrite $9 $8
FileClose $9
; Open TestString.txt and notice there's no Q's in it.
FunctionEnd