Resource Hacker Can’t Export Binary Resources
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.
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.
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.