Sign in to follow this  
Followers 0
LaurentiuB

Insert an event in Event Viewer

4 posts in this topic

It is possible to insert an event in event viewer application ?

Share this post


Link to post
Share on other sites



This may help you to log an event.

_LogEvent(0, 'Testing LogEvent')

Exit

Func _LogEvent($iType, $sMessage, $sTarget = @ComputerName)
    ; Adds an event entry to a log file
    ; Type: 0=Success, 1=Error, 2=Warning, 4=Information, 8=Audit_Success 16=Audit_Failure
    Local $oWshShell = ObjCreate("WScript.Shell")
    If Not @error Then
        $oWshShell.LogEvent($iType, $sMessage, $sTarget)
        Return True
    EndIf
EndFunc

:whistle:

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0