How to get the Process Description of an external process using C#?

Sometime we need to find out details of running process which is external to your current process, might be a third party one. If you are currently looking for some code to find out details of a process, this post will definitely help you. Here we will learn, how to get the process description using C#.


Continue reading to learn about it. Also, sample code has been shared for you to understand it better. If you have specific query, drop a line in the comment section.


How to get the Process Description of an external process using C#? (


If you open the Task Manager in your Windows system and navigate to the details tab, as shown below, you will find out the various process names running in your system. This includes the name of the process, the process ID (aka. PID), status of the process and the description.


If you are a developer and looking for an way to retrieve using C#, the “Process” instance doesn’t return this information. To do this, we need to iterate thru the Win32_Process using the ManagementObjectSearcher.


Windows Process Information in Task Manager (



Normal SQL like query “Select * from Win32_Process” returns you all the process currently running in the system. You first need to create an object of ManagementObjectSearcher passing the query and then call the Get() method to retrieve all the process. Each process consists of different properties which returns the value of it. For example, “Name” and “ExecutablePath” returns the name and path of the process.


Once you have the path of the process executable, you can use FileVersionInfo.GetVersionInfo(…) method to retrieve the file description. Below is the code snippet, which will give you clear understanding:

public static void GetProcessInformations()
    var searcher = new ManagementObjectSearcher("Select * From Win32_Process");
    var processList = searcher.Get();

    foreach (var process in processList)
        var processName = process["Name"];
        var processPath = process["ExecutablePath"];

        if (processPath != null)
            var fileVersionInfo = FileVersionInfo.GetVersionInfo(processPath.ToString());
            var processDescription = fileVersionInfo.FileDescription;

            Console.WriteLine("{0} - {1}", processName, processDescription);


Windows Process Information (


If you run the above code snippet, this will result the above output in console screen. I hope the post was simple and easy to understand. If you have any queries on this front, do let me know. I will try to revert you as soon as possible.


If you have come this far, it means that you liked what you are reading. Why not reach little more and connect with me directly on Twitter , Facebook , Google+ and LinkedIn . I would love to hear your thoughts and opinions on my articles directly. Also, don't forget to share your views and/or feedback in the comment section below.


  1. hi,
    Nice Article...
    Its very helpful...
    Thank you for sharing...


© 2008-2016 - Microsoft Technology Blog for developers and consumers | Designed by Kunal Chowdhury
Back to top