Metatrader Installation error

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
msnomore
Newbie
Newbie
Posts: 3
Joined: Sat May 08, 2010 6:16 pm

Metatrader Installation error

Post by msnomore »

I am experiencing a problem with the installation of Metatrader4.

The problem is that at the end of the installation I receive an error message:
'Error changing registry data'. The system then proceeds to carry out a roll back routine.

I have previously managed to complete this on a Sony Laptop running Ubuntu 9.10 (Karmic) with Wine 1.1.42. Wine has since been updated to 1.1.43 and Metatrader still works, having been previously installed.

However, I have since tried on another PC system with the same software releases with the error result above (initially Wine 1.1.42, then 1.1.43). I have also installed Ubuntu 10.4 (Lucid) on this PC and have the same result. The PC is running the 64 bit version of Ubuntu, so in case this might be the problem, I have also tried the 32 bit version (albeit installed as a Virtual Machine). In both cases, the MFC42.DLL file was present and I have run (installed) both 'winetricks' and 'corefonts' in both environments.

Interestingly, when I first tried the installation on this system, I believe it actually installed but then failed to run, with an error regarding MFC42.DLL being missing. I can't remember what I did, but when I then tried to re-install it, I then received the registry update error message, and have done ever since with 9.10 and 10.4 (64 bit) and 10.4 (32 bit) via VM.

On the Sony system, where I have it installed successfully, I did install 'winedoors' but then un-installed this. I don't know whether something was 'left behind' that enabled the installation to complete.

I would be grateful if anyone has any ideas on what might be causing this, or what I can try.

However, I reiterate that I do have MFC42.DLL present. So unless there are different versions of this, then the lack of this library is not the problem.

Thanks, in anticipation.
:)
User avatar
L. Rahyen
Moderator
Moderator
Posts: 339
Joined: Fri Feb 22, 2008 9:13 pm

Metatrader Installation error

Post by L. Rahyen »

On 2010-05-09 (May, Sunday) 00:19:40 msnomore wrote:
I am experiencing a problem with the installation of Metatrader4.

The problem is that at the end of the installation I receive an error
message: 'Error changing registry data'. The system then proceeds to carry
out a roll back routine.
Try the following:

unset WINEPREFIX
mv ~/.wine{,.old}
wineboot
winetricks vcrun6
wine start /unix /path/to/metatrader4/setup.exe

If it still doesn't work please tell me.

Thank you for using Wine.
msnomore
Newbie
Newbie
Posts: 3
Joined: Sat May 08, 2010 6:16 pm

[solved]

Post by msnomore »

OK.

Firstly, WINEPREFIX was not set in the environment, which may or may not be a different problem.

Moved and recreated the .wine directory as suggested. (Some 'interesting' CLI syntax there. I'll have to go through that and try and understand it :?).

This solution worked, although it would lose any other app or 'C-Drive' info that was already present. Therefore, other than the fact that the recreating of the .wine directory ensures a clean start, the significant element would appear to be 'winetricks vcrun6'. So, I then used this command in the other installation I have, without first recreating the .wine directory.

This also worked, so would appear to be the 'real' solution.

From reading another post/thread somewhere, I was under the impression that vcrun6 was supposed to 'emulate/act as' mfc42 but did not appear to be working as such, thus requiring the presence of mfc42 separately. However, for whatever reason, the reverse would appear to be the case in this instance.

Either way, it now works with both 9.10 and 10.4, and without having to 'scrap' an existing Wine installation.

Thank you very much for your help. Hopefully, my results will help you guys further in identifying and resolving any outstanding issues that others might come across.

Rgs,

PS. You thanked me for using Wine. I believe it is more for myself and others to thank you and your colleagues, both for developing Wine and enabling us to move away from MS without losing those remaining (niggling) apps that do not run natively under Linux, and also for providing the support and help to overcome any issues that might arise in using it.

Thanks again.:)
User avatar
L. Rahyen
Moderator
Moderator
Posts: 339
Joined: Fri Feb 22, 2008 9:13 pm

Metatrader Installation error

Post by L. Rahyen »

On 2010-05-09 (May, Sunday) 16:17:29 msnomore wrote:
OK.

Firstly, WINEPREFIX was not set in the environment, which may or may not be
a different problem.
It depends. If you just playing with Metatrader - it doesn't matter. If you
are using it professionally, you need to have separate clean Wine prefix for it
(for maximum stability). For example:

export WINEPREFIX=~/.wine.metatrader

And then install vcrun6 and Metatrader.

