Q. How can I register a script to run based on certain events?

John Savill

November 16, 2010

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. It's possible to configure actions to fire based on event IDs. Before Windows Vista and Windows Server 2008, you could trigger based on the eventtriggers.exe command. It's even easier with Windows Vista and later OSs.

  1. Open Event Viewer and select an instance of the event that you want to use as a trigger. Note that you can manually perform this in task scheduler, but this is simpler if you already have an instance of the event ID you want to trigger from.

  2. Select the "Attach Task To This Event" action.

  3. Enter a name and description for the new task and click Next.

  4. The event details will be displayed. Click Next.

  5. Select the Start a program action (or select e-mail or display a message) and click Next.

  6. Enter the program or script with arguments, if needed, and click Next.

  7. Click Finish.

You now have an action that will trigger based on the event ID configured. It will display under Task Scheduler, Task Scheduler Library, Event Viewer Tasks.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like