Q. How can I register a script to run based on certain events?
November 16, 2010
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.
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.
Select the "Attach Task To This Event" action.
Enter a name and description for the new task and click Next.
The event details will be displayed. Click Next.
Select the Start a program action (or select e-mail or display a message) and click Next.
Enter the program or script with arguments, if needed, and click Next.
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
You May Also Like