|
|
| Purpose: | Write a string to the Windows event log. |
| Format: | EVENTLOG [/Cn /E /I /S source /W] message |
| message | The text to write. |
| source | The source for this message. |
Usage:
EVENTLOG posts messages to the Windows application event log. Each message can be a maximum of 8,191 characters long. You cannot use the command separator character ([&]) or the redirection symbols (| > <) in an EVENTLOG message, unless you enclose the message in quotes or precede the special characters with the escape character.
By default, the text written with EVENTLOG is stored in the event log as informational messages. You can store warning and error messages by using the /W and /E switches.
Messages in the log can be reviewed with the Windows Event Log viewer.
If you do not have proper registry permissions when you execute the EVENTLOG command and/or the key cannot be created, EVENTLOG will fail and display an error. EVENTLOG is primarily intended for use by users with Administrator status.
Options:
0 - None
1 - Devices
2 - Disk
3 - Printers
4 - Services
5 - Shell
6 - System
7 - Network
| /I | Store the message as an informational entry in the event log. This is the default if no switch is used. |
| /S | Specify the event log entry source. (If the source contains white space, it must be double-quoted). For example: |
eventlog /sCompiling /I Your message here.