0

enter image description hereI am new in C#, I want to get the application name (Which is displaying in task manger app part) using .exe.

I have googled it but didn't found useful information.

I want to Description information for each exe.

Thanks,

CrazyCoder
  • 772
  • 5
  • 11
  • 31
  • You can maybe be more specific. If you want to get the app name it's like this post with : `System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;` https://stackoverflow.com/questions/14829689/how-to-get-exe-application-name-and-version-in-c-sharp-compact-framework – Hamid Cherif Aug 29 '17 at 10:59
  • That will provide your application executable name. I want all application name which is currently running. – CrazyCoder Aug 29 '17 at 11:17
  • I think that this is what you are looking for : https://stackoverflow.com/a/648413/2599868 `using System.Diagnostics; ... var allProcceses = Process.GetProcesses();` Then get the name or any other information from that object – Hamid Cherif Aug 29 '17 at 12:29
  • I have put snapshot in question. I want to get descrption information for each exe. – CrazyCoder Aug 29 '17 at 13:08
  • I have put snapshot for my question . Now you will understand better. What you are saying, we will get process name. I want description of each exe. ? – CrazyCoder Aug 29 '17 at 13:10
  • Possible duplicate of [Retrieving Process Description Information](https://stackoverflow.com/questions/1192046/retrieving-process-description-information) – Hans Passant Aug 29 '17 at 13:23

1 Answers1

0

You can use the Process class located under System.Diagnostics :

using System.Diagnostics; ... var allProcceses = Process.GetProcesses(); //loop throught processes string process_description= process.MainModule.FileVersionInfo.FileDescription;

This answer provides some information about the Process class.

NB : you may have some issues when trying to access some processes running under SYSTEM credentials : see this post.

Hamid Cherif
  • 171
  • 2
  • 16