Function WriteErrorCode
Exch $0 ; message
Exch
Exch $1 ; error code
!define /date DATESTAMP "%Y-%m-%d %H:%M:%S"
SetOutPath $EXEDIR
FileOpen $9 $EXEDIR\Install_Errors.log a
FileWrite $9 "${DATESTAMP} - ErrorCode:$1 - $0$\r$\n"
FileClose $9
SetErrorLevel $1
Abort
FunctionEnd
File Append broken
I'm using the following code while in Silent mode (via /S). It's overwriting the log file instead of appending the data to it. My buggy code or something buggy with NSIS 2.45?