Download MetaTrader 5

set user data directory

To add comments, please log in or register
Do you want to write a trading robot? Find solution in MQL5 Reference!
Tamas Csabina
Tamas Csabina 2014.11.16 09:30 


Is there a way to set the User Data Directory upon terminal start? I think that would be a solution for my problem, which is:

I have XP system, that I access via RDP. I have configured that the MT4 terminal starts automatically after system restart. When the system is restarted and the MT4 terminal is launched, the User Data Directory is pointing to the installation directory (c:\program files\<broker>\).

This itself should not be a problem, but if I restart the terminal while I am in the RDP session, the restarted terminal's User Data Directory will be c:\documents and settings\<username>\Application Data\metaquotes\terminal\.... So basically I have to deal with 2 User Data Directories.

This is, of course, annoying, so I want to 'fix' somehow the User Data Directory. I don't mind which one is it, the one in the installation folder, or the one in my profile's directory, but I want to 'fix' which User Data Directory to use, no matter if this is a terminal instance automatically started after system restart, or the terminal instance started within an RDP session.

I don't know if that is important, but the XP system configured to auto-login the user upon system restart. And of course the auto-logged in user is the same user account I use for RDP.

I would appreciate any tips on this.

Tamas Csabina
Tamas Csabina 2014.11.16 10:53  

I think I have found a solution:

If I add the /portable command line option then the User Data Directory will be the installation directory. No matter if the terminal is started from the RDP session.

To add comments, please log in or register