[Review] All About Resource Hacker, The Ultimate Windows Customization Tool

Resource Hacker is a small but excellent tool to modify system files like DLL, EXE, CPL, etc. You can even change Windows look by editing various Windows files and replacing their resources using Resource Hacker.

You can download the latest version from following topic:

Download Resource Hacker Latest Version

Advertisement

This tutorial will help you in understanding this tool and will teach you how to use it. For your convenience, we have divided this tutorial in 2 parts:

  • PART 1: BASIC INFORMATION
  • PART 2: ADVANCED INFORMATION

Part 1 provides basic details like viewing or replacing existing resources in a file, etc. Part 2 covers some advance information for geeks, like adding new resources, using scripts, etc.

PART1 : BASIC INFORMATION

Using Resource Hacker

When you open a file in Resource Hacker, it shows various directories in left-side pane, like:

  • AVI – Contains AVI files
  • Cursor – Contains Cursor files
  • Bitmap – Contains BMP files
  • Icon – Contains Icons
  • Menu – Contains Menus
  • Dialog – Contains Dialog boxes
  • String Table – Contains Strings
  • Accelerators – Contains Shortcut keys
  • Version Info – Contains Version information of the file

Resource_Hacker_Main_Interface.png

Viewing Resources

You can view resource present in the file by expanding the directory given in left-side pane and clicking on the name of the resource. Each resource contains 3 important attributes:

  • Resource Type
  • Resource Name
  • Resource Language

Changing Resources

For Icons / Cursors / Bitmaps:

1. First select the resource ( e.g. Bitmap -> 131 -> 1033 ).

Advertisement

2. Now click on Action -> Replace Icon / Cursor / Bitmap option or right-click on the resource and select the Replace option.

Replace_Icon_Using_Resource_Hacker.png

3. It’ll open a new window, click on Open file with new Icon / Cursor / Bitmap button.

4. Select the desired resource using OPEN dialog box, click on Open button and then click on Replace button.

For Other Resources like AVI:

1. Select the AVI resource and click on Action -> Replace Resource option or right-click on the AVI resource and select the Replace option.

2. It’ll open a new window, click on Open file with new resource button (or Select File button in newer versions).

3. Select the file and click on Open button.

4. Now you’ll need to provide following required information for the resource, which we mentioned earlier:

  • Resource Type
  • Resource Name
  • Resource Language

Replace_AVI_Using_Resource_Hacker.png

Resource Type: Mention type of the resource, e.g. if you are replacing AVI file, mention the type as AVI

Resource Name: Provide the same name of the existing resource which you want to replace

Resource Language: Provide language code for the resource, e.g. 1033 for English. You can check existing resource’s language code.

5. At last click on Replace button.

For Menus / Strings / Dialogs:

To change any String, Menu or Dialog box, Select the desired resource, e.g. String Table -> 4 -> 1033, make your changes and at last click on Compile Script button or press F5 key or click on Action -> Compile option.

Replace_String_Using_Resource_Hacke.png

It’ll immediately compile the script. If you made any mistake while modifying the resource, it’ll generate error message so that you can fix it.

PART2 : ADVANCED INFORMATION

Adding New Resources

Adding New Bitmaps / Icons / Cursors / AVIs:

1. Click on Action -> Add a new Resource option (or Action -> Add Single Binary or Image Resource option in newer versions).

2. Now click on Open file with new resource button (or Select File button in newer versions).

Add_New_Resource_Using_Resource_Hac.png

3. Select the desired resource and click on Open button.

4. Give Resource Type, Name and Language as mentioned earlier. But keep in mind that Resource Name should not match with any existing resources name.

5. At last click on Add Resource button.

Adding New Menus:

Go to desired menu, e.g. Menu -> 215 -> 1033. Now add a new line anywhere inside POPUP “” using following format:

MENUITEM “Custom_String“, 12345, MFT_STRING, MFS_GRAYED | MFS_DEFAULT

