Write to EventLog
'==========================================================================
'
' NAME: EventLog01.vbs
' AUTHOR: Neal Walters
' DATE : 2/27/2005
'
' http://VBScript-Training.com '
'==========================================================================
Set WshShell = WScript.CreateObject("WScript.Shell")
x = 5
y = 6
z = x / y
WshShell.LogEvent 0, "This Script Completed Successfully z = " & z
WshShell.LogEvent 1, "This Script ERROR"
WshShell.LogEvent 2, "This Script Warning"
WshShell.LogEvent 4, "This Script Info"
WScript.Echo "All Done"
|