BTW, if you are going to use Metatrader professionally in Wine/Linux
environment I have good news for you: in my practice it's MUCH more stable in
Wine/Linux than in Windows (I'm using Metatrader in Linux for many years).
Moved and recreated the .wine directory as suggested. (Some 'interesting'
CLI syntax there. I'll have to go through that and try and understand it
:?).
It's quite simple: "mv ~/.wine{,.old}" is equivalent to "mv ~/.wine
~/.wine.old". Another example: "mv ~/.wine{.new,.old}" = "mv ~/.wine.new
~/.wine.old" and so on.
This solution worked, although it would lose any other app or 'C-Drive'
info that was already present.
No, it wouldn't. Even after "mv ~/.wine{,.old}" you can run
"WINEPREFIX=~/.wine.old" and then continue to use it; if you have existing
launchers in your GUI, you can edit them and replace old path to your Wine
prefix with new one and they will continue to work too. Of course this is just
an example but it shows that you can easily rename your Wine prefix without
losing anything.

In practice, you should create separate Wine prefix for each important
application (like Metatrader if you are using it professionally) and leave
default ~/.wine for other applications.

There are other cases when using of separate Wine prefix(es) is useful. For
example, after some time you may find that there is too many applications in
~/.wine and they are conflicting with each other, or you simply want to
experiment without risking your default Wine prefix, or you need to have
different set of native overrides for some application(s) - in all these cases
you can use new clean Wine prefix(es) to minimize possible/existing problems.
Read http://wiki.winehq.org/FAQ#head-faf9617 ... 522d490faf to
know more about using Wine prefixes.

Remember: you should keep native overrides to minimum in each Wine prefix. If
an application requires specific override it is better to create new Wineprefix
for it because native override(s) may hurt other application(s) (so it is not
good idea to have native override(s) in default Wine prefix, especially if you
plan to use a lot of Windows applications).
From reading another post/thread somewhere, I was under the impression that
vcrun6 was supposed to 'emulate/act as' mfc42 but did not appear to be
working as such, thus requiring the presence of mfc42 separately.
vcrun6 includes mfc42 not the other way around. Run:

winetricks --help | grep mfc42

And you will see that vcrun6 includes mfc42, msvcp60 and msvcrt.
PS. You thanked me for using Wine. I believe it is more for myself and
others to thank you and your colleagues, both for developing Wine and
enabling us to move away from MS without losing those remaining (niggling)
apps that do not run natively under Linux, and also for providing the
support and help to overcome any issues that might arise in using it.
Thanks! But I want to say that without its users Wine in its current state
wouldn't exist - some users report bugs and help developers to fix them by
providing more details, some others even become Wine developers, sometimes even
without programming skills: they create icons, translations, fix typos; some
users write (or fix existing) documentation and do many other useful things.
Even by creating your post and telling us about your problem you are helping
the project because in the future a user may find a solution for his/her problem
here.
systino
Newbie
Newbie
Posts: 2
Joined: Mon Aug 23, 2010 11:37 am

Post by systino »

Hello, L. Rahyen and all others
excuse me for my bad english (i speak french)

it is now 4 days i leave windows because my windows XP crashed. i installed ubuntu 10 so i'm new linux user. i want to install metatrder 4 and vb6 I folowed your tutorial:

unset WINEPREFIX
mv ~/.wine{,.old}
wineboot
winetricks vcrun6
wine start /unix /path/to/metatrader4/setup.exe

i installed metatrader and it work fine. now i want to install another program (old visual basic 6 to repair an old program). you tell to use this code:

export WINEPREFIX=~/.wine.metatrader

for each program to instal. how must i do to install the second program without changing the first one?
how to run metatrader and vb6 on the same time?

please help me and thanks very much for your excellent and useful wine
Martin Gregorie

Metatrader Installation error

Post by Martin Gregorie »

On Mon, 2010-08-23 at 12:16 -0500, systino wrote:
i installed metatrader and it work fine. now i want to install another
program (old visual basic 6 to repair an old program). you tell to use
this code:

export WINEPREFIX=~/.wine.metatrader

for each program to instal. how must i do to install the second
program without changing the first one?
how to run metatrader and vb6 on the same time?
By using a different prefix for each program:

export WINEPREFIX=~/.wine.metatrader
export WINEPREFIX=~/.wine.another_app
export WINEPREFIX=~/.wine.and_another
...


Martin
systino
Newbie
Newbie
Posts: 2
Joined: Mon Aug 23, 2010 11:37 am

Post by systino »

OK

Thanks very much, i installed mT4 demo and mt4 reel, so i'm going to install the the third program

Abel
Locked