Where:

  • Custom_String” is the actual text which you want to show in menu.
  • 12345 is the identifier. It must be different from existing menuitems.
  • MFS_GRAYED disables the menuitem. You can change it to MFS_ENABLED if you want to show your menuitem enabled.
  • MFS_DEFAULT shows your menuitem in BOLD. You can omit it.
  • You can also add a new attribute in the code MFS_HILITE which automatically selects your menuitem.

In fact you can only add following new line in code:

MENUITEM “Custom_String“, 12345

And Resource Hacker will automatically insert other remaining values as mentioned above.

Inserting Newly Added Resources in Dialog Boxes

Once you finish adding new Icons / Bitmaps / AVIs, you can insert them in any dialog box so that you can show in various Windows dialog boxes like RUN, Progress Dialog box, etc.

1. Go to the desired dialog box, e.g. Dialog -> 1020 -> 1033

2. Right-click in the dialog box and select Insert Control option.

Insert_Control_Using_Resource_Ha-2.png

3. It’ll open a new window. You’ll see many controls in the new window, like BITMAP, LABEL, ICON, BUTTON, SysAnimate32 (for AVIs), etc.

4. Click on any desired control, e.g. to insert a Bitmap, click on the BITMAP control or to insert an AVI, click on SysAnimate32 control.

Insert_Control_Using_Resource_Ha-1.png

PS: You can also insert Date/Time in dialog box using SysDateTimePick32 control.

5. Don’t forget to fill the Caption entry. You need to enter the Resource Name in Caption textbox, e.g. if you have added a Bitmap and set its Resource Name as 401, then give the same 401 in Caption textbox.

PS: For AVI Control ( SysAnimate32 ), you’ll need to append # in Caption value, e.g if the AVI name is 144, then put #144 in Caption textbox.

6. At last click on OK button & then Compile the script.

7. If you want to change the position of the new control in dialog box, simply click on the control and drag it to your desired location or you can also use arrow keys to move it.

Using Scripts in Resource Hacker

We can also run Resource Hacker using Command Prompt and can use scripts to automate lots of repetitive tasks to save our time.

You can use scripts in 2 ways:

  • Single Command
  • Multiple Commands

Single Command

You can use following commands in Command Prompt to perform actions using Resource Hacker:

add ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,
addskip ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,
addoverwrite ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,
modify ExeFileName, ResultingFileName, ResourceAddress, ResourceType, ResourceName,
extract ExeFileName, ResourceAddress, ResourceType, ResourceName,
delete ExeFileName, ResultingFileName, ResourceType, ResourceName,

Where:

  • ExeFileName – Source file name
  • ResultingFileName – Output file name
  • ResourceAddress – Resource location (e.g. Bitmap path stored in your hard disk)
  • ResourceType – Resource type (e.g. Bitmap, AVI, etc.)
  • ResourceName – Resource name (e.g. 131, 1020, etc.)

Example:

ResHacker.exe -addoverwrite explorer.exe, explorer1.exe, MyImage.bmp , bitmap, 143,

Multiple Commands

You can also run a series of commands using script. First you’ll need to create the script file using Notepad and then you can run it using following command:

ResHacker.exe -script ScriptFileName

Where, ScriptFileName is the name of the script file which you created in Notepad.

Following is the required format of the script file:

[FILENAMES]
Exe=
SaveAs=
Log=
[COMMANDS]
-addoverwrite ResourceAddress, ResourceType, ResourceName

Where:

EXE= contains source file name
SaveAs= contains output file name
Log= contains LOG file name which will store a detailed log of the operation

[COMMANDS] section contains the command-set which we want to perform on the source file.

PS: You can omit the LOG= entry in script file. In this case, Resource Hacker will automatically create a LOG file with the name “ResHacker.log“.

NOTE 1: If you are facing problems while saving a file after editing in resource hacker, then make sure you have disabled WFP (Windows File Protection) service using “WFP Patcher” or use “Replacer” to replace the file.

NOTE 2: If you get “Cannot create file” error message while saving the file, please check following tutorial:

