Skip to content
⌘ NSIS Forum Archive

How to deal with install.log entries before $INSTDIR was choosen?

2 posts

AndyJoeB#

How to deal with install.log entries before $INSTDIR was choosen?

Hi,

User can choose $INSTPATH. Anything I log before, goes to the default $INSTPATH, i.e. %systemdrive%\program files\my app, but if the user chooses to install into d:\myapp, I get a second install.log created with the logging after that.

I would like to get the whole log in the right place, and not pollute the directory structure with a half-baked install.log...

Any ideas? Is it possible somehow to "collect" all the log entries but not write them, and then dump them in the install.log file when I finally know what $INSTDIR is?

Thanks
Andy
Afrow UK#
Push $INSTDIR
StrCpy $INSTDIR $PLUGINSDIR
LogSet on
Pop $INSTDIR
...
LogSet off
CopyFiles /silent $PLUGINSDIR\install.log $INSTDIR\install.log
Not tested but it should work.

Stu