TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
padma
NA
11
11.8k
How to get the process description based on process ID(c#)?
Jul 10 2014 3:06 AM
Hi all,
I have tried in two ways
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 it was not mention in the properties 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 not the Image Name.
Can any one share your ideas how to get process description in taskmanager for particular process id.
Reply
Answers (
4
)
Kendo Menu Control not working on Internet Explorer(In mvc)
FATAL ERROR DURING VISUAL STUDIO 2012 ULTIMATE INSTALLATION