Reference/FileReadWord

From NSIS Wiki
Jump to navigationJump to search

FileReadWord

handle user_var(output)

This function is only available when building a Unicode installer.

Reads a word (2-bytes) from a file opened with FileOpen. The word is stored in the output as an integer (0-65535). If the end of file is read and no more data is available, the output will be empty, and the error flag will be set.

ClearErrors
FileOpen $0 $INSTDIR\file.dat r
IfErrors done
FileReadWord $0 $1
FileReadWord $0 $2
DetailPrint "$1 $2"
FileClose $0
done: