Sysinternals 进程监视器 (ProcMon) : Using wildcards on filter

标签 sysinternals procmon process-monitor

我正在使用Sysinternals Process Monitor调试一些传入事件,现在我尝试在路径上创建一个过滤器并使用通配符。我试图使用的是过滤以 c:\MyApp\MyDocuments\Temp 开头并以 .pdf 结尾的路径

路径过滤器应如下所示:c:\MyApp\MyDocuments\Temp*.pdf

我该怎么做?

最佳答案

当你有两个像这样的过滤器时:

  • 路径 开头为 c:\MyApp\MyDocuments\Temp
  • 路径 结尾为 .pdf

所发生的情况是包含以该临时文件夹开头的任何内容,并且包含记录 .pdf 事件的其他任何位置,因此您将得到不想要的结果。像这样的东西:

C:\MyApp\MyDocuments\Temp.txt (not a PDF)
C:\Some\Other\Folder\file.pdf (not the folder I want)

进程监视器帮助文件解释了为什么开头为/结尾为过滤器不能一起工作。来自帮助文件:

Process Monitor ORs together all the filters that are related to a particular attribute type and ANDs together filters of different attribute types. For example, if you specified process name include filters for Notepad.exe and Cmd.exe and a path include filter for C:\Windows, Process Monitor would only display events originating in either Notepad.exe or Cmd.exe that specify the C:\Windows directory.

因此,因为过滤器实体对于“开头为”和“结尾为”都是“路径”,所以进程监视器对它们进行 OR 运算,因此我们得到了我们不想要的噪音。这是一个按我们想要的方式工作的过滤器组合:

  • 路径 结尾 .pdf 包含
  • 路径 排除 C:\MyApp\MyDocuments\Temp 排除
据我所知,“排除”关系运算符的行为类似于“不包含”。我找不到任何列出所有运算符(operator)及其功能的具体文档,但看起来就是这样。因此,即使我们有两个将进行“或”运算的“路径”过滤器,因为一个是“包含”,另一个是“排除”,我们得到的只是在该文件路径中编辑的 PDF。

关于Sysinternals 进程监视器 (ProcMon) : Using wildcards on filter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64172904/

相关文章:

winapi - 为什么 WMI 比使用 PsExec 或 PsList 等实用程序慢得多?

data-structures - SYSTEM_HANDLE_INFORMATION 结构

c# - 在控制台窗口不闪烁的情况下启动 conhost.exe

windows - 通过 PsExec 在远程计算机中执行批处理文件

windows - 设备驱动程序如何像Process Monitor一样成为EXE

linux - 需要top的源码,找到linux中top和/proc/目录的联系

windows - Procmon 的命令行版本

c# - 为什么我在操作菜单上找不到 "Debug Managed Memory"?

c# - 如何在 C# 中记录低级操作系统文件事务?

asp.net - 如何使用 Process Monitor 确定哪个 DLL 导致 BadImageFormatException