I have tried in two ways to get the proocess description
Solution1:-
code:-
Process proc = Process.GetProcessById(pid);
string process_description= proc.MainModule.FileVersionInfo.FileDescription
Problem:-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.
Solution 2:-
code :
string process_description=FileVersionInfo.GetVersionInfo(modulePath).FileDescription;
Problem :-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 .
For example:if process is google chrome. ImageName:-chrome.exe Description :Google chrome I want to get the description part not the Image Name.
Can any one share your ideas how to get process description in taskmanager for particular process id.