/build/static/layout/Breadcrumb_cap_w.png

Custom Action to log a warning in windows Event Viewer

Hi All,

I am trying write a VBScript based custom action that would log a warning in the windows Event Viewer. I wish to execute this custom action when some condition is fulfilled.
I know one way of doing it is by using the LogEvent method of the WScript.Shell object. Are there some other ways of achieving the same?

Thanks,

Vijay

0 Comments   [ + ] Show comments

Answers (3)

Posted by: anonymous_9363 14 years ago
Red Belt
0
I'd say no. There may be a route via WMI but since you already have a perfectly serviceable method, I'm struggling to know why you'd need another.
Posted by: imvijay123 14 years ago
Senior Yellow Belt
0
The problem with LogEvent is that it does not allow me to manipulate the source or the EventID of the warning that it logs in the Event Viewer. I also found out the the windows Event Logging Utility (Logevent.exe from Windows NT 4.0 Resource Kit) which allows to manipulate the event properties but i am not sure if it works on all types of Windows OS.

I am currently researching a utility which displays certain events from the event viewer. I am trying to figure out the pattern of the events that it picks up at run time.

Thanks,

Vijay
Posted by: anonymous_9363 14 years ago
Red Belt
0
The problem with LogEvent is that it does not allow me to manipulate the source or the EventID of the warning that it logs in the Event Viewer. I also found out the the windows Event Logging Utility (Logevent.exe from Windows NT 4.0 Resource Kit) which allows to manipulate the event properties but i am not sure if it works on all types of Windows OS.
Silly of me not to have known that, really, eh? What with you having spelt it out so clearly in your original post...
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