JO

Any ideas how I could post somthing to the Application section of the logs you see through "eventvwr" as "information" with a Batch File ?
Maybe even through cscript & vbs ?

add a comment
0

2 Replies

  • Votes
  • Oldest
  • Latest
AL

Check out eventcreate.exe in windows\system32

add a comment
0
JO

Thanks Alkatr0z, that's exactly what I'm looking for. 😁

I might have to go with somthing using VBS & WScript.Shell though, eventcreate.exe looks like it's Windows XP Professional & higher.
I can think of a handfull of people who will use this that are running XP Home at the moment.

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"
add a comment
0