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
Links
The code
The full document