You can create custom events, to aid in debugging, or to provide informational messages, my using the EventCreate utility in your batch script.

When you open a CMD prompt and type EventCreate /?, you receive:

<b>EVENTCREATE \[/S system \[/U username \[/P \[password\]\]\]\] /ID eventid
            \[/L logname\] \[/SO srcname\] /T type /D description</b>

    This command line tool enables an administrator to create
    a custom event ID and message in a specified event log.

Parameter List:
    <b>/S</b>    system           Specifies the remote system to connect to.

    <b>/U</b>    \[domain\\]user    Specifies the user context under which
                           the command should execute.

    <b>/P</b>    \[password\]       Specifies the password for the given
                           user context. Prompts for input if omitted.

    <b>/L</b>    logname          Specifies the event log to create
                           an event in.

    <b>/T</b>    type             Specifies the type of event to create.
                           Valid types: ERROR, WARNING, INFORMATION.

    <b>/SO</b>   source           Specifies the source to use for the
                           event. A valid source can be any string
                           and should represent the application or
                           component that is generating the event.

    <b>/ID</b>   id               Specifies the event ID for the event. A
                           valid custom message ID is in the range of 1 - 1000.

    <b>/D</b>    description      Specifies the description to be set for
                           the newly creating event.

    <b>/?</b>                     Displays this help/usage.


    EVENTCREATE /T ERROR /ID 100 /L APPLICATION /D "Create an event in application log"

    EVENTCREATE /T ERROR /ID 999 /L APPLICATION /SO WinWord /D "new source Winword in application log"

    EVENTCREATE /S system /T ERROR /ID 100 /L APPLICATION /D "Remote system without user credentials"

    EVENTCREATE /S system /U user /P password /ID 100 /T ERROR /L APPLICATION /D "Remote machine with user credentials"

    EVENTCREATE /S system /U domain\user /ID 100 /T WARNING /SO MyBatchFile.cmd /D "Maintenance script user logon failed"</b>

You must include the the /T, /ID, and /D switches, as well as the /L or /SO switches.

The system parameter used with the /S switch  can be a computer name or an IP address. If you omit /S, the local computer is used.

The description parameter of the /D switch should be quoted (") if spaces are included.