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

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

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.
Answered 09/03/2009 by: VBScab
Red Belt

Please log in to comment
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
Answered 09/04/2009 by: imvijay123
Senior Yellow Belt

Please log in to comment
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...
Answered 09/05/2009 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity