How do I create a log file for an .MSI or .EXE?

Article:HOWTO2906  |  Created: 2006-03-23  |  Updated: 2007-01-30  |  Article URL http://www.symantec.com/docs/HOWTO2906
Article Type
How To



Question

How do I create a log file for .MSI and .EXE files?

Answer

You can create a log file by either using the "/L" command line option or using the logging policy.  Select the method that is best for your installation.

To use the /L command line option with Msiexec.exe:

 

The following list of command line options relating to the log file is from the Microsoft Windows Installer SDK.  

 

/L [i|w|e|a|r|u|c|m|o|p|v|+|!]

Writes logging information into a log file at the specified path.  Flags indicate which information to log.  If no flags are specified, the default is 'iwearmo.'

 

i - Status messages  

w - Non-fatal warnings  

e - All error messages  

a – Action start-up  

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  

+ - Append to existing file  

! - Flush each line to the log

 

"*" - Wildcard, log all information except for the v option. To include the v option, specify "/L*v"  

 

Example for an .MSI file:
MSIEXEC /I “C:\Program Files\My MSI.msi” /L*v “C:\Program Files\InstallLog.txt” 

 

Example for an .EXE file:

“C:\Program Files\My EXE.exe” /L*v “C:\Program Files\InstallLog.txt” /I

If you are creating a log file for an .EXE, you must have a /I at the end of the command line. 
 

 

To use the logging policy:

This policy is used only if logging has not been enabled by the "/L" command line option.  With the policy set, a log file is created in the Temp directory with a random name: MSI*.LOG.  Specify the logging mode by setting the policy value to a string of characters. 

Set the following registry key to define the log file policy on the computer:
 

• Registry Key: HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer

• String Registry Value: Logging

• Registry Value Data: This data can by any of the following letters or any combination of them.

i - Status messages

w - Non-fatal warnings

e - All error messages

a – Action start-up

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

! - Flush each line to the log


Note that you cannot use "+" and "*" for the policy. 

 


Legacy ID



21063


Article URL http://www.symantec.com/docs/HOWTO2906


Terms of use for this information are found in Legal Notices