Resource File Extractor
This is a little utility I have been meaning to take the
time and write for quite some time now..
As with a lot of utilities what it does is not all that complex, but not
having it sometimes means you have to jump through hoops.
Ever want to get a resource out of an exe, dll or
resources file? Well now you can, with
WinResourceFileExtractor or the command line version RFE. The logic is really pretty simple and it does
make several assumptions:
Logic flow:
1. Determine
if the source file is an assembly (exe or dll), resources or resx file.
2. If it is
an assembly:
a. Load the
assembly
b. Enumerate
over the Manifest resource names and see if any of the names have an extension
of jpg, gif, bmp, ico, txt, resources
c. If the
extension is one that it is looking for then extract the stream and save it
3. If it is
a resources or resx file
a. Get the
needed resource reader
b. Enumerate
over the key values and see if any of the names have an extension of jpg, gif,
bmp or ico
c. If the
extension is one that it is looking for then cast the value of the resource to
either a Bitmap or Icon and save the object
WinResourceFileExtractor
This utility (shown below) is a simple Windows forms
application that will extract any jpg, bmp, gif, ico, txt files that are
embedded as resources in a .Net managed assembly. The source file types it will handle are:
exe, dll, resources, resx.
Source file – is the file that you want to extract
resources from
Destination – is a directory that you would like the
extracted resources to be saved to.

RFE
This utility has the same functionality as the
WinResourceFileExtractor except it is a command line tool. There are currently only 2 switches:
A full example that would extract all the resources from
an exe would be:
RFE –s:c:\projects\App.exe –d:c:\projects