Any ideas on how I could post something to the Application section of the logs you see through eventvwr as "information" with a Batch File?
Maybe even through cscript
and vbs
?
Any ideas on how I could post something to the Application section of the logs you see through eventvwr as "information" with a Batch File?
Maybe even through cscript
and vbs
?
For those who can use eventcreate to write to the event log as mentioned by Alkatr0z (I am currently using Windows 10), it would look like this:
EVENTCREATE /T ERROR /L APPLICATION /ID 100 /D "This is test information."
Obviously, you don't have to run that directly from the CLI, you can put that in your batch file and run the command when needed. Here is the result in the application section of the logs in the Windows Event Viewer:
I found Wscript.Shell.LogEvent
, which works on XP Home. Here's a glimpse of how this monster works:
eventcreate.vbs
'http://www.microsoft.com/technet/scriptcenter/guide/sas_log_akqy.mspx?mfr=true
'type, message[, remote computer]
Dim Args: Set Args = Wscript.Arguments
Dim objShell: Set objShell = Wscript.CreateObject("Wscript.Shell")
'objShell.LogEvent Args(0), Args(1), Args(2)
objShell.LogEvent Args(0), Args(1)
batch.bat
cscript "eventcreate.vbs" 4 "This is test information"
windows\system32
— Alkatr0z