28

When creating a Windows installer using the WiX (Windows Installer for XML) toolset, how do you make the install process write logging information to a log file?

Is there a command-line switch which triggers the output of the log file?

Ken Richards
  • 2,937
  • 2
  • 20
  • 22

2 Answers2

34

The Bundle will automatically log to the %TEMP% location. A specific location for the log file can be set by passing a path to -l or -log such as: bundle.exe -l "path\to\your\log.txt"

More details are provided by FireGiant at the bottom of this article:

Steven Green
  • 981
  • 8
  • 15
Rob Mensching
  • 33,834
  • 5
  • 90
  • 130
  • 3
    You can also add a line under . I used this in a bootstrapper project, might work in others too but I have not checked that. – TomEberhard Feb 25 '16 at 22:58
  • I see that `Engine.Log` method has a `LogLevel` parameter. In my experience, messages with `LogLevel.Debug` are not written to the log file. Is there a way to make the installer write the debug messages as well? – Mike Rosoft Nov 12 '19 at 10:23
  • Found the answer: this is currently not supported by the Bootstrapper engine (except by setting a global logging policy). See http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Burn-logging-td6698359.html . – Mike Rosoft Nov 12 '19 at 11:00
5

You need to run your installation from the command line (preferably from an administrative command prompt) and use the -l switch as follows:

mySetup.exe -l "LogFileName.log"

Ken Richards
  • 2,937
  • 2
  • 20
  • 22