Jump to content

[ResHacker] Problem replacing Menu


PITU

Recommended Posts

Hello!

I was just trying to edit the Menu in "notepad.exe". It will do very fine, if I do it manually.

But, when it comes to scripting I am not able to edit the file.

Here is what I have done:

  1. I opened the original "notepad.exe" in ResHacker
  2. Saved [ Menu : 1 : 1031 ] ... to c:\np_menu.res
  3. Edited the resfile to my needs
  4. closed ResHacker
  5. created scriptfile (see below)
  6. called Reshacker.exe -script c:\np_script.txt

np_script.txt

[FILENAMES]
Exe=c:\notepad.exe
SaveAs=c:\notepad2.exe
Log=c:\np_log.log

[COMMANDS]
-addoverwrite "c:\np_menu.res", MENU, 1, 1031

Now it took a minute and Reshacker created this logfile:

[01 Sep 2006, 15:02:20]

[FileNames]
Exe=c:\notepad.exe
SaveAs=c:\notepad2.exe
Log=c:\np_log.log

[Commands]
-addoverwrite "c:\np_menu.res", MENU, 1, 1031

Commands completed

But it does not create the edited file!

I do not know, where the Problem is.

I hope, anybody can help me.

Thanks in andvance

/PITU

Link to comment
Share on other sites


PITU, looking at your log shows that Reshacker didn't found the MENU 1 1031 resource in your .res file. (otherwise the log would have said "Modified: MENU, 1, 1031")

If your c:\np_menu.res file only contains the resources to update and no unecessary ones (it's likely to be the case), you can omit the restype, resname and reslang from the command. I never tested that in a script file, but it works from the commandline :

C:\>ResHacker.exe -addoverwrite notepad.exe, notepad2.exe, np_menu.res, , ,

(you may need to check the arguments order in the help file)

++

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...