ok the detailprint show me, that my file is completely read.
Var /global ac.jnlp_template
Var /global fp_ac.jnlp
ClearErrors
FileOpen $fp_ac.jnlp '${copiedfiles_Path}\Templates\html\diag\\jnlp\ac\ac.jnlp' r
IfErrors ac.jnlp_done
FileRead $fp_ac.jnlp $2
Detailprint $2
IfErrors ac.jnlp_eof
StrCpy $ac.jnlp_template '$ac.jnlp_template$2'
Goto -4
ac.jnlp_eof:
FileClose $fp_ac.jnlp
Var /global fp_ac.jnlp_patched
Var /global ac.jnlp_patched
${StrRep} $ac.jnlp_patched "$ac.jnlp_template" "$Server" "$Servername" #Ersetzen des Platzhalters $Server mit dem Inhalt der Variablen $Server
SetOutPath '$INSTDIR\html\diag\jnlp\AC'
ClearErrors
FileOpen $fp_ac.jnlp_patched 'ac.jnlp' w
IfErrors ac.jnlp_patched_done
FileWrite $fp_ac.jnlp_patched $ac.jnlp_patched
Messagebox MB_OK "$ac.jnlp_patched"
FileClose $fp_ac.jnlp_patched
Goto +4
ac.jnlp_patched_done:
DetailPrint 'Konnte ac.cfg nicht öffnen.(schreiben)'
Goto +2
ac.jnlp_done:
DetailPrint 'Konnte ac.cfg nicht öffnen.(lesen)'
but if i write the string to the file, he only writes 29 lines. This is a Problem.