Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Task Scheduler custom query filter needed for trigger


26 Apr 2014   #1

win7 home premium 64 bit
 
 
Task Scheduler custom query filter needed for trigger

I have two events that I need to do two different tasks when they happen.
However I can't get my custom filter to work.
Here are the two events:
1.
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="AudioSwitcher" />
<EventID Qualifiers="0">1</EventID>
<Level>4</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-04-22T13:38:47.000000000Z" />
<EventRecordID>40684</EventRecordID>
<Channel>Application</Channel>
<Computer>TCVBD-2900-X4</Computer>
<Security />
</System>
- <EventData>
<Data>Speakers</Data>
</EventData>
</Event>

2.
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
<Provider Name="AudioSwitcher" />
<EventID Qualifiers="0">1</EventID>
<Level>4</Level>
<Task>0</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-04-22T13:18:28.000000000Z" />
<EventRecordID>40679</EventRecordID>
<Channel>Application</Channel>
<Computer>TCVBD-2900-X4</Computer>
<Security />
</System>
- <EventData>
<Data>Headset Earphone</Data>
</EventData>
</Event>

I tried this custom filter for trigger:

<QueryList>
<Query Id="0" Path="Application">
<Select Path="Application">*[EventData[Data='Speakers']]</Select>
<Select Path="Application">*</Select>
</Query>
</QueryList>

I tried this as well:
<QueryList>
<Query Id="0" Path="System">
<Select Path="System">
*[System[Provider[@Name='AudioSwitcher'] and (Level=4 or Level=0) and (EventID=1)]]
and
*[EventData[Data[Speakers]]]
</Select>
</Query>
</QueryList>

but task ignored data.
Help!
Thanks,
Ray

My System SpecsSystem Spec
.

Reply

 Task Scheduler custom query filter needed for trigger




Thread Tools



Similar help and support threads for2: Task Scheduler custom query filter needed for trigger
Thread Forum
Task Scheduler recognizes only first trigger Performance & Maintenance
How to trigger 'task scheduler' on new wifi connection? Network & Sharing
Solved Task scheduler: trigger on screensaver event possible? Performance & Maintenance
Help with using idle trigger in Win Task Scheduler Performance & Maintenance
Task Scheduler Trigger @ Program shutdown Performance & Maintenance

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 12:50 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33