Here is my current progress, please be aware that this script does NOT work, but it is my current progress.
And this is called by:Var UninstallLog
!macro InstallDirectory Directory
File /r "${Directory}"
Push "${Directory}"
Call InstallDirectoryFiles
!macroend
Function InstallDirectoryFiles
Pop $3
FindFirst $0 $1 "$INSTDIR\$3\*"
FindNext $0 $1
FindNext $0 $1
StrCpy $2 "$3\$1"
Goto Loop
Loop:
DetailPrint "First 1: $1"
StrCmp $1 "" NextMain
StrCmp $1 "." Next
StrCmp $1 ".." Next
DetailPrint "Second 2: $2"
IfFileExists "$2\*" IsDir IsFile
IsDir:
FindFirst $0 $1 "$INSTDIR\$2\*"
StrCmp $1 "" Close
StrCmp $1 "." NextDir
StrCmp $1 ".." NextDir
FileOpen $UninstallLog "$INSTDIR\uninstall.log" a
FileSeek $UninstallLog 0 END
FileWrite $UninstallLog "$2\$1$\r$\n"
FileClose $UninstallLog
StrCpy $2 "$2\$1"
DetailPrint "Third 2: $2"
Goto Next
IsFile:
FileOpen $UninstallLog "$INSTDIR\uninstall.log" a
FileSeek $UninstallLog 0 END
FileWrite $UninstallLog "$2\$1$\r$\n"
FileClose $UninstallLog
DetailPrint "Forth 2: $2"
Goto Next
NextDir:
FindNext $0 $1
Goto IsDir
Next:
FindNext $0 $1
Goto Loop
NextMain:
FindClose $0
FindNext $0 $1
Call InstallDirectoryFiles
Close:
FindClose $0
FunctionEnd
I need to log File /r because I have many subfolders and a lot of files.!insertmacro InstallDirectory "lib"
Please let me know if there is an easier way, or where I'm going wrong with my current script.