Click here to return to the KiXtart HelpDesk main page...

KiXtart 2001 Manual

LogEvent( )

Action: Logs an event in the Windows NT event log.
 
Syntax: LOGEVENT (type, ID, message, target, source)
 
Parameters: Type

Number representing the type of the event. Possible values:

0

SUCCESS

1

ERROR

2

WARNING

4

INFORMATION

8

AUDIT_SUCCESS

16

AUDIT_FAILURE

ID

Number representing the event that occurred.

Message

Message text of the event.

Target

Optional parameter representing the UNC name of the system where the event should be logged. By default, all events are logged on the local system.

Source

Optional parameter representing the source of the event. If this parameter is not specified, KiXtart will assume the KIX32.EXE as the source of the event.

Remarks: This function is only available on Windows NT/2000 clients.
 
Returns:
0 Event logged
Error code Function failed  
 
See Also: BackupEventLog( ), ClearEventLog( )
 
Example:

$RC = LogEvent( 0 , 1 , "Logon script completed successfully" , "", "MyEvent" )
$RC = LogEvent( 0 , 1 , "Logon script completed successfully")
$RC = LogEvent( 1 , 1 , "Logon script failed!" , @LSERVER )