Resource Hacker™ is a resource editor for 32bit and 64bit Windows® applications. It's both a resource compiler (for *.rc files), and a decompiler - enabling viewing and editing of resources in executables (*.exe; *.dll; *.scr; etc) and compiled resource libraries (*.res, *.mui). While Resource Hacker™ is primarily a GUI application, it also provides many options for compiling and decompiling resources from the command-line.
Command Line Syntax:
Just about all the functionality of Resource Hacker™ can be accessed from the command line without having to open the Resource Hacker™ GUI.
Command line instructions and Resource Hacker™ scripts can remove the drudgery entailed with repeating Resource Hacker™ tasks.
Command-line instructions are a combination of switch statements followed by switch parameters as explained in the following table: Command line statements:
Notes:
Command Line Syntax:
Just about all the functionality of Resource Hacker™ can be accessed from the command line without having to open the Resource Hacker™ GUI.
Command line instructions and Resource Hacker™ scripts can remove the drudgery entailed with repeating Resource Hacker™ tasks.
Command-line instructions are a combination of switch statements followed by switch parameters as explained in the following table: Command line statements:
Switch | Parameter | |
---|---|---|
-open | filename - the name of the file that is to be modified. It should be a Windows PE file (*.exe, *.dll etc) or a compiled or uncompiled resouce file (*.res or *.rc) | |
-save | usually a filename for the new or modified file, but can also be a folder when extracting multiple resources | |
-resource | filename - contains a resource being added to the opened file. | |
-action | action to be performed on the opened file
| |
-mask | resource mask - Type,Name,Language commas are mandatory but each of Type, Name & Language are optional | |
-log | Filename or CONSOLE or NUL CONSOLE can be abbreviated to CON Logs the details of the operation performed If this switch is omitted, the log will be written to resourcehacker.log | |
-script | filename - contains a multi-command script, NOT a resource script for more info: -help script | |
-help | options - command-line or script (always logged to CONSOLE) other switches are ignored. |
Notes:
- Switch identifiers (except -script) may be abbreviated down to a single char (eg -res or -r).
- Switch instructions do not have to be in any particular order.
- File names that contain spaces must be enclosed within double quotes.