Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 07, 2016, 10:36:29 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: ResHacker.exe -extract then -modify error?  (Read 6219 times)

electronixtar

  • Member
  • Joined in 2007
  • **
  • Posts: 141
    • View Profile
    • Donate to Member
ResHacker.exe -extract then -modify error?
« on: August 18, 2009, 04:34:45 AM »
Hi DC,

I am writing a script to modify chrome.dll using Resource Hacker, here's the script:
ResHack.exe -extract chrome.dll, test.rc, 9,101,
ResHack.exe -modify  chrome.dll, chromenew.dll, test.rc, 9,101,

The log says

Quote
ResHack.exe -modify  chrome.dll, chromenew.dll, test.rc, 9,101,
Error: Invalid resource type.

Anybody know why?

BTW, any free commandline tools for extract and modify PE's resources?
« Last Edit: August 18, 2009, 04:42:51 AM by electronixtar »

scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 638
  • I will eat Cody someday.
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: ResHacker.exe -extract then -modify error?
« Reply #1 on: August 18, 2009, 01:12:04 PM »
Hi DC,

I am writing a script to modify chrome.dll using Resource Hacker, here's the script:
ResHack.exe -extract chrome.dll, test.rc, 9,101,
ResHack.exe -modify  chrome.dll, chromenew.dll, test.rc, 9,101,

The log says

Quote
ResHack.exe -modify  chrome.dll, chromenew.dll, test.rc, 9,101,
Error: Invalid resource type.

Anybody know why?

BTW, any free commandline tools for extract and modify PE's resources?

Hello!
As far as I know, ResHacker does NOT support importing .rc files.
You can try this free nifty tool by XPero to make a ResHacker script, or compile the RC file to a RES file (and then use reshacker to modify it), using for example, the free Pelles Resource Compiler
(Attached here [attachimg=1 ][/attachimg]or can be grabbed from the Pelles C Compiler website])

Have fun reshacking!

electronixtar

  • Member
  • Joined in 2007
  • **
  • Posts: 141
    • View Profile
    • Donate to Member
Re: ResHacker.exe -extract then -modify error?
« Reply #2 on: August 18, 2009, 08:46:23 PM »
As far as I know, ResHacker does NOT support importing .rc files.

Thank you scancode. Your tool is very helpful.

Too bad ResHacker does not support .rc import, another issue is ResHacker.exe -extract does not produce standard .rc files, it's ResHacker's own special format with extesion name .rc. I think I need another tool for correcet .rc exporting.


scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 638
  • I will eat Cody someday.
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: ResHacker.exe -extract then -modify error?
« Reply #3 on: August 18, 2009, 08:50:46 PM »
it's ResHacker's own special format with extesion name .rc

Would you be interested in a reshacker -> rc converter?

electronixtar

  • Member
  • Joined in 2007
  • **
  • Posts: 141
    • View Profile
    • Donate to Member
Re: ResHacker.exe -extract then -modify error?
« Reply #4 on: August 19, 2009, 03:27:39 AM »
it's ResHacker's own special format with extesion name .rc

Would you be interested in a reshacker -> rc converter?

Yes please provide a small and convenient one. I need it in one of my auto modify scripts.

scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 638
  • I will eat Cody someday.
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: ResHacker.exe -extract then -modify error?
« Reply #5 on: August 19, 2009, 03:33:36 AM »
it's ResHacker's own special format with extesion name .rc

Would you be interested in a reshacker -> rc converter?

Yes please provide a small and convenient one. I need it in one of my auto modify scripts.

Okies. I'll give it a shot after I get my fair dose of
Vitamin S
Sleeeeeeep!


scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 638
  • I will eat Cody someday.
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: ResHacker.exe -extract then -modify error?
« Reply #6 on: August 19, 2009, 01:30:27 PM »
Yes please provide a small and convenient one. I need it in one of my auto modify scripts.

Good news! The formats aren't all that different.
Expect a quickie converter in an hour or so.

scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 638
  • I will eat Cody someday.
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: ResHacker.exe -extract then -modify error?
« Reply #7 on: August 19, 2009, 11:33:21 PM »
Yes please provide a small and convenient one. I need it in one of my auto modify scripts.
Expect a quickie converter in an hour or so.

Ok, that was the longest hour of my life :D

Anyways, here it is.
Usage: rh2rc.exe infile outfile

Has some basic error checking, and might have some bugs (it's the first version).
Give it a shot and reports any bugs you find please.
« Last Edit: August 19, 2009, 11:39:31 PM by scancode »

electronixtar

  • Member
  • Joined in 2007
  • **
  • Posts: 141
    • View Profile
    • Donate to Member
Re: ResHacker.exe -extract then -modify error?
« Reply #8 on: August 26, 2009, 09:21:57 PM »
Yes please provide a small and convenient one. I need it in one of my auto modify scripts.
Expect a quickie converter in an hour or so.

Ok, that was the longest hour of my life :D

Anyways, here it is.  (see attachment in previous post)Usage: rh2rc.exe infile outfile

Has some basic error checking, and might have some bugs (it's the first version).
Give it a shot and reports any bugs you find please.

That's cool, thank you very much scancode   :Thmbsup:

scancode

  • Honorary Member
  • Joined in 2007
  • **
  • Posts: 638
  • I will eat Cody someday.
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: ResHacker.exe -extract then -modify error?
« Reply #9 on: August 26, 2009, 09:25:19 PM »
That's cool, thank you very much scancode   :Thmbsup:

You're welcome! Glad it worked~ :Thmbsup: