FileOpen $9 "$INSTDIR\mytextfile.txt" w FileWrite $9 "first line$\r$\n" FileWrite $9 "second line$\r$\n" FileClose $9