Hi,
here I want to discuss the set of parameters for command-line usage of Restorator for future versions. Please post your requirements or ideas for command line usage of Restorator.
UPDATE: these were just proposals, for the current set of command line parameters, please consult the user's manual.
Florian
This forum is read-only. Please post new topics in our Q&A forum.
New command line parameters
Moderator: florian
- florian
- Bome Software: Founder
- Posts: 2436
- Joined: Thu Apr 28, 2005 10:09 pm
- Location: Munich, Germany
- Contact:
I start myself with a list of parameters:
General:
This file (.exe, .dll, ...) will be loaded and the actions below are applied to it.
After application of the actions below, the file is saved under this name. If -o is omitted, the file is not written!
Actions:
This will look for the resource identified by <res_name> and assign it with the <data file>. If the named resource does not exist, it is created. If <data file to assign> is a .res file and it does not contain a resource with name <res_name> this function will not do anything.
For example, you can replace a TEXT resource with the name 1 like this:
-assign TEXT\1 textfile.txt
this will assign <res file> file to the opened exe file. If the resource identified by <res file> does not exist, it is added. If the <res file> contains multiple resources, they will all be assigned/added.
Remove the resource(s) identified by <res_name_or_type>.
Example: remove the superflous PACKAGEINFO resource of Delphi executables:
-remove RCData\PACKAGEINFO
Extract the resource(s) to the folder <dir>. For each resource, one file is created in its "normal" file type, e.g. Icon resources as .ico file, String resources as .rc file, etc.
Extract the referenced resource(s) to the folder <dir> in the format specified by <file_type>. <file_type> is the extension of the desired file type, without the dot. If a resource cannot be extracted with the specified <file_type>, it is not extracted with this function. Examples:
Extract all resources that can be saved as .txt file:
-extractTyped all txt C:\AllTextResources
Extract all icon resources as bitmaps:
-extractTyped Icon bmp C:\ConvertedIcons
Extract the selected resources into one .res file.
Extract the selected resources into one .rc file.
Searches all resource(s) referenced by <res_name_or_type> for the text <search_string>. If it's found, it's replaced by the <replace_string>. Use RC-style escaped, e.g. \n for a new line, \" for a quote. This function will only replace in resources that can be edited in Restorator (i.e. no binary replacements).
Example: replace "bug" with "feature" in all resources:
-replace all "bug" "feature"
Change the version entry <version key> with the string <value>. If <version key> does not exist, it will be created. If <res_name> does not exist, this function will fail. If <version key> is "FileVersion" or "ProductVersion", and <value> is in the format 1.2.3.4, also the Binary File Version or Product Version, respectively, in the Fixed File Info will be modified.
Options:
verbose, output progress on the command line.
quiet, do not display any messages. Without -q and without -v, only error messages are displayed.
Select if to create a backup file upon saving if the file already exists. (Option Create backup files in the settings General|Saving).
Example: do not create a backup file:
-backup=no
Select if to mark modified resources. (Option Mark modified resources in the settings General|Saving). This only works in the full version of Restorator.
Example: do not mark modified resources:
-mark=no
Legend:
<res file>:
a file with .res extension
<res_name>:
a name of a resource, with optional language ID. Examples:
Icon\MainIcon
"String\4075\English (United States)"
Not valid is a resource type like just "Icon".
<res_name_or_type>:
A resource name like <res_name>, or a resource type, or the special name "all" in lower case. Examples:
Icon - all icon resources
all - all resources
ALL - all resources of named type ALL
General:
Code: Select all
-i <input file>
Code: Select all
-o <output file>
Actions:
Code: Select all
-assign <res_name> <data file to assign>
For example, you can replace a TEXT resource with the name 1 like this:
-assign TEXT\1 textfile.txt
Code: Select all
-assignRes <res file>
Code: Select all
-remove <res_name_or_type>
Example: remove the superflous PACKAGEINFO resource of Delphi executables:
-remove RCData\PACKAGEINFO
Code: Select all
-extract <res_name_or_type> <dir>
Code: Select all
-extractTyped <res_name_or_type> <file_type> <dir>
Extract all resources that can be saved as .txt file:
-extractTyped all txt C:\AllTextResources
Extract all icon resources as bitmaps:
-extractTyped Icon bmp C:\ConvertedIcons
Code: Select all
-extractRes <res_name_or_type> <res file>
Code: Select all
-extractRC <res_name_or_type> <rc file>
Code: Select all
-replace <res_name_or_type> <search_string> <replace_string
Example: replace "bug" with "feature" in all resources:
-replace all "bug" "feature"
Code: Select all
-versionSet <res_name> <version key> <value>
Options:
Code: Select all
-v
Code: Select all
-q
Code: Select all
-backup=[yes|no]
Example: do not create a backup file:
-backup=no
Code: Select all
-mark=[yes|no]
Example: do not mark modified resources:
-mark=no
Legend:
<res file>:
a file with .res extension
<res_name>:
a name of a resource, with optional language ID. Examples:
Icon\MainIcon
"String\4075\English (United States)"
Not valid is a resource type like just "Icon".
<res_name_or_type>:
A resource name like <res_name>, or a resource type, or the special name "all" in lower case. Examples:
Icon - all icon resources
all - all resources
ALL - all resources of named type ALL