How do I add a counter for process data in perfmon.exe for a process that isn't currently running?

I would like to perform an ad hoc capture of data using perfmon.exe for a process that runs during the night.

I know the name of the executable--lets call it Foo.exe.

If the process were currently running, I would go to the Add Counters dialog in perfmon, switch to the Process object, and select the Foo instance from the list. However, it's not currently running.

Is it possible to set up perfmon so that it will capture process data for this process when it starts, and if so, how would I configure it to do so?


One of the advantages of using the binary logging file format is that it will capture data for processes which start after the log file has started (this is not the case for CSV.)

Of course, you'll get a lot of extra data about all the processes you don't care about - you could mitigate this by scheduling a perfmon task that runs only around the time that Foo.exe runs. You could also use a script to filter out the data just for the one process using logparser.