Jossy Jose
Posts: 3
Joined: Thu Jan 25, 2024 11:36 am

Log File Saving in custom location

Thu Feb 29, 2024 11:44 am

How can we save the verbose log files into a custom location with custom name. Especially when throwing the errors, have to save or copy the verbose log files into custom location with custom names.

How can we make it possible.

I am using Advanced Installer 21.1.

Liviu
Posts: 1026
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Log File Saving in custom location

Mon Mar 04, 2024 4:19 pm

Hello,

If you want your installation package to always create a log, you can follow these steps:

1. go to the Builds page and select the Configuration tab
2. set the MSI Command Line field to: /L*V "C:\package.log" (this is only available for EXE packages)

This way, when the user launches the installation through the bootstrapper, an installation log ("package.log") will be created automatically in the "C:\" drive.

You can also use properties for system folders: /L*V "[LocalAppDataFolder]customlog.txt"
log command.png
log command.png (8.7KiB)Viewed 561 times

However, the folder you are using must exist before launching the installation. The log command is handled by Windows Installer module and it cannot create folders. This means that if you specify a log file location that does not already exist, the installer will not be able to create it and the logging will fail.

Let us know if you have any questions.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”