Radialix Sofware

  • Decrease font size
  • Default font size
  • Increase font size
rt_add PDF Print E-mail

The rt_add utility inserts and replaces resources.

Command-line syntax:

rt_add filename option option option ...

filename - path and name of the PE32, PE32+, RES file or .NET assembly.

If the file name or an option contains spaces, it must be enclosed in quotes. For example:

rt_add "c:\test files\somefile.exe" -i"MAINICON,main icon.ico"

Running rt_add without parameters displays help on the command-line options.

General options:

  • [ ] - optional parameter.
  • -q - quiet mode.

Options for Win32 resources:

  • -r:"%type,%name[,%language],%file - insert/replace a Win32 resource.
  • -i:"%name[,%language],%file - insert/replace the resource icon.
  • -c:"%name[,%language],%file" - insert/replace the resource cursor.
  • -f:"[[%type],[%name],[%language],]%res_file" - insert/replace the resources with the resources stored in a PE32, PE32+ or RES file %res_file.
  • -m - insert an XP styles manifest. If the version resource is missing, it is also inserted.
  • -v - insert resource version. The resource version can also be inserted with the rt_version utility.

Parameters:

  • %type - resource type. If the type is not specified (the -f option), the utility will process all the resource types. To specify an index type, enter the # character followed by the index.
  • %name - resource name.- If the name is not specified (the -f option), the utility will process all the resources of the specified type. If the name is an index, enter the # character followed by the index.
  • %language - decimal language code, hexadecimal language code (0x...) or language name. If this parameter is not specified, the utility will use the neutral language (NEUTRAL, language code 0). The list of all supported languages can also be obtained with the rt_language utility.
  • %file - name of the file to insert the data from.
  • %res_file - name of the PE32, PE32+ or RES file to insert the resources from.

Note:

  • When inserting Win32 resources to PE32, PE32+ files: if the file does not have the resources section, the program will create it.

Options for .NET resources:

  • -ar:[%name,]%file - insert the resource %name that contains data from the file %file. If the resource name is not specified, the program sets the resource name as the name of the file %file with the extension but without the path.
  • -af:[%name,]%file - copy the resource %name from the assembly %file to the assembly filename. If the name of the resource %name is not specified, the utility will copy all the resources.

Parameters:

  • %name - resource name.
  • %file - path and name of the file.

Examples:

Insert an image from the file picture.png to the file somepefile as a Win32 resource LOGO; resource type - PNG, language - neutral:

rt_add "c:\test files\somefile.exe" -r:PNG,LOGO,picture.png

The same but with the Russian language set for the resource:

rt_add "c:\test files\somefile.exe" -r:PNG,LOGO,RUSSIAN,picture.png

The same but with the language with the hexadecimal language code 409 set for the resource:

rt_add "c:\test files\somefile.exe" -r:PNG,LOGO,0x409,picture.png

The same but the resource has the index 3 instead of the name:

rt_add "c:\test files\somefile.exe" -r:PNG,#3,0x409,picture.png

Copy all Win32 resources from the file sourcefile to somepefile:

rt_add "c:\test files\somefile.exe" -f:sourcefile

The same for .NET resources:

rt_add "c:\test files\somefile.exe" -af:sourcefile

Insert iconfile.ico as the main icon:

rt_add "c:\test files\somefile.exe" -i:MAINICON,iconfile.ico