Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Using the MsiLogFileLocation Property


4 replies to this topic

Gareth at Serif

Gareth at Serif
  • Full Members
  • 85 posts

Posted 13 October 2006 - 13:57

Hi guys,

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.
http://msdn.microsof...ilelocation.asp

I've tried defining the property in my package, but the log file always appears in the default location with a line similar to:
QUOTE
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.

Any help?


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 13 October 2006 - 15:45

In my understanding MsiLogFileLocation is a read-only property, which you can use to point users toi the created log file, or to open it automatically when your setup is finished.
To create the log and specify the location use the /L command line option for msiexec.exe

Gareth at Serif

Gareth at Serif
  • Full Members
  • 85 posts

Posted 13 October 2006 - 17:09

Thanks for your comments Stefan. I'm starting to understand that the logfile location must be set before this line in the log that seems to set it... since the log file clearly already exists. It's like some kind of paradox trying to tell the install to change the location of the log partway though the install.

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:
QUOTE
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.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 14 October 2006 - 13:25

Does McAfee use a setup.exe or do you double click the .msi file directly? In the first case I believ their setup.exe calls msiexec.exe and passes the log location using the /L parameter.

Gareth at Serif

Gareth at Serif
  • Full Members
  • 85 posts

Posted 16 October 2006 - 13:21

Hi Stefan. Yes, I came to that conclusion over the weekend itself. McAffee probably always made a log file, it's only now I'm lookig for Vista's automated log file that I found it so close by.

Cheers.