Skip to content
⌘ NSIS Forum Archive

Reading entire file (not stopping at a newline)

2 posts

parasoul#

Reading entire file (not stopping at a newline)

This code:
  ReadRegStr $3 HKLM "System\CurrentControlSet\Control\ComputerName\ActiveComputerName" "ComputerName"
  StrCpy $1 $3 4 3
  FileOpen $4 "$TEMP\$3Test.txt" "r"
  FileRead $4 $5
  FileClose $4
  MessageBox MB_OK "$5" 
Reading a file with the content:


TESTTEST
TESTEST 
It outputs only TESTEST. I need it to read the entire file and not stop at a newline or return. Any ideas?
Sheik#
I created a patch to do exactly what you need.
I submitted it, but I don't believe it was ever added.

Take a look at this thread:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.