找回密码
 加入
搜索
查看: 1351|回复: 5

谁有支持命令行的资源提取器呢

[复制链接]
发表于 2009-11-27 02:43:50 | 显示全部楼层 |阅读模式
谁有支持命令行的资源提取器呢
能在.exe|.dll等资源中提取文件的工具.
要能支持命令行的,不然用程序很难操作.
希望有经验的朋友回答,多谢!
发表于 2009-11-27 11:58:28 | 显示全部楼层
rehacker
发表于 2009-11-27 11:59:18 | 显示全部楼层
下个完整的有帮助的看看。
发表于 2009-11-27 14:06:26 | 显示全部楼层
ResHacker.exe
在 ACN 的安装目录 \Extras\OtherEXE 下
以下是命令行帮助,自己翻译着看吧!
Commandline Scripting:
All the functionality of the Resource Hacker?GUI (apart from viewing resources) can be accessed from the commandline without having to open Resource Hacker? Commandline scripting can remove the drudgery entailed with repetitive Resource Hacker?tasks.
Commandline scripts have 2 general forms:
1. Single commands:
ResHacker.exe  command  command_parameters
2. Multiple commands:
ResHacker.exe  -script  scriptfile
Single Commands:
command and command_parameters:
-add   ExeFile, SaveAsFile, ResourceFile, ResourceMask
-addskip  ExeFile, SaveAsFile, ResourceFile, ResourceMask
-addoverwrite  ExeFile, SaveAsFile, ResourceFile, ResourceMask
-modify   ExeFile, SaveAsFile, ResourceFile, ResourceMask
-extract   ExeFile, ResourceFile, ResourceMask
-delete   ExeFile, SaveAsFile, ResourceMask
Each command parameter must be separated by a comma, but no comma is expected before the first parameter.
If paths are not included with filenames, then the operating systems?current folder is presumed to contain the named file. It is generally good practise, though not required here, to enclose filenames contain spaces within double quotes. 
The ResourceMask enables a command to be performed on either single or multiple resource items and takes the form ResType,ResName,ResLang. If ResType is a predefined type, then either its number or identifier can be used - eg the ResourceMask dialog,128,0 is identical to 5,128,0. Any or all of the ResourceMask items can be omitted - eg  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.
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.
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.)
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 example below.
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?will assume ICONGROUP or CURSORGROUP was intended.
Borland抯 DFM files can also be added irrespective of whether the file is in binary or text format. However, they will always be extracted in text format. (To convert text formatted dfm files to binary format, use Borland抯 utility Convert.exe.)
All actions or errors are logged to 揜esHacker.log?
NB: If a script does not produced the desired results then check the log!
Examples: (File paths have been omitted to aid clarity)

To add or update dialog name:maindlg lang:0 in MyProg.exe from UpdDlg.res
    ResHacker.exe -addoverwrite MyProg.exe, MyProgNew.exe, upddlg.res, dialog,maindlg,0
To add or update bitmap name:128 in MyProg.exe from NewImage.bmp
    ResHacker.exe -addoverwrite MyProg.exe, MyProgNew.exe, NewImage.bmp , bitmap,128,
To add or update all bitmaps in MyProg.exe from Images.res
    ResHacker.exe -addoverwrite MyProg.exe, MyProgNew.exe, Images.res, bitmap,, 
To add a 摇serdefined?binary resource (README,1,0) to MyProg.exe from ReadMe.html
    ResHacker.exe -addoverwrite MyProg.exe, MyProgNew.exe, ReadMe.html, readme,1,0 
To add all items in Images.res to MyProg.exe (but fail if any item already exists)
    ResHacker.exe -add MyProg.exe, MyProgNew.exe, Images.res ,,, 
To add all items in Images.res to MyProg.exe (skipping any existing items)
    ResHacker.exe -addskip MyProg.exe, MyProgNew.exe, Images.res ,,, 
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)
    ResHacker.exe -modify MyProg.exe, MyProgNew.exe, Images.res , , , 
To extract all icons from MyProg.exe to myprogicons.rc (creating myprogicons.rc, Icon_1.ico, Icon_2.ico , Icon_3.ico etc...)
    ResHacker.exe -extract MyProg.exe, myprogicons.rc,  icongroup,,
To delete GIF name:128 from MyProg.exe
    ResHacker.exe -delete MyProg.exe, MyProgNew.exe, gif,128,

Multiple Commands:
syntax: ResHacker.exe -script ScriptFile
ScriptFile is a text file with the following layout:
  //comments are preceeded 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
If Log is omitted then the default log - ResHacker.log - will be used.
NB: If a script does not produced the desired results then check the log!
Examples:  
rh_script_myprog_rus.txt -
  //This script deletes all Language Neutral(0)
  //stringtable, 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
发表于 2009-11-27 14:36:48 | 显示全部楼层
我没有,呵呵
发表于 2009-11-27 20:31:14 | 显示全部楼层
ResHacker.exe,同上。。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-22 17:31 , Processed in 0.087014 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表