3

I have a WPF Application that starts several "hosted" processes, When i start my WPF Application, It will start the same .exe process couple of times with different arguments in each time.

I want to name each process with a different name (or description) - so I could detect which is which in Task manager (if i want to shutdown one of them).

I understand i cannot set a different process ImageName for each - since they are all the same actual .exe file.

Is there a way I atleast change the process description during run-time, or during its start time (change a ProcessStartInfo parameter or something like that) ..?

ilansch
  • 4,784
  • 7
  • 47
  • 96
  • I am just so surprised that nobody advised of tracking the process id... https://stackoverflow.com/questions/3003975/how-to-get-the-current-processid – Hozikimaru Jul 25 '18 at 12:45
  • Back then (2013), I wanted unique eady to remember string to each insyance, so I would know each process subject. I did not want to log the id and then compare, the cml argument the guy below proposed is good solution. – ilansch Jul 25 '18 at 13:39

1 Answers1

12

No you can't; the "description" column displays a value that is loaded by Windows when your process starts. It comes from a version information section embedded in the executable file.

What you could do is simply display the "command line" column of task manager.

ken2k
  • 48,145
  • 10
  • 116
  • 176