Getting a process's description

  • Thread starter Thread starter schoenfeld1
  • Start date Start date
S

schoenfeld1

Is there a way to get the process description of an executing process?

For example, I've got the process id and executable filename for a
process but I need to get a text description of it.

I know this is possible because windows gets such a description when it
asks you to "select a program from a list" to open a file with unknown
extension.

There is also another application called ProcessExplorer which is able
to display a text description for a process.


Any suggestions welcome (win32 api calls or .net library calls).
 
Is there a way to get the process description of an executing process?

[snipped]

This is most likely the FileDescription value from the file version
information (also displayed on the Version tab on a file's description
dialog). So after you find the location of the file running, you can
retrieve this value using GetFileVersionInfo and VerQueryValue.

Good luck,
 
Martijn said:
Is there a way to get the process description of an executing process?

[snipped]

This is most likely the FileDescription value from the file version
information (also displayed on the Version tab on a file's description
dialog). So after you find the location of the file running, you can
retrieve this value using GetFileVersionInfo and VerQueryValue.

Good luck,

I've got a C-sourcecode snipet on my website which shows
exactly how to do this:

http://www.catch22.net/source/files/GetVersionString.c

Usage:

TCHAR szDesc[MAX_PATH];
TCHAR szPath[] = "C:\\windows\\explorer.exe";

GetVersionString(szPath, "FileDescription", buf, MAX_PATH);

printf("%s\n", szDesc);
 
Or you can use the FileDescription property of the
System.Diagnostics.FileVersionInfo class

Regards,

Nick Hall
James Brown said:
Martijn said:
Is there a way to get the process description of an executing process?

[snipped]

This is most likely the FileDescription value from the file version
information (also displayed on the Version tab on a file's description
dialog). So after you find the location of the file running, you can
retrieve this value using GetFileVersionInfo and VerQueryValue.

Good luck,

I've got a C-sourcecode snipet on my website which shows
exactly how to do this:

http://www.catch22.net/source/files/GetVersionString.c

Usage:

TCHAR szDesc[MAX_PATH];
TCHAR szPath[] = "C:\\windows\\explorer.exe";

GetVersionString(szPath, "FileDescription", buf, MAX_PATH);

printf("%s\n", szDesc);
 
Nick said:
Or you can use the FileDescription property of the
System.Diagnostics.FileVersionInfo class

Regards,

Nick Hall
James Brown said:
Martijn said:
(e-mail address removed) wrote:
Is there a way to get the process description of an executing process?

[snipped]

This is most likely the FileDescription value from the file version
information (also displayed on the Version tab on a file's description
dialog). So after you find the location of the file running, you can
retrieve this value using GetFileVersionInfo and VerQueryValue.

Good luck,

It works, thanks all for your replies.
I've got a C-sourcecode snipet on my website which shows
exactly how to do this:

http://www.catch22.net/source/files/GetVersionString.c

Usage:

TCHAR szDesc[MAX_PATH];
TCHAR szPath[] = "C:\\windows\\explorer.exe";

GetVersionString(szPath, "FileDescription", buf, MAX_PATH);

printf("%s\n", szDesc);
 
Back
Top