332 lines
16 KiB
HTML
332 lines
16 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|||
|
<html>
|
|||
|
<head>
|
|||
|
<title>Resource Hacker</title>
|
|||
|
<STYLE type="text/css"><!--
|
|||
|
body {
|
|||
|
background: url("../bg4.jpg");
|
|||
|
BACKGROUND-COLOR: #d9d9c0;
|
|||
|
text-align: center;
|
|||
|
box-sizing: border-box;
|
|||
|
-moz-box-sizing: border-box;
|
|||
|
padding: 20px 20px;
|
|||
|
}
|
|||
|
body, td, th {
|
|||
|
margin: 20px auto 20px auto;
|
|||
|
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
|
|||
|
font-size: 80%; /*this seems consistent across modern browsers*/
|
|||
|
}
|
|||
|
a {
|
|||
|
text-decoration: none;
|
|||
|
font-weight: bold;
|
|||
|
}
|
|||
|
h1 {
|
|||
|
font-size: 2.0em;
|
|||
|
font-weight: bold;
|
|||
|
margin: 0.2em 0em;
|
|||
|
COLOR: #46845F;
|
|||
|
}
|
|||
|
h2 {
|
|||
|
font-size: 1.7em;
|
|||
|
margin: 0.2em 0em;
|
|||
|
font-weight: bold;
|
|||
|
}
|
|||
|
h3 {
|
|||
|
font-size: 1.5em;
|
|||
|
margin: 0.2em 0em;
|
|||
|
font-weight: normal;
|
|||
|
}
|
|||
|
TD.menu {BACKGROUND-COLOR: #D8D8B8; TEXT-ALIGN: center}
|
|||
|
H2 {COLOR: #009999}
|
|||
|
.caption {BACKGROUND-COLOR: #BACBDA; font-size: 1.3em; font-weight: bold; color: #000066}
|
|||
|
.maroon {color: maroon;}
|
|||
|
--></STYLE>
|
|||
|
</head>
|
|||
|
|
|||
|
<body>
|
|||
|
<div align="justify">
|
|||
|
|
|||
|
<h2>Resource Hacker<65></h2>
|
|||
|
|
|||
|
<strong>Version 4.2.0</strong><br>
|
|||
|
Last updated: 20 June 2015<br>
|
|||
|
Copyright <20> 1999-2015 Angus Johnson<br>
|
|||
|
Freeware - no nags, no ads and fully functional.<br>
|
|||
|
<a href="#download">Download</a><br><br>
|
|||
|
|
|||
|
<strong>Overview:</strong><br><br>
|
|||
|
|
|||
|
Resource Hacker<65> has been designed to be the complete resource editing tool: compiling, viewing, decompiling and recompiling resources for both 32bit and 64bit Windows executables. Resource Hacker<65> can open any type of Windows executable (*.exe; *.dll; *.scr; *.mui etc) so that individual resources can be added modified or deleted within these files. Resource Hacker<65> can create and compile resource script files (*.rc), and edit resource files (*.res) too.<br><br>
|
|||
|
|
|||
|
<img src="bm00.png" width="1103" height="687" alt="Resource Hacker"><br><br>
|
|||
|
|
|||
|
<strong>Compiling:</strong><br><br>
|
|||
|
|
|||
|
Compiling can be initiated either by passing a resource script file as a parameter on the the command line (see below), or by using Resource Hacker's text editor.<br>
|
|||
|
Supported compiler directives include: #DEFINE, #UNDEF, #IF, #ELIF, #ELSE, #IFDEF, #IFNDEF, #INCLUDE, and #PRAGMA.<br>
|
|||
|
The #INCLUDE, #IF, and #IFDEF directives can all be nested to multiple levels.<br>
|
|||
|
Strings within resource statements are defined between double-quote (") characters. These strings can also contain typical 'C' style backslashed 'escaped' characters <20> \t , \n , \\ , \" , and \000 .. \377 (octal). A double-quote within a string can be 'escaped' by preceding it with either a backslash or with another double-quote character.<br>
|
|||
|
Script comments are preceded either by double forward-slashes (//) or by a semi-colon (;).<br>
|
|||
|
Filenames in within resource statements can only be parsed as strings, so they MUST be enclosed within double-quote characters otherwise compile errors will be raised.<br>
|
|||
|
A complete list of Resource-Definition Statements can be found <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa381043(v=vs.85).aspx">here</a>.<br><br>
|
|||
|
|
|||
|
<img src="bm12.png" width="1028" height="532" alt=""><br><br>
|
|||
|
|
|||
|
<strong>Viewing Resources:</strong><br><br>
|
|||
|
|
|||
|
Once a file has been opened, most resources will be displayed as either an image (or group of images) or as decompiled text:<br><br>
|
|||
|
|
|||
|
<img src="bm02.png" width="1015" height="532" alt=""><br><br>
|
|||
|
<img src="bm03.png" width="1009" height="532" alt=""><br><br>
|
|||
|
|
|||
|
|
|||
|
However, some resource types will be displayed in both its compiled form (eg dialog or popup menu) and in its decompiled text format.<br><br>
|
|||
|
|
|||
|
<img src="bm04.png" width="1012" height="530" alt=""><br><br>
|
|||
|
|
|||
|
Some resource types can only be displayed as a dump of raw byte data:<br><br>
|
|||
|
|
|||
|
<img src="bm05.png" width="1014" height="532" alt=""><br><br>
|
|||
|
|
|||
|
|
|||
|
<strong>Using the internal editor to modify text-based resources:</strong><br><br>
|
|||
|
|
|||
|
Dialog, menu, string-table, message-table, accelerators and Borland form resources can all be easily edited and recompiled using the internal resource editor.<br><br>
|
|||
|
|
|||
|
<img src="bm06.png" width="1014" height="532" alt=""><br><br>
|
|||
|
|
|||
|
Dialog controls can be visually resized and/or moved, with any changes being reflected in the resource script automatically. Conversion between screen pixels and dialog units is done automatically. Select a control by clicking it in the displayed dialog. Alternatively, the Tab or Shift-Tab keys can be used to select next or prior controls respectively. The selected control will show resizing handles. To move a control without resizing, once the control has been selected, click and drag it to its new location. The arrow keys can also be used to move a control once it has been selected. A control can be resized by clicking and dragging one of its resizing handles. Alternatively, the arrow keys combined with the shift key can be used to resize a control.<br><br>
|
|||
|
|
|||
|
The Dialog Editor can be opened from the popup menu which is displayed by right-clicking the preview dialog. The Control Editor can be opened from the same menu once a control has been selected.<br><br>
|
|||
|
|
|||
|
<img src="bm09.png" width="1012" height="530" alt=""><br><br>
|
|||
|
<img src="bm10.png" width="1012" height="530" alt=""><br><br>
|
|||
|
|
|||
|
|
|||
|
New controls can also be added. The Control Editor supports almost all of Microsoft<66>s standard and common control classes. User defined custom classes can also be added to the predefined list of classes by carefully editing the <20>Dialog.def<65> text file which can be found in the same folder as Resource Hacker<65>. Toolbar buttons enable selection of the most commonly used controls. The top-left corner of the control to be added will default to the point at which the dialog was originally right-clicked.<br><br>
|
|||
|
|
|||
|
|
|||
|
<strong>Replacing Images:</strong><br><br>
|
|||
|
|
|||
|
If the resource item to be replaced is an icon, cursor, or bitmap, the source can be an *.ico, *.cur or *.bmp file respectively or selected from a *.res or another *.exe file. Select Action|Replace Icon (Cursor or Bitmap) from the menu.<br><br>
|
|||
|
|
|||
|
<img src="bm14.png" width="558" height="530" alt=""><br><br>
|
|||
|
|
|||
|
|
|||
|
<strong>Command Line Scripting:</strong><br><br>
|
|||
|
All the functionality of Resource Hacker<65> can be accessed from the command line (apart from viewing resources) without having to open the Resource Hacker<65> GUI.<br>
|
|||
|
Command line scripting can remove the drudgery entailed with repeating Resource Hacker<65> tasks.<br><br>
|
|||
|
|
|||
|
Command line syntax has 2 forms:
|
|||
|
<ol>
|
|||
|
<li><strong>Single commands:</strong> ResourceHacker.exe command command_parameters
|
|||
|
<li><strong>Multiple commands:</strong> ResourceHacker.exe -script multi_command_file (note that -script is very different to the -compile command, see below)
|
|||
|
</ol>
|
|||
|
|
|||
|
<div style="padding: 20px; 0px;">
|
|||
|
|
|||
|
<b>Single Commands:</b><br>
|
|||
|
|
|||
|
command and command_parameters:<br>
|
|||
|
<table cellspacing="2" cellpadding="2" border="0">
|
|||
|
<tr>
|
|||
|
<td>-compile</td>
|
|||
|
<td>resource_script.rc</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td>-add</td>
|
|||
|
<td>ExeFile, SaveAsFile, ResourceFile, ResourceMask</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td>-addskip</td>
|
|||
|
<td>ExeFile, SaveAsFile, ResourceFile, ResourceMask</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td>-addoverwrite</td>
|
|||
|
<td>ExeFile, SaveAsFile, ResourceFile, ResourceMask</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td>-modify</td>
|
|||
|
<td>ExeFile, SaveAsFile, ResourceFile, ResourceMask</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td>-extract</td>
|
|||
|
<td>ExeFile, ResourceFile, ResourceMask</td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td>-delete</td>
|
|||
|
<td>ExeFile, SaveAsFile, ResourceMask</td>
|
|||
|
</tr>
|
|||
|
</table>
|
|||
|
|
|||
|
Notes:<br>
|
|||
|
Each command parameter must be separated by a comma, but no comma is expected before the first parameter.<br>
|
|||
|
Paths should be included with filenames.<br>
|
|||
|
Filenames containing spaces should be enclosed within double quotes.<br><br>
|
|||
|
|
|||
|
|
|||
|
The ResourceMask enables a command to be performed on either single or multiple resource items. It takes the form ResType,ResName,ResLang. (If ResType is a predefined type, then either its number or identifier can be used <20>e.g. the ResourceMask dialog,128,0 is identical to 5,128,0.) Any or all of the ResourceMask items can be omitted <20>e.g. dialog,, indicates that all dialogs are to be applied to the command irrespective of name or language, and ,,1049 indicates that all resources with Russian (1049) as the languageID will be applied to the command. An empty ResourceMask ,, indicates that the command will be applied to every resource irrespective of type, name or language.<br><br>
|
|||
|
|
|||
|
When adding or modifying items, the ResourceFile can be a RES file for any item type, a BMP file for BITMAP types, a CUR file for CURSORGROUP types, an ICO file for ICONGROUP types, and any file type for RCDATA and user defined resource types.<br><br>
|
|||
|
|
|||
|
When adding and modifying resources from files other than RES files then both ResType and ResName must be specified in the ResourceMask. If ResLang is omitted then the command applies to the first language item with matching type and name, otherwise, if no matching item exists then language neutral (0) is assumed.<br><br>
|
|||
|
|
|||
|
When extracting resources, and more than one item is implied by the ResourceMask, then the specified ResourceFile must be either a RES file or an RC file. When binary image resources are extracted to RC files, each image is also created as a separate binary (ICO, CUR, BMP, GIF, BIN) file. See the example below.<br><br>
|
|||
|
|
|||
|
ICON and CURSOR resources cannot be manipulated directly but are added, deleted, modified and extracted by using their respective ICONGROUP or CURSORGROUP. ICON and CURSOR can still be used but Resource Hacker<65> will assume ICONGROUP or CURSORGROUP was intended.<br><br>
|
|||
|
|
|||
|
All actions or errors are logged to <20>ResourceHacker.log<6F>.<br><br>
|
|||
|
|
|||
|
NB: If a script does not produce the desired results then check the log!<br><br>
|
|||
|
|
|||
|
<strong>Examples:</strong> (File paths have been omitted for clarity)<br><br>
|
|||
|
<div class="maroon">
|
|||
|
|
|||
|
To compile a resource script (from *.rc to *.res)<br>
|
|||
|
ResourceHacker.exe -compile my_resources.rc<br><br>
|
|||
|
|
|||
|
To add or update dialog name:maindlg lang:0 in MyProg.exe from UpdDlg.res<br>
|
|||
|
ResourceHacker.exe -addoverwrite MyProg.exe, MyProgNew.exe, UpdDlg.res, dialog,maindlg,0<br><br>
|
|||
|
|
|||
|
To add or update bitmap name:128 in MyProg.exe from NewImage.bmp<br>
|
|||
|
ResourceHacker.exe -addoverwrite MyProg.exe, MyProgNew.exe, NewImage.bmp , bitmap,128,<br><br>
|
|||
|
|
|||
|
To add or update all bitmaps in MyProg.exe from Images.res<br>
|
|||
|
ResourceHacker.exe -addoverwrite MyProg.exe, MyProgNew.exe, Images.res, bitmap,,<br><br>
|
|||
|
|
|||
|
To add a <20>user-defined<65> binary resource (README,1,0) to MyProg.exe from ReadMe.html<br>
|
|||
|
ResourceHacker.exe -addoverwrite MyProg.exe, MyProgNew.exe, ReadMe.html, readme,1,0<br><br>
|
|||
|
|
|||
|
To add all items in Images.res to MyProg.exe (but fail if any item already exists)<br>
|
|||
|
ResourceHacker.exe -add MyProg.exe, MyProgNew.exe, Images.res ,,,<br><br>
|
|||
|
|
|||
|
To add all items in Images.res to MyProg.exe (skipping any existing items)<br>
|
|||
|
ResourceHacker.exe -addskip MyProg.exe, MyProgNew.exe, Images.res ,,,<br><br>
|
|||
|
|
|||
|
To modify all items in MyProg.exe with the items in Images.res (ignoring any items in Images.res which do not exist in MyProg.exe)<br>
|
|||
|
ResourceHacker.exe -modify MyProg.exe, MyProgNew.exe, Images.res , , ,<br><br>
|
|||
|
|
|||
|
To extract all icons from MyProg.exe to MyProgIcons.rc (creating MyProgIcons.rc, Icon_1.ico, Icon_2.ico , Icon_3.ico etc...)<br>
|
|||
|
ResourceHacker.exe -extract MyProg.exe, MyProgIcons.rc, icongroup,,<br><br>
|
|||
|
|
|||
|
To delete GIF name:128 from MyProg.exe<br>
|
|||
|
ResourceHacker.exe -delete MyProg.exe, MyProgNew.exe, gif,128,<br><br>
|
|||
|
</div>
|
|||
|
|
|||
|
<strong>Multiple Commands:</strong><br><br>
|
|||
|
|
|||
|
<strong>syntax:</strong> ResourceHacker.exe -script ScriptFile<br>
|
|||
|
ScriptFile is a text file with the following layout:<br>
|
|||
|
<pre><span style="font-size: medium">
|
|||
|
//comments are preceded by double slashes
|
|||
|
[FILENAMES]
|
|||
|
Exe=
|
|||
|
SaveAs=
|
|||
|
Log=
|
|||
|
|
|||
|
[COMMANDS]
|
|||
|
-add ResourceSrc, ResourceMask
|
|||
|
-addskip ResourceSrc, ResourceMask
|
|||
|
-addoverwrite ResourceSrc, ResourceMask
|
|||
|
-addoverwrite ResourceSrc, ResourceMask
|
|||
|
-modify ResourceSrc, ResourceMask
|
|||
|
-extract ResourceTgt, ResourceMask
|
|||
|
-delete ResourceMask
|
|||
|
</span></pre><br>
|
|||
|
|
|||
|
If Log is omitted then the default log <20>ResourceHacker.log<6F> will be used.<br>
|
|||
|
NB: If a script does not produce the desired results then check the log!<br>
|
|||
|
|
|||
|
<strong>Examples:</strong><br><br>
|
|||
|
<div class="maroon">
|
|||
|
<pre><span style="font-size: medium">
|
|||
|
|
|||
|
rh_script_myprog_rus.txt -
|
|||
|
|
|||
|
//This script deletes all Language Neutral (0)
|
|||
|
//string-table, menu and dialog resource items
|
|||
|
//in MyProg.exe before replacing them
|
|||
|
//with Russian (1049) items...
|
|||
|
|
|||
|
[FILENAMES]
|
|||
|
Exe= MyProg.exe
|
|||
|
SaveAs= MyProg_Rus.exe
|
|||
|
Log= MyProg_Rus.log
|
|||
|
|
|||
|
[COMMANDS]
|
|||
|
-delete MENU,,0
|
|||
|
-delete DIALOG,,0
|
|||
|
-delete STRINGTABLE,,0
|
|||
|
-add MyProg_Rus.res, MENU,,1049
|
|||
|
-add MyProg_Rus.res, DIALOG,,1049
|
|||
|
-add MyProg_Rus.res, STRINGTABLE,,1049
|
|||
|
|
|||
|
|
|||
|
rh_script_myprog_upd_images.txt -
|
|||
|
|
|||
|
//This script updates 2 bitmaps and an
|
|||
|
//icon in MyProg.exe ...
|
|||
|
|
|||
|
[FILENAMES]
|
|||
|
Exe= MyProg.exe
|
|||
|
SaveAs= MyProg_Updated.exe
|
|||
|
|
|||
|
[COMMANDS]
|
|||
|
-addoverwrite Bitmap128.bmp, BITMAP,128,
|
|||
|
-addoverwrite Bitmap129.bmp, BITMAP,129,0
|
|||
|
-addoverwrite MainIcon.ico, ICONGROUP,MAINICON,0
|
|||
|
|
|||
|
|
|||
|
rh_script_myprog_upd_all.txt -
|
|||
|
|
|||
|
//This script replaces all resources
|
|||
|
//in MyProg.exe with all the resources
|
|||
|
//in MyProgNew.res
|
|||
|
|
|||
|
[FILENAMES]
|
|||
|
Exe= MyProg.exe
|
|||
|
SaveAs= MyProg_Updated.exe
|
|||
|
|
|||
|
[COMMANDS]
|
|||
|
-delete ,,, //delete all resources before...
|
|||
|
-add MyProgNew.res ,,, //adding all the new resources
|
|||
|
</span></pre>
|
|||
|
</div><!-- maroon-->
|
|||
|
</div><!-- script padding-->
|
|||
|
|
|||
|
|
|||
|
<B>Licence to Use - Terms and Conditions:</B><BR>
|
|||
|
<TABLE cellPadding=5 width="90%" align=center border=0>
|
|||
|
<TR><TD>This Resource Hacker<SUP><FONT SIZE="1">TM</FONT></SUP> software is released as freeware provided that you agree to the following terms and conditions:
|
|||
|
<ol>
|
|||
|
<li>This software is not to be distributed via any website domain or any
|
|||
|
other media without the prior written approval of the copyright owner.
|
|||
|
<li>This software is not to be used in any way to illegally modify software.
|
|||
|
</ol>
|
|||
|
DISCLAIMER: A user of this Resource Hacker<SUP><FONT SIZE="1">TM</FONT></SUP> software acknowledges that he or she is receiving this software on an "as is" basis and the user is not relying on the accuracy or functionality of the software for any purpose. The user further acknowledges that any use of this software will be at the user's own risk and the copyright owner accepts no responsibility whatsoever arising from the use or application of the software. </TD></TR>
|
|||
|
|
|||
|
<TR><TD>The above licence terms constitute "copyright management information" within the meaning of Section 1202 of Title 17 of the United States Code and must not be altered or removed from the licensed works. Their alteration or removal from the licensed works, and the distribution of licensed works without all the above licence terms in an unaltered way, may contravene Section 1202 and give rise civil and/or criminal consequences.</TD></TR>
|
|||
|
</TABLE><br>
|
|||
|
|
|||
|
|
|||
|
<B>Executable Packers</B><BR><BR>
|
|||
|
<TABLE cellPadding="5px" width="90%" align=center border=0>
|
|||
|
|
|||
|
<TR><TD bgcolor="#e0e0e0">Some executable files are "packed" or "compressed" using compression algorithms after they have been compiled. While this reduces the size of these files, it also makes it more difficult to view and modify resources. While it's possilbe to reverse any compression and still view and modify resources, I've decided not to do that on the assumption that that would be disrespecting the intentions of the file authors. When a "compressed" executable is opened with Resource Hacker<SUP><FONT SIZE="1">TM</FONT></SUP> only the types and names of resource will be visible.<BR>
|
|||
|
</TD></TR>
|
|||
|
</TABLE>
|
|||
|
<BR><BR>
|
|||
|
|
|||
|
<A name="download"></A>
|
|||
|
<B>Download</B><BR><BR>
|
|||
|
|
|||
|
<ul>
|
|||
|
<li><A href="reshacker_setup.exe" ><strong>Setup executable </strong> (3.6MB)</A>
|
|||
|
<li><A href="resource_hacker.zip" ><strong>'Portable' Zip file </strong> (3.6MB)</A>
|
|||
|
</ul><br><br>
|
|||
|
|
|||
|
|
|||
|
</div><!-- outer most formatting-->
|
|||
|
</body>
|
|||
|
</html>
|