This is what I have done and I thought I might share it in case it proves useful for others.
I created a BAT file that I call as a Custom Action on the "Finish>" button click. The action is to call the BAT file with two command line params, e.g.
File To Launch:
Command Line:Code: Select all
"[MsiLogFileLocation]" "[APPDIR]Install.log"
The contents of the BAT file looks like this:
Code: Select all
@echo off
REM usage: CopyInstallLog.bat MSILogFileLocation, Install.log
ren %2 Install_Hist.log
copy Install_Hist.log+%1, %2
del Install_Hist.log
So to de-construct each line, this is what is happening:
1) the "live" install.log file that is in the AppDir folder is renamed to Install_Hist.log; this "frees-up" the final name of "Install.log" for the next set of commands in the BAT file
2) the Install_Hist.log file and the current installation sessions' MSI log file are then combined (or merged) into a file called Install.log; the merging is a result of the "+" (plus) sign; I am appending the latest info at the bottom of the file (so I do <history log file>+%1, if you want the newest install log entries at the top you just reverse the order, such as %1+Install_Hist.log)
3) the Install_Hist.log file is then deleted and what we are left with is the cumulative Install.log file, which will continue to be appended to as each subsequent installation of our application occurs
Hopefully this proves helpful to someone else on the forums in the days and weeks to come.
Regards,
Kevin
FOLLOW US
Get the latest news in Application Packaging