Using the MsiLogFileLocation Property
Posted 13 October 2006 - 13:57
I've been reading up on 'what's new...' in Windows Instaler 4.0 to see what exciting new developments I can make use of within new installations should they encounter Windows Vista. The automatic logging caught my eye, but I've been unable to customise one of the key properties - MsiLogFileLocation.
I've tried defining the property in my package, but the log file always appears in the default location with a line similar to:
|PROPERTY CHANGE: Adding MsiLogFileLocation property. Its value is 'C:\Users\<name>\AppData\Local\Temp\MSI????.LOG'.|
I know it can be modified as I have a log file in a subdirectory of my temp folder made by McAfee with a customised file name within it. The same line in their log reads exactly the same, but with the changed value, of course.
I've also tried an early CA and setting the property in the command line, but nothing seems to over rule what ever's built in to the engine.
Posted 13 October 2006 - 15:45
To create the log and specify the location use the /L command line option for msiexec.exe
Posted 13 October 2006 - 17:09
However, it's not clear as to how other packagers seem able to acheive the desired effect. To expand on my earlier example, McAffee has left a log file on my Vista machine as a result of this line in their log:
|PROPERTY CHANGE: Adding MsiLogFileLocation property. Its value is 'C:\Users\<name>\AppData\Local\Temp\McAffeeLogs\VSEInst.log'.|
I wonder if this is configured via somekind of environment variable in the bootstrap. In which case, I assume it's %TMP% that the default logging location uses, and so surely the package should set this variable back to what it was before terminating. I've never done anything of this nature, but it looks extremely handy if anyone can comment on the recommended steps.
Edited by Gareth at Serif, 13 October 2006 - 17:11.
Posted 14 October 2006 - 13:25
Posted 16 October 2006 - 13:21