Retrieving Process Description Information

.net, c#

Solution

What you see in Task Manager is actually the Description field of the executable image.

You can use the `GetFileVersionInfo()` and `VerQueryValue()` WinAPI calls to access various version informations, e.g. CompanyName or FileDescription.

For .Net way, use the `FileDescription` member of `FileVersionInfo`, instantiated with the executable name got via `Process.MainModule.FileName`.

Another way would be through `Assembly`. Load the Assembly from the executable image, then query the `AssemblyDescriptionAttribute` custom attribute.

Problem

I am trying to retrieve process information and I'm aware that I can use: ``` Process[] myProcesses = Process.GetProcesses(); ``` but how do I retrieve the process description? Is it via some Win32 API call? I'm running Vista and when I click under the Processes tab in Task Manager, I see the description.

Original source