This forum is read-only. Please post new topics in our Q&A forum.

question: Restorator commandline

General discussion about using Restorator.

Moderator: florian

Locked
HJW
New User
Posts: 2
Joined: Thu Mar 20, 2008 9:59 am

question: Restorator commandline

Post by HJW » Thu Mar 20, 2008 10:04 am

Hi all,

I am trying to apply resources (.res) to files and keeping the language of the replaced resource.

So if bitmap 101 in test.dll = English and bitmap 101 in image.res is German can it be applied and remain English ?

If this is not possible is it then possible to extract languageID from the resource bitmap 101 ?

thanks,
HJW

User avatar
florian
Bome Software: Founder
Posts: 2435
Joined: Thu Apr 28, 2005 10:09 pm
Location: Munich, Germany
Contact:

Post by florian » Mon Mar 31, 2008 9:29 pm

Hi,

by default, Restorator overwrites an existing resource by name regardless of language, if there is only one existing resource. From the command line, however, you can specify the resource to assign to by name and (optionally) the language when you use the -assignOn command line parameter. E.g.

Code: Select all

Restorator.exe -open test.dll -assignOn image.res "Bitmap\101\English (United States)" -save -exit
That should open test.dll and overwrite (or create) an english bitmap resource named 101 with the 101 bitmap in image.res . You can also use hexadecimal or decimal number for the language, e.g. Bitmap\101\0x0409 .

For more info, see http://www.bome.com/Restorator/help/hel ... c350126141

Regards,
Florian

HJW
New User
Posts: 2
Joined: Thu Mar 20, 2008 9:59 am

Post by HJW » Sun Apr 20, 2008 3:48 pm

Hi Florian,

First of all I want to thank you for your reply. It helped me a lot though I do have a next question using -assingOn
I work with .res files which contain a lot of bitmaps (101 to 150 for example) How do I need to use that with -assignOn ?

Code: Select all

Restorator.exe -open test.dll -assignOn image.res "*\English (United States)" -save -exit
I suppose wildcards are not possible?

HJW

User avatar
florian
Bome Software: Founder
Posts: 2435
Joined: Thu Apr 28, 2005 10:09 pm
Location: Munich, Germany
Contact:

Post by florian » Sun Apr 20, 2008 10:06 pm

in that case, I'd recommend using setLangID:
The following parameter

Code: Select all

-setLangIDOn Bitmap "English (United States)"
will set all bitmap resources to US English.

Now, the easy way would be this:

Code: Select all

Restorator.exe -open test.dll -assignOn image.res Bitmap -setLangIDOn Bitmap "English (United States)" -save -exit
But of course that may cause problems if you have/want to have different language resources.

Now the other way is not as straight-forward, but should work: use a temporary file, set all its bitmap resources to US English, and then use Restorator to assign the temporary file. At best, do this from a .bat file:

Code: Select all

copy image.res temp.res
Restorator.exe -open temp.res -setLangIDOn Bitmap "English (United States)" -save -open test.dll -assignOn temp.res Bitmap -save -exit
del temp.res
(you can also call Restorator.exe twice, for each file)

Let me know if that helps!
Florian

Locked