I want to write event log when this vbscript run. How to i can?
Thanks for any help.
Like so:
Set shell = CreateObject("WScript.Shell")
shell.LogEvent 4, "Your Message Here"
The 4 is a severity level. You can learn more about the LogEvent
method on MSDN.
This is old but I'm sure still valid.
http://msdn.microsoft.com/en-us/library/b4ce6by3
You also need permissions to be able to write to the event log so depending on the user running the script you may or my not have access.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With