Create Event Log

Creates an event log for the specified source.

Privileges

Elevated - Run as administrator.

Input Parameters

Name Type Required Description
Log Name String Yes The name of the log, the value of the Log property. Wild cards are not permitted.
Source String Yes Specifies the names of the event log sources, such as application programs that write to the event log. This parameter is required.
Message Resource File String No Path to the message resource file used by this log.
Category Resource File String Yes Path to the category resource file used by this log.
Event ID Number Yes The event identifier.
Category String Yes Specifies a task category for the event. Enter an integer that is associated with the strings in the category message file for the event log.
Data String No The binary data that is associated with the event, in bytes.

Output Parameters

Name Type Description
Result Number Returns a success value of zero or any value other than zero to indicate failure.

Example Input Parameters

Name Type Required Example
Log Name String Yes Application
Source String Yes MSP Name
Msg Resource File String Yes  
Category Resource File Selector Yes