I'm looking for a way to determine all the files a process has opened on Windows. This is different from many (already answered) questions on here because I need to know all files the process has opened, not just the ones it has open when I look for them. That way, I avoid missing files that have been completely loaded into memory and then closed. Here are some things I've tried that haven't worked:
- ProcExp and Handle by SysInternals (both only list currently open files)
- ProcMon by SysInternals (with filters of the process name and the ReadFile and WriteFile operation). This one surprised me. Why wouldn't it work?
My test case is opening a text file off of a flash drive with Notepad, so I wouldn't expect ProcExp or Handle to work (since Notepad reads everything into memory, then closes the file). ProcMon seems like it should work, though. In fact, when I edit the text file and save it, I can see the WriteFile operation and the path to my text file. The only ReadFile operations I can see when I open the file, though, are of C:\Windows\Fonts\StaticCache.dat
. Maybe it's just that my filter config is wrong? Or would another tool work better for me?