0

I am now trying to report event log to windows, right now I am using win32evtlogutil


        win32evtlogutil.ReportEvent(
            app_name, app_event_id,
            eventCategory=app_event_category,
            eventType=event_type,
            strings=[str(message)], data=app_event_data
        )

but this only report event log to application log? but how can I report the event to security log(see picture below)?

enter image description here

0

1 Answer 1

2

As of Windows XP SP2+ ReportEvent() cannot be used to report security events. You must use the Windows API AuthzReportSecurityEvent() function. PyWin32 does not have a convenience binding for this function, so you would need to write the binding yourself.

Sign up to request clarification or add additional context in comments.

2 Comments

can I write it to system log?
@HongliBu: Yes, use "System" as the 1st argument (app_name) for win32evtlogutil.ReportEvent. Related: stackoverflow.com/questions/51385195/….

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.