MSI.EnableLog

boolean MSI.EnableLog ( 

number  LogMode,

string  LogFile,

boolean Append = false,

boolean FlushEachLine = false )

Description

Calls the MsiEnableLog function to set the log mode for all subsequent installations that are initiated in the calling process. This action is usually called before calling the MSI.InstallProduct action.

Parameters

LogMode

(number) The log mode. Use the plus sign ("+") to combine values. If this value is zero and LogFile is nil, then logging will be turned off. Choose from one or more of the following:

CONSTANT

VALUE

DESCRIPTION

INSTALLLOGMODE_FATALEXIT

1

Logs out of memory or fatal exit information.

INSTALLLOGMODE_ERROR

2

Logs the error messages.

INSTALLLOGMODE_WARNING

4

Logs the warning messages.

INSTALLLOGMODE_USER

8

Logs the user requests.

INSTALLLOGMODE_INFO

16

Logs the status messages that are not displayed.

INSTALLLOGMODE_RESOLVESOURCE

64

Request to determine a valid source location.

INSTALLLOGMODE_OUTOFDISKSPACE

128

Indicates insufficient disk space.

INSTALLLOGMODE_ACTIONSTART

256

Logs the start of new installation actions.

INSTALLLOGMODE_ACTIONDATA

512

Logs the data record with the installation action.

INSTALLLOGMODE_PROPERTYDUMP

1024

Logs the property values at termination.

INSTALLLOGMODE_COMMONDATA

2048

Logs the parameters for user-interface initialization.

INSTALLLOGMODE_VERBOSE

4096

Sends large amounts of information to a log file not generally useful to users. May be used for technical support.

INSTALLLOGMODE_EXTRADEBUG

8192

Sends extra debugging information, such as handle creation information, to the log file. This feature is not supported on Windows XP.

INSTALLLOGMODE_LOGONLYONERROR

16384

Logging information is collected but is less frequently saved to the log file. This can improve the performance of some installations, but may have little benefit for large installations. The log file is removed when the installation succeeds. If the installation fails, all logging information is saved to the log file.

LogFile

(string) The full path and filename of the log file. Specify nil to turn logging off.

Append

(boolean) Whether the installer should append or overwrite any existing log file. Choose from:

VALUE

DESCRIPTION

true

Append to any existign log file specified in LogFile.

false

Overwrite any existing log file specified in LogFile. (Default)

FlushEachLine

(boolean) Whether the log buffer should be flushed after each line, or flushed after 20 lines. Choose from:

VALUE

DESCRIPTION

true

Force the installer to flush the log buffer after each line.

false

Flush the log buffer after 20 lines. (Default)

Returns

(boolean) Returns true if the action was successful, or false if it failed. You can use Application.GetLastError to determine whether this action failed, and why.

See also:  Related Actions