title: How To Get The Process Description Based On Process ID?(c#.net)
body: <p>I have tried in two ways to get the proocess description</p>
  
  <p><strong>Solution1:-</strong></p>
  
  <p><code>code:- 
  Process proc = Process.GetProcessById(pid);
  string process_description= proc.MainModule.FileVersionInfo.FileDescription</code></p>
  
  <p><strong>Problem:</strong>-when we trying to access the MainModule property for some processes 0(idle), 4(system) or services(Having admin acces rights)
  (most likely those running under SYSTEM credentials) on which user don't have the permission leads to win32 ACCESS DENIED EXCEPTION.</p>
  
  <p><strong>Solution 2:-</strong></p>
  
  <pre><code> code :
   string process_description=FileVersionInfo.GetVersionInfo(modulePath).FileDescription;
  </code></pre>
  
  <p><strong>Problem</strong> :-Unable to get process decription if file description is not mention in the properties details window of exe file or process which have admin rights .</p>
  
  <p>For example:if process is google chrome.
  ImageName:-chrome.exe         Description :Google chrome 
  I want to get the description part  not the Image Name. </p>
  
  <p>Can any one share your ideas how to get process description in taskmanager for particular process id.</p>