Archive: How to Modify Log File Name and Location


How to Modify Log File Name and Location
Is there a way to modify the log file name and location after setting:
LogSet on

I have searched the docs and this forum and have not found any mention of such parameters.

Thank you,
Michael


http://forums.winamp.com/showthread....=log+file+name

-Stu


First make sure you make or download a special build with internal logging on.

My script contains something along thes lines below. Note that you have to search the Wiki for the "GetOptions" function if you want to use this nice feature, just skip the "GetOptions" if you do not understand it...
--------------------------
; ** LOGGING on of off, nothing is done with additional values yet
${GetOptions} $CMDLINE "/L" $R0
IfErrors SkipLogSet 0
;MESSAGEBOX FOR DEBUG ONLY the delete commet symbol in front
;MessageBox MB_ICONQUESTION|MB_OK "Logset found and additional value is >$R0"
StrCpy $INSTDIR $TEMP ; to change the logfile writing to TMP not the application folder
LogSet on
SkipLogSet:
---------------------------

NOTE:
I use a self defined value for $INSTDIR in my installation script. e.g. the variable $MYINSTFOLDER is assigned the %Programs files% folder + "mysubfolder"

But you get the idea already I bet.

And indeed, creating a GOOD installer is not an easy task, despite the power of NSIS. But with NSIS it is at least the less painfull and most flexible way to get the job done!