How to detect installed metatrader location path

 

Hello,

how to detect programmatically the installed metatrader location path, I would like to create a installation for EA or indicator.

Do I need to check the registry? What ist the location for metatrader 4 or 5?

 
Yong Zheng:

Hello,

how to detect programmatically the installed metatrader location path, I would like to create a installation for EA or indicator.

Do I need to check the registry? What ist the location for metatrader 4 or 5?

This?  

string TerminalPath()

 
andrew4789 #:

This?  

string TerminalPath()

Hello, this is a command in MQL4, but I want to write a installation program, to install my indicators or expert advisor. Detect the installed metatrader.

 
Yong Zheng #:

Hello, this is a command in MQL4, but I want to write a installation program, to install my indicators or expert advisor. Detect the installed metatrader.

Wouldn't you have that as part of your setup.exe?

An option to select mt4 path..

Also, many users will have more than one mt4..
 
I have solved this Problem.