How To Write An Event In Windows Log When Your Script Started And When Is Completed
Description
Windows event log is the most easy way to save the events related with your scripts.
For example this can be used to know if a scheduled task is successful.
Solution.
You need to use the following code:
Set Wsobject = CreateObject(" WScript.Shell ")
Wsobject.LogEvent 4, "Script started."
‘ Here comes your visual basic script.
Wsobject.LogEvent 0, "Script completed."
Related posts: