473,608 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ 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 2026
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**@discussio ns.microsoft.co m> wrote in message
news:FA******** *************** ***********@mic rosoft.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
3442
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 information. Since each news site has a different layout, I think I need some template-based techniques to build news extractors for each site, ignoring information such as table, image, advertise, flash that I'm not interested in. So far I have...
7
2874
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 given word. In example from:
1
2665
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>. Whenever I initiated the extraction, first news title is always "MMU Bulletin Board RSS Feed" with the proper bulletin's link stored, but not the correct news title being stored. Necessary info only appears within <itemand </itemwhich consists...
5
2192
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 create a simple query that will extract the Logon ID (just the numbers) - so for the example below, the output would simply be 0x0,0x13BBA434. I've investigated the Mid function but you need a starting position... Unfortunately the start position...
1
3661
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 attribute <input name="test_code" type="text" value='<object </object>' > 'get the text of "category" or value of c <div class="smallText">
2
1926
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 nothing. Here's a long snippet of the message: ('220 116431 <D8PANKEG1@news.ap.orgarticle', '116431', '<D8PANKEG1@news.ap.org>', ['MIME-Version: 1.0', 'Message-ID: <D8PANKEG1@news.ap.org>', 'Content-Type: Multipart/Mixed;', '...
10
11993
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
5750
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 extract the image of the document (just the first page if there are multiple pages) and save it as a TIFF so I can then use the Tesseract OCR to get the text in the image.
1
3405
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 Costed and Invoiced data from the same database. I've tried to use a JOIN but it keeps failing. I've got multiple fields that needs to be linked. Any suggestions. I've attached the query to make it easier Declare @IDateFrom DateTime, ...
0
8059
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8495
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8470
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8145
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6815
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5475
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3960
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1328
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.