Tweaking Win32 Applications…. :)

    I came across a utility called ‘Resource Hacker’. It’s not that bad as it name sounds.. It’s a very powerful and very small in size (some 600 kb) utility that will allow you to access the resources associated with any win32 Executables or dlls. So what..? Most of the Win32 Application uses the resource files for the GUI part. Once we have access to them, we can play around with it even when we don’t have the source code of it.. :) I forgot to mention, the utility is a freeware, you can download it from http://www.angusj.com/resourcehacker/

For an example, I’d play around the ‘Calculator’ Application that is available with Windows. It’s the ‘\Windows\System32\calc.exe’. Please before proceeding further, take a copy of the calc.exe to some safe location, in case we may need it in future…if and when we mess it up… Now from the Resource Hacker, Open the calc.exe.(Menu Fileàopen). It looks like the above picture. If you notice, The resource may be of Icon, Menu, Dialog boxes, String tables, Shortcuts… These resources are available as the GUI for the end-user. Now I’ll just try to change the caption of the Calculator dialogue box.

Expand the ‘Dialog’ in the tree show in the left panel, you will see all the dialogue boxes available in the application. In this case there are 4 dialogue boxes available. Now We have to find the appropriate dialogue box to change. Since we don’t have the source code, it’s a pure guess. Better open the four nodes.

Once we find the Dialogue box, Just edit the properties available if you know what it means…Here ‘Caption’ is a straight forward thing. Just edit it to the way you want. Once you edit the sheet, the ‘Compile Script’ becomes enabled. After editing, just click the ‘Compile Script’ button.

Repeat the above step for the dialogue ‘102′ shown in the tree, as the calculator application has two main dialogue boxes, one for standard mode and another for scientific mode. Now you have done your part. Save this application with a new name. Select FileàSave asà and give a new name (calc_new.exe in my case). Now your application is ready. Just close the Resource hacker. Run the new application from the “Windows Run” dialogue box.

Check your new calculator. You can notice the Caption as “your new caption”

Similarly, you can play around with the tool for any application you want. In my next post, I would explain one more interesting tweak with this utility. But please remember before playing around with any application, make a backup of that.


Share This Post

Tags: , , ,

2 Responses to “Tweaking Win32 Applications…. :)”

  1. Chander Says:

    Cool tool and now i have my own exe :D

  2. karthik Says:

    Useful and worthy blog page machi.
    Good, keep going…

Leave a Reply