1

I need a way to get PIDs of processes that have specific 32-bit .dll module loaded. Powershell (x86) has Get-Process -Module, but it takes too long and doesn't have PID linked if -Module argument specified. wmic has fast process, but nothing about modules. Psapi.h has EnumProcessModules, but then I will have to get a handle for every process, which probably be quite slow. Is there any nice and fast way of doing it with cmd/powershell/standard dll?

3
  • tasklist /m user32.dll
    – Mark
    Commented Mar 10, 2020 at 2:51
  • Whichever means you use will be using psapi under the hood. There is generally only one way to do things on Windows. Many ways of accessing that one way.
    – Mark
    Commented Mar 10, 2020 at 3:29
  • Regular tasklist only searches in 64-bit modules, and C:\Windows\SysWOW64\tasklist.exe is extremely slow (like few minutes to half an hour)
    – Danil
    Commented Mar 10, 2020 at 3:31

0

You must log in to answer this question.

Browse other questions tagged .