1

I have several copies of a program running. I would like to find the PID for a particular one of these processes. I can identify the window which spawned the process (and there is only one process from that window) but I cannot tell it apart from other similar processes.

Any ideas?

Charles
  • 363
  • 2
  • 3
  • 17

2 Answers2

3

Use SysInternals Process Explorer. Right-click on the process, and bring the Window to the Front. This technically lets you find the window from the potential processes, so you might have to do it a few times until you find the one you care about.

Alternatively, if the one you care about has a specific file open, you could run handle.exe and find the PID that way.

Are there any other distinguishing characteristics about the process that you care about? Is the start-string different, the path, something?

mfinni
  • 36,144
  • 4
  • 53
  • 86
  • Great answer, I'd accept it if I could accept two. No, generally there's nothing distinguishing them -- both will be started with the same command-line options, but they'll be doing different things depending on what happens after they open. – Charles Feb 09 '11 at 00:28
2

You can pull up Task Manager (CTRL+SHIFT+ESC), and then right-click the window you want on Applications and choose "Bring To Front". When you've identified the correct window, right-click it and choose "Go To Process". Now, under the "View" menu, choose "Select Columns...", and check the PID box. The PID will now appear as a separate column alongside your highlighted process.

BMDan
  • 7,249
  • 2
  • 23
  • 34
  • That works too. I just prefer all of the options and features from the sysinternals tools. TaskMan.exe won't show you the starting string, path, etc. – mfinni Feb 08 '11 at 21:09