Development and Microsoft27 Aug 2009 08:06 pm

So I came across a rather interesting problem today.  Basically, I need to embed a Microsoft Cabinet file into an executable.  This is done in an automated type of way, so in order to verify that it got embedded correctly, I used Resource Hacker to open the EXE, and export the resource.  Looking at what Resource Hacker spit out seems like it got embedded OK.

ResHacker-1  

I then exported the resource to disk to ensure that the cabinet archive contained the file I embedded into it.  When I went to open the .cab file, it didn’t seem to have any entries in it, and WinRar gave an error when trying to open the file.  Weird, I thought.  So, for fun, I opened the file in Notepad to only notice that it literally saved the text as it was shown in the hex editor. 

 ResHacker-2

What a weird bug!

I ended up opening the exe in VS2008, exporting the resource from there and verifying it.  Here is what opening it in notepad looks like.

ResHacker-3

Trackback this Post | Feed on comments to this Post

Leave a Reply