Some code for writing to the Application Event Log. Could be used to log different outcomes during script execution.
VBSTART
'WriteEvent
'eventtype: 0 = information
' : 1 = error
' : 2 = warning
Sub WriteEvent(eventtype, message)
Set objShell = CreateObject("Wscript.Shell")
objShell.LogEvent eventtype, message
Set objShell = Nothing
End Sub
VBEND
//Log Success
VBRun>WriteEvent,0,Script Started
//Log An Error
VBRun>WriteEvent,1,Oops
Write to System Event Log
Moderators: Dorian (MJT support), JRL, Phil Pendlebury
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Write to System Event Log
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?