How to edit/modify system32 exe files?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
argolance
Level 2
Level 2
Posts: 15
Joined: Wed Oct 13, 2010 10:50 am

How to edit/modify system32 exe files?

Post by argolance »

Hello,
I would like to try to edit/modify default values of winebrowser.exe (for example with Reshacker) for it to open url and email addresses with Seamonkey... (Trying to solve this problem => See my post)
+-WineBrowser
| |
| +->Browsers
| | [List of browsers that Wine will attempt to launch when running winebrowser
| | command or clicking on a link in a Windows application. Default value is
| | xdg-open,firefox,konqueror,mozilla,netscape,galeon,opera,dillo]
| |
| +->Mailers
| [List of mail clients that Wine will attempt to launch when running winebrowser
| Default value is xdg-email,mozilla-thunderbird,thunderbird,evolution]
Is it a wrong idea?

Regards!
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: How to edit/modify system32 exe files?

Post by vitamin »

argolance wrote:Is it a wrong idea?
No, it's the correct idea and exactly the right place to change it.
argolance
Level 2
Level 2
Posts: 15
Joined: Wed Oct 13, 2010 10:50 am

Post by argolance »

Hello,
Thanks for your answer!
No, it's the correct idea and exactly the right place to change it.
OK! :D
But, while opening 'winebrowser.exe' with Reshacker under LINUX (French Puppy LINUX =>Toutou LINUX), nothing happens, application window stays blan k:shock:. Do I have to open it properly under Windows or with an other program than Reshacker?

Regards.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

argolance wrote:But, while opening 'winebrowser.exe' with Reshacker under LINUX
What you quoted are registry entries.

What you trying to do - modify Wine's own programs with resource editors. It won't work/do anything.
argolance
Level 2
Level 2
Posts: 15
Joined: Wed Oct 13, 2010 10:50 am

Post by argolance »

Hello,
... If I well understand, I can just modify/create registry keys to solve my problem but not the winebrowser exe file? Sorry, I thought this could be done that way while adding 'Seamonkey' to the list of supported browsers.
I am a quite naïve amateur!

Regards.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

argolance wrote:If I well understand, I can just modify/create registry keys to solve my problem?
Correct. You can save this as .reg file and import it with 'regedit file.reg':

Code: Select all

[HKEY_CURRENT_USER\Software\Wine\WineBrowser]
Browsers="seamonkey"
Mailers="seamonkey"
argolance
Level 2
Level 2
Posts: 15
Joined: Wed Oct 13, 2010 10:50 am

Post by argolance »

Hello vitamin,
Thanks a lot for your kind patience!
so, I saved

Code: Select all

 [HKEY_CURRENT_USER\Software\Wine\WineBrowser]
Browsers="seamonkey"
Mailers="seamonkey" 
as 'seamonkey.reg' and imported it into the registry. Then, I couldn't find this modification in the registry: just the entry 'winebrowser'. So I changed this to:

Code: Select all

 [HKEY_CURRENT_USER\Software\Wine\WineBrowser]
"Browsers"="seamonkey"
"Mailers"="seamonkey -mail"
(is it wright?)
The fact remains that now, links as 'http://www.xxx.com/index htm(l)' (it was already the case before modifying the registry) as well as 'http://www.xxx.com' or 'http://www.xxx.com/stuf.php' are opened in my seamonkey browser (it was not the case before modifying the registry).

But concerning emails, problem stays: nothing happens...

Something strange, my xerrs.log says:
wine: cannot find L"C:\\windows\\system32\\www.xxx.com" (though, as said above, it runs quite well!)
wine: cannot find L"C:\\windows\\system32\\mailto:[email protected]"
No error mentioned about (for example this topic!) => 'http://forum.winehq.org/viewtopic.php?t=8600' which is opened in seamonkey...

Regards. :D :(
argolance
Level 2
Level 2
Posts: 15
Joined: Wed Oct 13, 2010 10:50 am

Post by argolance »

PS:
Forgot to report the third line:

Code: Select all

wine: cannot find L"C:\\windows\\system32\\www.xxx.com"
wine: cannot find L"C:\\windows\\system32\\mailto:[email protected]"
err:winebrowser:launch_app could not find a suitable app to run
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

argolance wrote:"Mailers"="seamonkey -mail"
Winebrowser doesn't support command line options. If you must specify them, then you need to use an external wrapper script.
argolance
Level 2
Level 2
Posts: 15
Joined: Wed Oct 13, 2010 10:50 am

Post by argolance »

Hello,
you must specify them, then you need to use an external wrapper script.
:shock: :oops: !
Could you please give me some explanation or any example, because it sounds hebrew for me!

Cordialemeht.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

argolance wrote:Could you please give me some explanation or any example
File ~/bin/seamonkey_wrapper:

Code: Select all

#!/bin/sh
seamonkey -mail $@
Registry:

Code: Select all

[HKEY_CURRENT_USER\Software\Wine\WineBrowser]
"Mailers"="/home/me/bin/seamonkey_wrapper"
Don't forget to 'chmod a+x ~/bin/seamonkey_wrapper'
argolance
Level 2
Level 2
Posts: 15
Joined: Wed Oct 13, 2010 10:50 am

Post by argolance »

Hello,
Thanks!
I already tried this but without success: (I thought the wrapper? script you were speaking of was something else)!
  • - First test, exactly as you say, with the registry key "Mailers"="/usr/bin/seamonkey_wrapper":

    Code: Select all

    #!/bin/sh
    seamonkey -mail $@ 
    - Second test:

    Code: Select all

    #!/bin/sh
    seamonkey -mail "$@" 
    Every time, I get Seamonkey browser with untitled tab.

    - Third test:

    Code: Select all

    #!/bin/sh
    seamonkey -mail 
    This time I get Seamonkey mail main window.

    => xerrs.log (1, 2, 3):
    wine: cannot find L"C:\\windows\\system32\\mailto:[email protected]"
    Unrecognized URL: mailto:[email protected]
    I tried something else:

    Code: Select all

    #!/bin/sh
    seamonkey -mail
    and:

    Code: Select all

    "Mailers"="/usr/bin/seamonkey_wrapper "%1"" 
Nothing happens!

We are not far from the solution, I think...
Sorry to abuse.

Regards
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

argolance wrote:seamonkey -mail $@
You should really try it first form the command line. The proper option to use is "-compose" not "-mail".
argolance
Level 2
Level 2
Posts: 15
Joined: Wed Oct 13, 2010 10:50 am

Post by argolance »

YESSSS!
Thank you very much vitamin for your precious help! :D
All is now correct with seamonkey browser and mailer though I still have this in my xerrs.log:
wine: cannot find L"C:\\windows\\system32\\mailto:[email protected]"
Is there something else to do for all being quite clean?

Cordialement!
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

argolance wrote:All is now correct with seamonkey browser and mailer though I still have this in my xerrs.log:
Put it all back the way I told you in the beginning.
argolance
Level 2
Level 2
Posts: 15
Joined: Wed Oct 13, 2010 10:50 am

Post by argolance »

Hello vitamin,
Sorry but I don't understand what you mean :oops::
Put it all back the way I told you in the beginning :shock:
Do you mean I have to delete all the modifications I brought to the registry and do them again?

Regards.
Locked