## Resource HackerTM

Windows® 애플리케이션용 프리웨어 리소스 컴파일러 및 디컴파일러
버전 5.2.6
최종 업데이트: 2023년 11월 18일
저작권 © 1999-2023 Angus Johnson
awj1958@gmail.com
무료 소프트웨어 - 귀찮은 메시지, 광고 없음, 모든 기능 제공.
다운로드

### 개요:

Resource HackerTM은 32비트 및 64비트 Windows® 애플리케이션용 리소스 편집기입니다. 리소스 컴파일러(*.rc 파일용)이자 디컴파일러로, 실행 파일(*.exe; *.dll; *.scr 등)과 컴파일된 리소스 라이브러리(*.res, *.mui)의 리소스를 보고 편집할 수 있습니다. Resource Hacker는 기본적으로 GUI 애플리케이션이지만 명령줄에서 리소스를 컴파일하고 디컴파일하기 위한 여러 옵션도 제공합니다.

### 컴파일:

컴파일은 기존 리소스 스크립트 파일을 열거나 Resource Hacker의 편집기를 사용하여 처음부터 새로 생성하여 시작할 수 있습니다.
리소스 정의문의 전체 목록은 여기에서 확인할 수 있습니다.
Resource Hacker 컴파일러의 추가 기능은 다음과 같습니다. #INCLUDE 지시문(헤더 파일 등의 정의 문에 액세스)은 #IF 및 #IFDEF 지시문과 마찬가지로 여러 수준으로 중첩될 수 있습니다. #DEFINE, #UNDEF, #IF, #ELIF, #ELSE, #IFDEF, #IFNDEF, #INCLUDE 및 #PRAGMA 지시문은 모두 지원됩니다. 큰따옴표(") 문자 사이의 문자열은 일반적인 'C' 스타일 백슬래시로 둘러싸인 '이스케이프' 문자( \t , \n , \\ , \" , \x, \u 및 \377(8진수))를 포함할 수 있습니다. 문자열 내의 큰따옴표는 앞에 백슬래시나 다른 큰따옴표를 사용하여 '이스케이프'해야 합니다. 스크립트 주석은 이중 슬래시(//) 또는 세미콜론(;)으로 시작합니다. 상대 경로가 있는 파일 이름이 허용됩니다. 공백이 포함된 파일 이름은 큰따옴표 문자로 묶어야 합니다.
컴파일러 오류 메시지, 심지어 INCLUDE 문 내에 중첩된 오류까지 보고됩니다...

### 리소스 보기 및 편집:

리소스 파일을 열면 해당 리소스는 일반적으로 이미지(또는 이미지 그룹) 또는 디컴파일된 텍스트로 표시됩니다. 일반적으로 이미지인 바이너리 리소스는 리소스 해커로 직접 편집할 수 없지만 외부 이미지 편집기로 수정한 후에는 매우 쉽게 내보내고 가져올 수 있습니다. (타사 이미지 편집기가 잘하는 기능을 그대로 복제하는 것은 이점이 없습니다.)
메뉴 및 대화 상자 리소스 유형에는 자체 WYSIWYG 디자이너가 있습니다:
Binary resources that have unknown formats will be displayed as read-only binary text. (Any resource can also be viewed in this fashion if desired.)

### Other Actions:

### 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

- add - add a resource, but fails if it already exists
- addoverwrite - add a resource, and overwriting if it already exists
- addskip - add a resource, but skipping if it already exists
- compile - compiles a resource script file (*.rc) to a binary resource file (*.res)
- delete - delete a resource
- extract - extract a resource
- modify - modify a resource
- changelanguage(langID) - changes the language of ALL resources

-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:

1. Switch identifiers (except -script) may be abbreviated down to a single char (eg -res or -r).
2. Switch instructions do not have to be in any particular order.
3. File names that contain spaces must be enclosed within double quotes.

Batch file Examples (using rh.exe instead of ResourceHacker.exe in places for brevity)
reshack_help.bat:

    ResourceHacker.exe -help
    @pause  :: to see the console output before the CMD window closes.

reshack_compile_res_script.bat:

    rh.exe -open .\in\resources.rc -save .\out\resources.res -action compile -log NUL

reshack_add_icon_to_old.bat:

    rh.exe -open old.exe -save new.exe -action addskip -res my.ico -mask ICONGROUP,MAINICON,

reshack_extract_all_source_icons_to_icons_folder.bat:

    rh.exe -open source.exe -save .\icons -action extract -mask ICONGROUP,, -log CON
    @pause

reshack_extract_all_dialogs.bat:

    rh.exe -open source.exe -save .\dialogs.rc -action extract -mask DIALOG,, -log rh.log

reshack_execute_my_script.bat:

    ResourceHacker.exe -script myscript.txt

Resource Hacker Scripts:
Resource Hacker Scripts are executed from the command-line using the following syntax:

      ResourceHacker.exe -script ScriptFile

Resource Hacker Scripts are text files with the following format:

      //comments are preceded by double slashes
      [FILENAMES]
      Open=
      Save=
      Log=
      [COMMANDS]
      //one or more of the following commands ...
      -add          SourceFile, ResourceMask
      -addskip      SourceFile, ResourceMask
      -addoverwrite SourceFile, ResourceMask
      -addoverwrite SourceFile, ResourceMask
      -modify       SourceFile, ResourceMask
      -extract      TargetFile or TargetFolder, ResourceMask
      -delete       ResourceMask
      -changelanguage(langID)

Note: Filenames that include spaces must be enclosed within double quotes.
Resource Hacker Script examples:
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

### "Packed" or "Compressed" Executables:

Some executable files are "packed" or "compressed" using compression algorithms. Not only does this reduces file size, it also makes viewing and modifying resources marginally more difficult. I suspect that this resource 'hiding' is (or was) a common objective in this process. Anyhow, in deference to these authors, I've chosen not to unpack files with Resource Hacker. As a side note, it seems that "packed" executables have become quite uncommon over the last 5-10 years, and software authors are exposing more rather than less information in executable resources. I suspect that earlier concerns about the loss of intellectual property with reverse engineering have been allayed.

### Licence to Use - Terms and Conditions:

This Resource HackerTM software is released as freeware provided that you agree to the following terms and conditions:

1. This software is not to be distributed via any website domain or any other media without the prior written approval of the copyright owner.
2. This software is not to be used in any way to illegally modify software.

DISCLAIMER: A user of this Resource HackerTM 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.
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.

### Download version 5.2.6:

EXE install (4.1MB)
ZIP install (3.3MB)
Changes in 5.2.6:

- fixed a bug incorrectly detecting text encoding
- fixed several other minor bugs