
Logging to system event logs...
Will the application log do?
From http://msdn.microsoft.com/library/en-us/script56/html/wsmthlogevent.asp
Set WshShell = WScript.CreateObject("WScript.Shell")
rc = runLoginScript() 'Returns true if logon succeeds.
if rc then
WshShell.LogEvent 0, "Logon Script Completed Successfully"
else
WshShell.LogEvent 1, "Logon Script failed"
end if
Regards,
Ian
WSH FAQ http://groups.msn.com/windowsscript
Quote:
> Hi Everyone,
> I am new to the world of VB and have hit a stumbling
> block. I have developed a script that so far,
> 1. retrieves the text from a URL
> 2. loads this in to a string
> 3. looks for a specific word within that string
> 4. if the word exists, outputs a message to the screen.
> What I need to do on step 4 is to generate an event in the
> windows 2000 application log. The reason for this is that
> I am using the script to check for failures within the web
> sites that I have running and if one of the servers fails,
> generate an event. I then have a monitoring tool that is
> monitoring the Win2K application log, this tool will pick
> up on the failed event and e-mail me.
> All I am missing is that last step in the process.
> Any help is greatly appreciated.
> Aaron Townsend