Automate saving event log

P

Peter CCH

Is there any way to automate saving of event log with script?

When certain event occur (specific to an event ID), then a script will
be run to save the event log.

Eventtriggers.exe can be used to trigger an action when certain event
occur, but I don't know how to automate the saving of the event log.

Any idea?

Thanks.



Peter CCH
 
D

Dave Patrick

Something here may work for you.

http://www.microsoft.com/technet/scriptcenter/scripts/logs/eventlog/default.mspx

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Is there any way to automate saving of event log with script?
|
| When certain event occur (specific to an event ID), then a script will
| be run to save the event log.
|
| Eventtriggers.exe can be used to trigger an action when certain event
| occur, but I don't know how to automate the saving of the event log.
|
| Any idea?
|
| Thanks.
|
|
|
| Peter CCH
|
 
P

Peter CCH

Thanks.
OK, I got the script work and able to save the event log I want.

But I have problem during trying the eventtriggers.

I try to create an eventtriggers with this:

eventtriggers /create /TR "AOS Shutdown Event Log" /L Application /EID
108 /TK c:\BackupEventLog.vbs

But it seems like not working, when the event with Event ID 108 occur,
the BackupEventLog.vbs doesn't seem to be executed.

Any idea?

Thanks.



Peter CCH
 
D

Dave Patrick

You may need to explicitly call the scripting engine. Try something like;

/TK cscript //b c:\BackupEventLog.vbs

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Thanks.
| OK, I got the script work and able to save the event log I want.
|
| But I have problem during trying the eventtriggers.
|
| I try to create an eventtriggers with this:
|
| eventtriggers /create /TR "AOS Shutdown Event Log" /L Application /EID
| 108 /TK c:\BackupEventLog.vbs
|
| But it seems like not working, when the event with Event ID 108 occur,
| the BackupEventLog.vbs doesn't seem to be executed.
|
| Any idea?
|
| Thanks.
|
|
|
| Peter CCH
|
 
P

Peter CCH

Everything work fine in WindowsXP and Windows Server 2003 when I use
the eventtriggers.

But problems come when I use it at Windows Server 2000, it seems like
Windows Server 2000 didin't support it.

Any idea or alternative on that?


Peter CCH
 
D

Dave Patrick

That's true. It does not exist in Windows 2000

A possible work-around
http://www.windowsitpro.com/Article/ArticleID/44692/44692.html?Ad=1

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| Everything work fine in WindowsXP and Windows Server 2003 when I use
| the eventtriggers.
|
| But problems come when I use it at Windows Server 2000, it seems like
| Windows Server 2000 didin't support it.
|
| Any idea or alternative on that?
|
|
| Peter CCH
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top