Windows Installer, Java Installer, Freeware Installer
Home|Contact|Site Map|TOC|Search
Download  Features   Java  Licensing  Purchase  Testimonials  Support  Forums

How do I create an installation log?

Answer

Windows Installer logging

Windows Installer handles its installations through Msiexec.exe. The logging options offered by this tool allow you to create different types of logs, depending on the information you need about the installation. These options are:

  • i - Status messages
  • w - Nonfatal warnings
  • e - All error messages
  • a - Start up of actions
  • r - Action-specific records
  • u - User requests
  • c - Initial UI parameters
  • m - Out-of-memory or fatal exit information
  • o - Out-of-disk-space messages
  • p - Terminal properties
  • v - Verbose output
  • x - Extra debugging information
  • + - Append to existing log file
  • ! - Flush each line to the log
  • * - Log all information, except for v and x options

ImportantThe logging command is issued by the /L parameter. The above options can be used only after this parameter (the options cannot be used by themselves).

Create a log

The most used logging command is /L*V. This command will create a verbose log which offers a lot of information about the installation. Here are the steps for creating a log:

  • find out the path of the MSI file, for example C:\MyPackage\Example.msi
  • decide the path of the log, for example C:\log\example.log
  • open cmd.exe (you can use any command shell)
  • run this command:
msiexec /i "C:\MyPackage\Example.msi" /L*V "C\log\example.log"
  • the /i parameter will launch the installation package
  • after the installation is finished the log is complete

NoteThe example command line uses the sample paths in this how-to. For your package you must use the path of your MSI file. Note that any logging command line should have this form:

msiexec /i <path_to_msi> /L*V <path_to_log>

NoteAfter you use the logging command you need to specify the complete path of the log. If you want the log to be created next to the MSI, you can specify only the name of the log file:

msiexec /i "C:\MyPackage\Example.msi" /L*V "example.log"

Another approach is to create a log file by using the /L*V parameters in the command line of the Advanced Installer Bootstrapper. Also, these parameters can be always passed to the MSI when the package is launched through the EXE bootstrapper.

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

  • open the Advanced Installer project of your installation package
  • go to the Media page and select the Bootstrapper tab
  • check the Create EXE setup file option
  • set the MSI Command Line field to: /L*V "C:\package.log"

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

ImportantThe command line received by the bootstrapper overrides the command line in the "MSI Command Line" field. Therefore, if you launch an EXE package with logging parameters, these parameters will be used for creating the log.

Privacy Policy | Windows Installer | Search Engine Ranking | Link Analyzer