Jnuw
2nd November 2004 17:31 UTC
Change location of install.log?
Hello all.
I just updated my NSIS to 2.02, then downloaded the Advanced logging special build of makensis.exe so I could use the LogSet feature and get an install log. All this went fine.
My problem now is that I would like to change the target file for the log info from $INSTDIR\install.log to something else. Is this possible? Thanks.
kichik
2nd November 2004 18:10 UTC
Something like the following should allow you to change the directory (to $TEMP in this case), but install.log will stay:
Function .onInit
Push $INSTDIR
StrCpy $INSTDIR $TEMP
LogSet on
LogText "log started"
Pop $INSTDIR
FunctionEnd
Jnuw
2nd November 2004 18:45 UTC
kichik, that’s excellent, thanks so much.
One other question, can I add a date and/or time stamp to the log file? That way when the user runs the next update in the future, and it appends, I can see when it was run? Thanks.
kichik
2nd November 2004 19:29 UTC
You can use the NSISdt plug-in from the Archive downloads page to get the current date and write that to the log using LogText.
Jnuw
2nd November 2004 20:10 UTC
Thanks again, the NSISdt plug-in works very well.