Archive: Uninstaller log


Uninstaller log
Ok. I've read the threads regarding creating an uninstaller log to list which files my package installs, but am still a little stumped.

The script by Afrow UK (http://nsis.sourceforge.net/archive/...php?pageid=556) works fine for me (except I had trouble with the variable $OUTPATH and changed it to $OUTDIR). I get a nice log of all the files I called during install.

However, as with a previous user (another thread on the subject), I can't seem to figure out how to take care of the case where I have installed an entire directory with a wildcard ( e.g.

${File} /r "dir1\*.*"

would be the command using Afrow UK's script above). I could just RMDIR /r to get everything in that directory, but would rather have the uninstall log file print out each file that dir1\*.* caused to be installed.

Can this be done with an embedded FindFirst/FindNext/FindClose?
I was thinking for example,

Var UninstLog

; Add file macro
!macro File FileName
FindFirst $0 $1 ${FileName}
loopfindfirst:
StrCmp $1 "" done
DetailPrint $1
File $1
FileWrite "$UninstLog" "$OUTDIR\$1$\r$\n"
FindNext $0 $1
Goto loop
donefindfirst:
!macroend
!define File "!insertmacro File"


The problem here is that the loopfindfirst: is re-declared each time the ${File} command is sent (which generates an error}.

Anyone see a better solution?

Thanks.
-Tony


FindFirst won't be the best solution because there may be other files in the directory you're installing to. Currently, the best solution is using an external program to create a list of files from a wildcard. The program can use Afrow's macro for each file. This program can be executed using !system and its output can be included in the script using !include. It's possible to write such a program even as a NSIS installer.

A similar program was built for similar situation:

http://forums.winamp.com/showthread....ghlight=rsegal


Uninstaller log + FolderList
The FolderList.exe program seems to be exactly what I need (even a little better than for what I'm using it for).

Thanks.
-Tony

p.s. Could this program be referenced along with scripts that build uninstaller logs