gpt4 book ai didi

xpath - xpath事件过滤器不起作用

转载 作者:行者123 更新时间:2023-12-03 17:29:50 27 4
gpt4 key购买 nike

我正在尝试创建XPath事件过滤器,以在完成另一个任务后执行计划的任务。我的XPath看起来像这样

<QueryList>
<Query Id="0" Path="Microsoft-Windows-TaskScheduler/Operational">
<Select Path="Microsoft-Windows-TaskScheduler/Operational">
*[System[Provider[@Name='Microsoft-Windows-TaskScheduler'] and Task = 102 and (EventID=102)]]
</Select>
<Select Path="Microsoft-Windows-TaskScheduler/Operational">
*[EventData[Data[@Name=’TaskName’] and (Data=’\Visual Studio Dark Theme′)]]
</Select>
<Select Path="OAlerts">
*[System[Provider[@Name='Microsoft-Windows-TaskScheduler'] and Task = 102 and (EventID=102)]]
</Select>
</Query>
</QueryList>


我要查找的事件是此事件。

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-TaskScheduler" Guid="{DE7B24EA-73C8-4A09-985D-5BDADCFA9017}" />
<EventID>102</EventID>
<Version>0</Version>
<Level>4</Level>
<Task>102</Task>
<Opcode>2</Opcode>
<Keywords>0x8000000000000001</Keywords>
<TimeCreated SystemTime="2016-07-20T16:14:08.280937900Z" />
<EventRecordID>13055</EventRecordID>
<Correlation ActivityID="{0A2EAFD2-B40E-4C60-A099-80C020CBA547}" />
<Execution ProcessID="1164" ThreadID="6464" />
<Channel>Microsoft-Windows-TaskScheduler/Operational</Channel>
<Computer>GXLT012660.CoyoteLogistics.local</Computer>
<Security UserID="S-1-5-18" />
</System>
<EventData Name="TaskSuccessEvent">
<Data Name="TaskName">\Visual Studio Dark Theme</Data>
<Data Name="UserContext">COYOTELOGISTICS\benjamin.drolet</Data>
<Data Name="InstanceId">{0A2EAFD2-B40E-4C60-A099-80C020CBA547}</Data>
</EventData>
</Event>


每当使用上述XPath查询在事件查看器上创建自定义过滤器时,都会出现以下错误。

查询中的多个日志之一有错误。
日志:Microsoft-Windows-TaskScheduler /操作
错误:指定的查询无效。

最佳答案

这已经很老了,所以希望您从那时起找到答案,但是我遇到了同样的问题。

我发现我在查询中使用了错误的单引号,在编辑器中很难区分,但是当我在您的问题*[EventData[Data[@Name=’TaskName’] and (Data=’\Visual Studio Dark Theme′)]]中看到时,我怀疑问题是相同的。

尝试*[EventData[Data[@Name='TaskName'] and (Data='\Visual Studio Dark Theme')]]

关于xpath - xpath事件过滤器不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38485871/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com