#1087 ConfigWrite problem

3.0 Alpha Series
open
nobody
None
5
2014-03-10
2013-12-02
romat2
No

I use ${ConfigWrite} from TextFunc.nsh. With NSIS 3.0a1 resulting file contains just lines where replacement occured, other lines are removed. It looks that problem is not in TextFunc.nsh itself because I copied TextFunc.nsh from NSIS 2.46 and the result is same.

Discussion

  • Anders
    Anders
    2014-03-10

    This seems to have been fixed in 3.0a2 (probably by FileRead changes?), can you confirm?

    !include TextFunc.nsh
    Section
    !define tempfile "$%temp%\test.txt"
    !delfile "${tempfile}"
    !appendfile "${tempfile}" "$echo off$\r$\n"
    !appendfile "${tempfile}" "set foo=123$\r$\n"
    !appendfile "${tempfile}" "SET winbootdir=x:\yz$\r$\n"
    !appendfile "${tempfile}" "set bar=456$\r$\n"
    MessageBox mb_ok Before
    ${ConfigWrite} "${tempfile}" "SET winbootdir=" "D:\WINDOWS" $R0
    MessageBox mb_ok After=$R0
    SectionEnd