Applies to: desktop apps only
The MsiEnableLog function sets the log mode for all subsequent installations that are initiated in the calling process.
Syntax
UINT MsiEnableLog( __in DWORD dwLogMode, __in LPCTSTR szLogFile, __in DWORD dwLogAttributes );
Parameters
- dwLogMode [in]
-
Specifies the log mode. This parameter can be one or more of the following values.
- szLogFile [in]
-
Specifies the string that holds the full path to the log file. Entering a null disables logging, in which case dwlogmode is ignored. If a path is supplied, then dwlogmode must not be zero.
- dwLogAttributes [in]
-
Specifies how frequently the log buffer is to be flushed.
Value Meaning - INSTALLLOGATTRIBUTES_APPEND
If this value is set, the installer appends the existing log specified by szLogFile. If not set, any existing log specified by szLogFile is overwritten.
- INSTALLLOGATTRIBUTES_FLUSHEACHLINE
Forces the log buffer to be flushed after each line. If this value is not set, the installer flushes the log buffer after 20 lines by calling FlushFileBuffers.
Return value
| Value | Meaning |
|---|---|
|
An invalid log mode was specified. |
|
The function succeeded. |
Remarks
For a description of the Logging policy, see System Policy.
The path to the log file location must already exist when using this function. The Installer does not create the directory structure for the log file.
Requirements
|
Version | Windows Installer 5.0 on Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003, Windows XP, and Windows 2000. See the Windows Installer Run-Time Requirements for information about the minimum Windows service pack that is required by a Windows Installer version. |
|---|---|
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | MsiEnableLogW (Unicode) and MsiEnableLogA (ANSI) |
See also
Send comments about this topic to Microsoft
Build date: 2/3/2012
As a part of the Open Protocol Specifications, the hex values for Win32 error codes can now be found at http://msdn2.microsoft.com/en-us/library/cc231199.aspx.