Metatrader Base Directory

 
I need a way to assign the base directory name (usually "c:\program files\metatrader 4") to a string, so I can use it to call the ShellExecuteA( ) DLL function. I need to run a Perl script in the experts directory, but the base dir *could* vary depending on where MT4 was installed.

Is there a MT4 terminal variable I can use, or some other way to determine through the MQ4 language what the base installation dir is?

Thanks!
Alan
Reason: