Search This Blog

Thursday, May 31, 2018

Get File Version of Process c#

c# > System.Diagnostics > Process Class > GetProcesses

GetProcesses: use this method to create an array of new Process components and associate them with all the process resources on the local computer. 

Get File Version of Process

var processes = Process.GetProcesses();

foreach (var process in processes)
{
try
{
              Console.WriteLine("Process: {0} FileVersionInfo: {1}", process.ProcessName, process.MainModule.FileVersionInfo.FileVersion);
       }
       catch
{ };
}