Tuesday, March 18, 2008

Log events to the local application log

This script uses the LogEvent method to write an event to the local application log. In the below, the value of strResults would have been previously set.

Set WshShell = WScript.CreateObject("WScript.Shell")
if strResults = "0" then
WshShell.LogEvent 0, "Condition 0 happened."
WshShell.LogEvent 1, "Condition 1 happened."
end if

No comments: