Jump to content

Insert an event in Event Viewer


Recommended Posts

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:

Link to comment
Share on other sites

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...