|
The rt_delete utility is to be used for deleting resources.
Command-line syntax:
rt_delete filename option option option ...
filename - path and name of the PE32, PE32+, RES file or .NET assembly.
If the file name or a parameter of an option contains spaces, it must be enclosed in quotes. Example:
rt_delete "c:\test files\somefile.exe" -i:MAINICON
Running rt_delete without parameters displays help on the command-line options.
General options:
- [] - optional parameter.
- -q - quiet mode.
Options for Win32 resources:
- -r[:"[%type][,%name][,%language]"] - delete a Win32 resource. When no parameters are specified, the option deletes all the resources.
- -i[:"%name[,%language]"] - delete icon. When no parameters specified, the option deletes all the icons.
- -c[:"%name[,%language]"] - delete cursor. When no parameters specified, the option deletes all the cursors.
- -u - find and delete unused Delphi/C++Builder resources. See also rt_check.
- -reloc - delete relocation table (not recommended for DLL and .NET assemblies).
- -dbg - delete debug data.
Parameters:
- %type - resource type. When no resource type is specified, the program will process all the resource types. To specify a resource type that is addressable by index, enter the # character followed by the index.
- %name - resource name.- If the name is not specified, the utility will process all the resources of the specified type. To specify a resource that is addressable by 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 resource's language code will not be checked. The list of all resource languages in a file, as well as all supported languages, can also be obtained with the rt_language utility.
Note:
- If after deleting the resources the PE32, PE32+ file contains no Win32 resources, the resources section is deleted.
Options for .NET resources:
- -ar[:"%name"] - delete the resource %name. When no parameters are specified, the option deletes all the resources.
Parameters:
- %name - resource name.- If the name is not specified, all the resources will be processed.
Examples:
Delete the DVCLAL resource (Delphi/C++Builder):
rt_delete "c:\test files\somefile.exe" -r:RT_RCDATA,DVCLAL
or
rt_delete "c:\test files\somefile.exe" -r:#10,DVCLAL
Delete all RT_RCDATA resources:
rt_delete "c:\test files\somefile.exe" -r:RT_RCDATA
Delete all Russian resources (LDID 1049):
rt_delete "c:\test files\somefile.exe" -r:,,1049
or
rt_delete "c:\test files\somefile.exe" -r:,,RUSSIAN
Delete the main icon:
rt_delete "c:\test files\somefile.exe" -i:MAINICON
Delete all icons:
rt_delete "c:\test files\somefile.exe" -i
Delete all Win32 resources:
rt_delete "c:\test files\somefile.exe" -r |