I have a function which I run after the installer finishes (or if the installer detects an error in an operation earlier, it runs this function before quitting).
It uses the DumpLog plugin - it writes the log details to a temporary file, then appends the contents of that file to the main log file (defined as a constant earlier as $logpath):
The problem is it also crashes. I wondered if Dumplog has a known error or something; it won't even get as far as writing the temporary log.txt. I've triple-checked that the stack isn't being abused and causing something to fail - is there something that I don't know happening here?DumpLog:😁umpLog "$PLUGINSDIR\log.txt"
Push $0
Push $1
Push $2
FileOpen $0 "$PLUGINSDIR\log.txt" r
FileOpen $1 "$logpath" a
FileSeek $1 "0" end
logloop:
FileRead $0 $2
IfErrors endlogloop
FileWrite $1 $2
Goto logloop
endlogloop:
FileClose $1
FileClose $0
Pop $2
Pop $1
Pop $0
To compound the problem, it doesn't always happen (e.g. on a successful install).
Thanks