473,480 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to extract the program description from an EXE

Can anyone tell me how to extract the resources, specifically the description
and icons, from a .EXE file programatically. Basically I want to write a C#
application that takes .EXE files and displays their description and their
icons, more or less like right-clicking the file in explorer and displaying
properties.
--
Dave
Nov 17 '05 #1
2 2015
Hi Dave,

As far as I remember, all this info is in the EXE file's resources. So, you
should P/Invoke to the resource management APIs such as LoadIcon,
FindResource, LoadResource.

For example, to get the default app icon, you must load the EXE module with
LoadLibrary, then call LoadIcon with the obtained module handle, passing the
IDI_APPLICATION constant as the icon identifier.

You might want to take a look at this website:

http://www.pinvoke.net

to get a lot of P/Invoke samples.

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"Dave" <Da**@discussions.microsoft.com> wrote in message
news:FA**********************************@microsof t.com...
Can anyone tell me how to extract the resources, specifically the
description
and icons, from a .EXE file programatically. Basically I want to write a
C#
application that takes .EXE files and displays their description and their
icons, more or less like right-clicking the file in explorer and
displaying
properties.
--
Dave


Nov 17 '05 #2
> Can anyone tell me how to extract the resources, specifically the
description
and icons, from a .EXE file programatically. Basically I want to write a C#
application that takes .EXE files and displays their description and their
icons, more or less like right-clicking the file in explorer and displaying
properties.


For the icon you can use the ExtractIcon[Ex] or SHGetFileInfo Win32 APIs.
For everything else you have the managed FileVersionInfo class.
Mattias

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3435
by: Zhang Le | last post by:
Hello, I'm writing a little Tkinter application to retrieve news from various news websites such as http://news.bbc.co.uk/, and display them in a TK listbox. All I want are news title and url...
7
2865
by: teo | last post by:
hallo, I need to extract a word and few text that precedes and follows it (about 30 + 30 chars) from a long textual document. Like the description that Google returns when it has found a...
1
2653
by: caine | last post by:
I want to extract web data from a news feed page http://everling.nierchi.net/mmubulletins.php. Just want to extract necessary info between open n closing tags of <title>, <categoryand <link>....
5
2181
by: griffin61299 | last post by:
I'm trying to track the logon/off times for Users using certain Event ID's. The entry/example below is the Event Description which is contained in a single cell within my table/report. I need to...
1
3653
by: steveyjg | last post by:
I want to extract the following data from a retrieved html file and store the information as strings. 'get the text of "title" <h1 id="test_title">title</h1> 'get the contents of the value...
2
1905
by: snewman18 | last post by:
I'm parsing NNTP messages that have XML file attachments. How can I extract the encoded text back into a file? I looked for a solution with mimetools (the way I'd approach it for email) but found...
10
11982
by: spoken | last post by:
Hi, I quite new to Javascript and XML. Here a is snippet of my XML file. <xml> <cd> <rock> <item id='1'> <name>Bon Jovi</name> <price>$10</price>
5
5730
by: Steve | last post by:
Hi all Does anybody please know a way to extract an Image from a pdf file and save it as a TIFF? I have used a scanner to scan documents which are then placed on a server, but I need to...
1
3400
by: bhavinnaik | last post by:
Hi I am new to the IT enviro...although i've used QSL query for a while now but on simple or single queries. Here is the problem... I've got two queries looking at a set of tables to extract the...
0
7055
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7059
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6758
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7010
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4499
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.