Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Event Log

Status
Not open for further replies.

minoad

Programmer
Mar 28, 2001
138
US
This is no doubt an amaturish question, but how can i write to the event log through vbscript. I have found a ton of info with regards to WMI, but all of the properties are read only, and i have not seen any methods that fit the bill.

Thanks in advance

Micah A. Norman
 
Micah,

Look at WshShell..

Following is a snippet that I use in my error routine to pop the error or success to the Applications Event log.

// create entry in nt event log
var WshShell = new ActiveXObject("WScript.Shell");
WshShell.LogEvent(1, "Script failed\n" + sBody);
var WshShell = null;

HTH

Dougc


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top