How to create a log file for a WiX Installer

fileinstallationloggingwix

How do I create a log file for a WiX Installer?

I need to create a log file during installation of my installer created in WiX. Currently I only know the commandline option to run the MSI file and generate a log file.

But I need to create a log file by running only the MSI file normally (not in commandline), and log each process happening during installation.

Best Answer

If you're sure the machine on which your package will be installed will have MSI Installer 4.0 then you can set the MsiLogging property to your required logging options. See MsiLogging property.

Which will automatically dump a file in your $TEMP folder.

It's not ideal, but it works.