How to Fix “Cannot Create File” Error Message While Saving Files in Resource Hacker?

That’s all for now. If you have any query, please feel free to ask us…

Also check:

List of Resource Hacker Tutorials to Customize Windows Look-n-Feel

List of Windows XP System Files to be Customized using Resource Hacker

List of Windows Vista System Files to be Customized Using Resource Hacker

List of Windows 7 System Files to be Customized Using Resource Hacker

List of Resource Locations in Windows XP, Vista and 7 to be Customized Using Resource Hacker

Published in: Windows 7, Windows Vista, Windows XP

About the author: Vishal Gupta (also known as VG) has been awarded with Microsoft MVP (Most Valuable Professional) award. He holds Masters degree in Computer Applications (MCA). He has written several tech articles for popular newspapers and magazines and has also appeared in tech shows on various TV channels.

Comments

NOTE: Older comments have been removed to reduce database overhead.

  1. Firstly, thanks for the excellent tutorial.

    Anyhow, letting you know that I’ve just updated RH to version 4.0.
    * Main changes include better displaying of images (esp. 32bit images)
    * Now allows creating RES files from scratch (including template dialog, menu, stringtable, version, and manifest resources).
    * Numerous cosmetic improvements.

    angusj.com/resourcehacker/

  2. I have a BMP extracted from a dll file and its supposed to have some transparency. The only thing I’m getting is black and white on photoshop, paintnet, gimp and standard image viewers. Windows thumbnails seems to read the transparency properly. How do I open this properly?

  3. ^^ BMP files don’t support transparency but we can use magic pink color to put transparency effects. Search for magic pink color and you’ll get more info.

  4. I am getting an error message when I was trying to import some icons from a .res file (created by resource hacker) :

    Windows XP SP3
    —————————
    Resource Hacker
    —————————
    Access violation at address 0058802E in module ‘ResourceHacker.exe’. Read of address 0000001C.
    —————————
    OK
    —————————

    Windows 7 64 bit
    [ VirtualBox ] Windows XP pro 32 bit

    Thanks in Advance

  5. ^^ You should provide the feedback to the developer. It might be an issue in new version of Resource Hacker.

  6. I just wanted to thank Vishal Gupta for the time you must have put in to compile these Resource Hacker tutorials etc. May I ask, is there no permanent platform on ask.vg we could go to to hang out, learn etc. from you? I can go through this little form each time I want to comment, but it’s kind of one way. 😉 I could give you my Google Sites link but being the noob I am it doesn’t appreciably improve your wisdom on (anything lol). That’s all, just wanted to thank you. -semicodin

  7. THANKS
    I HATE MICROSOFT
    CONSTANTLY HAVING TO DIDDLE AND CIRCUMVENT IT TO BE USEABLE AND HALF FUCNCTIONAL
    ?THE MONOPOLY SOFTWARE COMAPANY WITH A STOCK MARKET TICKER
    =B.S. CAPITALISM=
    THANKS AGAIN
    GYULA

  8. Hey VG, I’m trying to get some codes. You suggest that, in resource-modification, the ID is just a unique-identifier.

    MENUITEM “Custom_String”, 12345, MFT_STRING, MFS_GRAYED | MFS_DEFAULT

    If 12345 is ‘just’ the ID, where’s the command that’s performed (when the menu is clicked)?

    I’ve looked through all 7z resources (no MUI’s, checked even dll’s, seems to be the 7zfm.exe that is scope) trying to work out ‘WHERE 2001 is gleaned’ – goo.gl/01wgZL

    I see 2201, but not 2001!

    I’d love to work this out. MY exe’s and MUI’s seem to give me a mere glimpse at resources (where’s the strikethrough, on the ribbon, in wordpad.exe.mui? or rather the COMMAND, so I can add an accelerator, like stikynot.exe’s CTRL+T ?)

    Any insights sooooo welcome, thanks

  9. ^^ The ID is defined in other DLL or EXE files. If you change the ID, it’ll become useless and will do nothing.

  10. Hi,

    I would like to modify dll’s product version by command line ( I am using Powershell)
    Can you tell me how to write it?
    From the built of dlls and exes to final product, all are using Powershell.
    So i wish can automatic update the product version automatic(by Powershell also) after built.

    Thanks & Best Regards,
    Ken

  11. Hi, i tried changing the ICON of my portable Iron browser because i have 5 open at the same time. It worked for the EXE file itself and for shortcuts, but as I open one of the browsers they always have the normal standard “Iron” icon in the taskbar. All 5 of them. So its still not possible to spot witch browser is what window in the taskbar. Is that normal? Or should that change to?

    Any idea if this is possible to change? thanks!

  12. Sorry, found it! Your blog gave me an idea :)) It was inside the “chrome.dll” there was still a icon hidden. thanks!

  13. Thank you for this very good job.
    I am trying to compile a radio amateur program from (1082) to Greek 1032).
    When I finished, saved those and I open it again all the trees like
    Menu, Dialog, String Table, Version are with italic style (right slant)
    so the radio amateur program does not recognize Greek language.
    How can I resolve this problem?
    Thank you
    Aeakos

  14. hey VG, thanks for all the titbits 🙂

    do you know if there’s any way of exposing wordpad’s toolbar resources, & assigning a shortcut to strikethrough?

    I thought it might be possible, similar to the instructor’s method

    I’ve glanced at all the write.dll/exe/mui resources, but can’t see any leads

    Many thanks!

  15. Just realised ^ it’s a nice to have, quite easy to macro a-la AHK – (on selected text)

    alt h x

    3 keys!

  16. I able to change all in Resource Hacker for application, when I try to rename its exe file, app runs but further it options gives an “Error 7”, i think app is unable to find it’s associate DLL files, it useless when I could not rename exe as i change, all strings and icons. Plz Help and Guide me to change exe file name in Resource Hacker. Thanks, in advance

  17. What to do if the Resource Hacker does not make the Dialog files available? This happens with many .exe files I tested.

  18. Hi, thanks for the article! I was wondering if there is any chance to hack Microsoft Word, for example, remove the Ribbon or similar stuff?

  19. hi, thanks for the article.
    I want to change an open source app background. Would you please tell me how can I do it?

  20. Hello,
    helpful article!
    I have one question: Can we use resource hacker to change the background of an app?

  21. ^^ You’ll need to find the correct file containing the background image. It might be an EXE or DLL file. Open that file in Resource Hacker and replace the resource.

  22. Hi VG, thank you for putting together this tutorial, it’s very helpful. I’m a bit stuck though. I’m trying to extract the Manifest from an exe, modify a small part and replace the manifest in the original exe.

    I can extract using the following command:

    ResourceHacker.exe -open “My.exe” -save “Manifest.rc” -action extract -mask MANIFEST,1,1033 -log CON

    This creates two files: ‘Manifest.rc’ and ‘MANIFEST1_1.txt`. MANIFEST1_1.txt contains the text contents of the manifest, which is exactly what I need. However my first question is: Is this the best way of doing this – your instructions above suggest that I could do something like this:

    ResourceHacker.exe -action extract “My.exe”, Manifest, 1, 1033 -log CON

    but that fails with “Invalid command”.

    Anyway, I do have the manifest extracted as txt using the first command, so I use powershell to modify it but now I need to get it back in to the exe. I’ve tried all sorts of things to do this but nothing seems to work. Any pointers on how to do what I need?

  23. I tried addoverwrite, but can’t seem to get the parameters right. Should this work:

    ResourceHacker.exe -addoverwrite “My.exe”, “My.exe”, “MANIFEST1_1.txt”, MANIFEST, 1 -log CON

  24. I’m really confused, I’m trying to modify shell32.dll xp bu command line. but it keeps saying not recongized as a command on command prompt. 🙁

Leave a Comment

Your email address will not be published. Required fields are marked *

NOTE: Your comment may not appear immediately. It'll become visible once we approve it.