preserve install.log on install or upgrade - Advanced Installer Community
elou
Posts: 96
Joined: Tue Apr 14, 2015 9:12 am

preserve install.log on install or upgrade

Hello,
I would would that the setup always save the install.log after installation und upgrade.
Even if the user do not start the installer with the "/L*V" Parameter, the log should than be saved at a specified default location.
If the user has given the '/L*V' Parameter it should not be ignored.

Is there a way to archieve that?
Regards,
Éric.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: preserve install.log on install or upgrade

Hi Éric,

To do so you could simply check the "Enable verbose logging" option in "Install Parameters" page of your setup project.

Hope this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
elou
Posts: 96
Joined: Tue Apr 14, 2015 9:12 am

Re: preserve install.log on install or upgrade

Hi Daniel,
thank you for the quick reply.
Is there any variable where I could find the exact name of the log?
Is it possible after the setups runs to make a copy of the file to a specific directory?
Regards, Éric.
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: preserve install.log on install or upgrade

Hello Éric,

Normally, the log file name generated by that option looks something like this: MSI*.LOG, where * represents a set of random letters and numbers.

However, basically this option sets Windows Installer MsiLogging property to the "vp" value. Windows Installer will then automatically set the MsiLogFileLocation property to the path where the log will be generated. By default, the MsiLogFileLocation will resolve to:

Code: Select all

CurrentUser\AppData\Local\Temp\MSI*.LOG
For instance, when enabling that option in a newly created project, the property resolves, on my machine, to:

Code: Select all

C:\Users\Catalin\AppData\Local|Temp\MSIb5034.LOG
(obviously, the log name changes everytime I run the setup)

With that being said, a solution would be to get the value of the MsiLogFileLocation property, parse it and get the name of the log file.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”