Skip to Main ContentWindow-Eyes  Braille Sense  CCTV  Voice Sense  SyncBraille  Support  Training
GW Micro - Unleashing the power of your mind's eye.
 

Logging Events in the Windows Event Viewer - GWWiki

Jump to: navigation, search

If you find your script is generating an error, and then dying before you have the opportunity to review what the error was, you have a couple of options. You can use the GW Toolkit Error Reporting feature to automatically save detailed error reports to a file when errors occur. Or you can use the WScript.Shell object to write directly to the Windows Event Viewer, like this:

Set shellObj = CreateObject("WScript.Shell")
shellObj.LogEvent 0, "This is a test event.", "\\."

You can read more about the LogEvent feature of the MSDN LogEvent page. Additionally, if you decide to use this feature, you should familiarize yourself with the various logging guidelines, available on the MSDN Logging Guidelines page.


This page was last modified on 19 December 2009, at 21:31.

This page has been accessed 8,349 times.


Text Size:
Decrease Text Size Increase Text Size

Personal tools

Powered by MediaWiki
Public Domain
© 2013 GW Micro, Inc. All Rights Reserved.
GW Micro, Inc.    725 Airport North Office Park    Fort Wayne, IN 46825
Ph: 260-489-3671 Fax: 260-489-2608    www.gwmicro.com    sales@gwmicro.com    support@gwmicro.com
Hours: M-F, 8a-5p, EDST