Kevin Mackey
Kevin Mackey

Reputation: 11

WiX Burn: Create custom log file name for MsiPackage?

When Burn runs an MSI installer, using MsiPackage, I'd like the MSI's log file to have a custom name, like MyProductName.log. I'd also like to append to an existing log file (with same name).

In InstallShield's Basic MSI Project's Release view there is an entry "MSI Command-Line Arguments" where you can enter a custom log file name:

/l+* "%TEMP%\MyProductName.log"

The "+" will append the log to an existing file.

Burn can pass public properties to the MSI, but I don't see a way to do what I want.

It looks like I'll need to write code (custom Burn bootstrapper) to run after the MsiPackage is installed (or uninstalled) to copy the contents of the log file (in the Burn variable defined in LogPathVariable) to the file with the custom name.

Upvotes: 0

Views: 385

Answers (2)

Kevin Mackey
Kevin Mackey

Reputation: 11

To do what I needed, I wrote a simple bootstrapper, which became more complicated as I addressed things like passing installer properties to the bootstrapper, giving warnings if installing an x86 installer on an x64 OS (we encourage customers to use and x64 installer), etc.

Upvotes: -1

Sharpenologist
Sharpenologist

Reputation: 187

You can use the LogPathVariable attribute of the MsiPackage element to provide a custom log file name ...

See: http://wixtoolset.org/documentation/manual/v3/xsd/wix/msipackage.html

Also: https://support.firegiant.com/hc/en-us/articles/230912207-Pass-Properties-to-MsiPackage-from-Bundle-

Upvotes: 1

Related Questions