troubleshooting Question

Windows Task Scheduler issues

Avatar of ddantes
ddantesFlag for United States of America asked on
OutlookWindows OSWindows 7
4 Comments1 Solution57 ViewsLast Modified:
Running Windows 7 Professional SP-1 64-bit.  I have a Windows Scheduled Task event with a custom trigger, to execute a batch file when Outlook opens, and after a one minute delay.  The Event Viewer does not seem to record any Application Event when Outlook is launched, so I  used a security audit event as a trigger.

The task is configured not to run another instance, if already running.  Most of the time, it works, but sometimes the batch file is executed without the delay.  And sometimes multiple instances of the batch file are launched.  Failing to implement the one minute delay is not critical, but I'd like to know if there is a way to avoid having more than one instance of the batch file running.  

I know that Windows 7 is no longer supported by Microsoft, and Office12 Outlook is a legacy application, and those factors are not an intended focus of this question.

Here is the custom trigger...

  <Query Id="0" Path="Security">
    <Select Path="Security">
     *[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and Task = 13312 and (band(Keywords,9007199254740992)) and (EventID=4688)]] 
     *[EventData[Data[@Name='NewProcessName'] and (Data='C:\Program Files (x86)\Microsoft Office\office12\Outlook.exe')]]

Open in new window


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros