When i run the task it starts the .exe fine but the event ID isn't triggering the .exe automatically.
@echo off
@SCHTASKS /Create /TN Security_Microsoft-Windows-Security-Auditing_4624 /TR "C:\Program Files (x86)\example.exe" /SC ONEVENT /EC Security /MO "*[Security[(EventID=4624)]]" /f
@exit
:h
goto h
(This is saved to notepad as a .bat and run as administrator)