zoom2009
Posts: 2
Joined: Wed Aug 30, 2017 8:24 am

How to create installer auto find folder directory for metatrader software.

Wed Aug 30, 2017 8:27 am

I want to create installer for metatrader software it will install file into folder name "Experts".

How to do that?

Best regards

Sorin
Posts: 663
Joined: Mon May 08, 2017 1:03 pm

Re: How to create installer auto find folder directory for metatrader software.

Wed Aug 30, 2017 1:33 pm

Hello and welcome to our forums,

This behaviour could be implemented by using a search operation and a property based folder. You have to figure out a method to detect the path of the installation of Metatrader. This could be by searching for a registry value, if the application stores in the registry its install path or by searching a file contained by the Metatrader application. If you decide to search for a file, you have to parse the content of the result property, in order to eliminate the name of the file from the full path. For example, if you search for file.exe, if the file is found, the RESULT_PROPERTY associated to this search will contain for example:
"C:\Program Files (x86)\Metatrader\file.exe"
You need a vbs custom action to parse this string, transforming it to:
"C:\Program Files (x86)\Metatrader\"
Please take a look on my colleague's post that describes the method here:
Re: How to get folder path containing specific file

Once you have found the path, you could use the RESULT_PROPERTY of that search to create a new Property Based folder in Files and Folders Page.
In this folder you should place your files. At install time they will be installed in Metatrader folder.

Best regards,
Sorin
Sorin Stefan - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”