diff --git a/MetaTraderApi_2013.sln b/MetaTraderApi_2013.sln
index ed2eeaa0..e273d530 100755
--- a/MetaTraderApi_2013.sln
+++ b/MetaTraderApi_2013.sln
@@ -35,82 +35,184 @@ Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "MtApi5Installer", "MtApi5In
{DE76D5C7-B99C-4467-8408-78173BDD84E0} = {DE76D5C7-B99C-4467-8408-78173BDD84E0}
EndProjectSection
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MtApiSetupActions", "MtApiSetupActions\MtApiSetupActions.csproj", "{10800F37-F71B-4818-8351-8CF744295F80}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
Release|x64 = Release|x64
+ Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {220F01DF-8489-44F3-9C79-D5AFFCE94D6B}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {220F01DF-8489-44F3-9C79-D5AFFCE94D6B}.Debug|Mixed Platforms.Build.0 = Debug|x86
{220F01DF-8489-44F3-9C79-D5AFFCE94D6B}.Debug|Win32.ActiveCfg = Debug|x86
{220F01DF-8489-44F3-9C79-D5AFFCE94D6B}.Debug|x64.ActiveCfg = Debug|x86
+ {220F01DF-8489-44F3-9C79-D5AFFCE94D6B}.Debug|x86.ActiveCfg = Debug|x86
+ {220F01DF-8489-44F3-9C79-D5AFFCE94D6B}.Debug|x86.Build.0 = Debug|x86
+ {220F01DF-8489-44F3-9C79-D5AFFCE94D6B}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {220F01DF-8489-44F3-9C79-D5AFFCE94D6B}.Release|Mixed Platforms.Build.0 = Release|x86
{220F01DF-8489-44F3-9C79-D5AFFCE94D6B}.Release|Win32.ActiveCfg = Release|x86
{220F01DF-8489-44F3-9C79-D5AFFCE94D6B}.Release|x64.ActiveCfg = Release|x86
+ {220F01DF-8489-44F3-9C79-D5AFFCE94D6B}.Release|x86.ActiveCfg = Release|x86
+ {220F01DF-8489-44F3-9C79-D5AFFCE94D6B}.Release|x86.Build.0 = Release|x86
+ {663CC515-EAAE-47D4-8933-5008C2DA1160}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {663CC515-EAAE-47D4-8933-5008C2DA1160}.Debug|Mixed Platforms.Build.0 = Debug|x86
{663CC515-EAAE-47D4-8933-5008C2DA1160}.Debug|Win32.ActiveCfg = Debug|x86
{663CC515-EAAE-47D4-8933-5008C2DA1160}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {663CC515-EAAE-47D4-8933-5008C2DA1160}.Debug|x86.ActiveCfg = Debug|x86
+ {663CC515-EAAE-47D4-8933-5008C2DA1160}.Debug|x86.Build.0 = Debug|x86
+ {663CC515-EAAE-47D4-8933-5008C2DA1160}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {663CC515-EAAE-47D4-8933-5008C2DA1160}.Release|Mixed Platforms.Build.0 = Release|x86
{663CC515-EAAE-47D4-8933-5008C2DA1160}.Release|Win32.ActiveCfg = Release|x86
{663CC515-EAAE-47D4-8933-5008C2DA1160}.Release|x64.ActiveCfg = Release|Any CPU
+ {663CC515-EAAE-47D4-8933-5008C2DA1160}.Release|x86.ActiveCfg = Release|x86
+ {663CC515-EAAE-47D4-8933-5008C2DA1160}.Release|x86.Build.0 = Release|x86
+ {DE76D5C7-B99C-4467-8408-78173BDD84E0}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {DE76D5C7-B99C-4467-8408-78173BDD84E0}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{DE76D5C7-B99C-4467-8408-78173BDD84E0}.Debug|Win32.ActiveCfg = Debug|Any CPU
{DE76D5C7-B99C-4467-8408-78173BDD84E0}.Debug|Win32.Build.0 = Debug|Any CPU
{DE76D5C7-B99C-4467-8408-78173BDD84E0}.Debug|x64.ActiveCfg = Debug|Any CPU
{DE76D5C7-B99C-4467-8408-78173BDD84E0}.Debug|x64.Build.0 = Debug|Any CPU
+ {DE76D5C7-B99C-4467-8408-78173BDD84E0}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DE76D5C7-B99C-4467-8408-78173BDD84E0}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {DE76D5C7-B99C-4467-8408-78173BDD84E0}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{DE76D5C7-B99C-4467-8408-78173BDD84E0}.Release|Win32.ActiveCfg = Release|Any CPU
{DE76D5C7-B99C-4467-8408-78173BDD84E0}.Release|Win32.Build.0 = Release|Any CPU
{DE76D5C7-B99C-4467-8408-78173BDD84E0}.Release|x64.ActiveCfg = Release|Any CPU
{DE76D5C7-B99C-4467-8408-78173BDD84E0}.Release|x64.Build.0 = Release|Any CPU
+ {DE76D5C7-B99C-4467-8408-78173BDD84E0}.Release|x86.ActiveCfg = Release|Any CPU
+ {2BE5FAC1-7FB7-45C3-9215-31A5BC4B964F}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {2BE5FAC1-7FB7-45C3-9215-31A5BC4B964F}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{2BE5FAC1-7FB7-45C3-9215-31A5BC4B964F}.Debug|Win32.ActiveCfg = Debug|Win32
{2BE5FAC1-7FB7-45C3-9215-31A5BC4B964F}.Debug|Win32.Build.0 = Debug|Win32
{2BE5FAC1-7FB7-45C3-9215-31A5BC4B964F}.Debug|x64.ActiveCfg = Debug|Win32
+ {2BE5FAC1-7FB7-45C3-9215-31A5BC4B964F}.Debug|x86.ActiveCfg = Debug|Win32
+ {2BE5FAC1-7FB7-45C3-9215-31A5BC4B964F}.Debug|x86.Build.0 = Debug|Win32
+ {2BE5FAC1-7FB7-45C3-9215-31A5BC4B964F}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {2BE5FAC1-7FB7-45C3-9215-31A5BC4B964F}.Release|Mixed Platforms.Build.0 = Release|Win32
{2BE5FAC1-7FB7-45C3-9215-31A5BC4B964F}.Release|Win32.ActiveCfg = Release|Win32
{2BE5FAC1-7FB7-45C3-9215-31A5BC4B964F}.Release|Win32.Build.0 = Release|Win32
{2BE5FAC1-7FB7-45C3-9215-31A5BC4B964F}.Release|x64.ActiveCfg = Release|Win32
+ {2BE5FAC1-7FB7-45C3-9215-31A5BC4B964F}.Release|x86.ActiveCfg = Release|Win32
+ {2BE5FAC1-7FB7-45C3-9215-31A5BC4B964F}.Release|x86.Build.0 = Release|Win32
+ {7A76C388-A8FB-4949-8170-24D4742E934E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {7A76C388-A8FB-4949-8170-24D4742E934E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{7A76C388-A8FB-4949-8170-24D4742E934E}.Debug|Win32.ActiveCfg = Debug|Any CPU
{7A76C388-A8FB-4949-8170-24D4742E934E}.Debug|Win32.Build.0 = Debug|Any CPU
{7A76C388-A8FB-4949-8170-24D4742E934E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {7A76C388-A8FB-4949-8170-24D4742E934E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7A76C388-A8FB-4949-8170-24D4742E934E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {7A76C388-A8FB-4949-8170-24D4742E934E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{7A76C388-A8FB-4949-8170-24D4742E934E}.Release|Win32.ActiveCfg = Release|Any CPU
{7A76C388-A8FB-4949-8170-24D4742E934E}.Release|Win32.Build.0 = Release|Any CPU
{7A76C388-A8FB-4949-8170-24D4742E934E}.Release|x64.ActiveCfg = Release|Any CPU
+ {7A76C388-A8FB-4949-8170-24D4742E934E}.Release|x86.ActiveCfg = Release|Any CPU
+ {AC8B5010-DA75-477E-9CA5-547C649E12D8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {AC8B5010-DA75-477E-9CA5-547C649E12D8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{AC8B5010-DA75-477E-9CA5-547C649E12D8}.Debug|Win32.ActiveCfg = Debug|Any CPU
{AC8B5010-DA75-477E-9CA5-547C649E12D8}.Debug|Win32.Build.0 = Debug|Any CPU
{AC8B5010-DA75-477E-9CA5-547C649E12D8}.Debug|x64.ActiveCfg = Debug|Any CPU
{AC8B5010-DA75-477E-9CA5-547C649E12D8}.Debug|x64.Build.0 = Debug|Any CPU
+ {AC8B5010-DA75-477E-9CA5-547C649E12D8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {AC8B5010-DA75-477E-9CA5-547C649E12D8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {AC8B5010-DA75-477E-9CA5-547C649E12D8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{AC8B5010-DA75-477E-9CA5-547C649E12D8}.Release|Win32.ActiveCfg = Release|Any CPU
{AC8B5010-DA75-477E-9CA5-547C649E12D8}.Release|Win32.Build.0 = Release|Any CPU
{AC8B5010-DA75-477E-9CA5-547C649E12D8}.Release|x64.ActiveCfg = Release|Any CPU
{AC8B5010-DA75-477E-9CA5-547C649E12D8}.Release|x64.Build.0 = Release|Any CPU
+ {AC8B5010-DA75-477E-9CA5-547C649E12D8}.Release|x86.ActiveCfg = Release|Any CPU
+ {CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
+ {CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Debug|Win32.ActiveCfg = Debug|Win32
{CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Debug|Win32.Build.0 = Debug|Win32
{CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Debug|x64.ActiveCfg = Debug|x64
{CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Debug|x64.Build.0 = Debug|x64
+ {CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Debug|x86.ActiveCfg = Debug|Win32
+ {CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Debug|x86.Build.0 = Debug|Win32
+ {CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Release|Mixed Platforms.ActiveCfg = Release|Win32
+ {CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Release|Mixed Platforms.Build.0 = Release|Win32
{CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Release|Win32.ActiveCfg = Release|Win32
{CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Release|Win32.Build.0 = Release|Win32
{CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Release|x64.ActiveCfg = Release|x64
{CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Release|x64.Build.0 = Release|x64
+ {CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Release|x86.ActiveCfg = Release|Win32
+ {CB6D4A3E-2F2E-4C67-929D-3C2A8FD1C556}.Release|x86.Build.0 = Release|Win32
+ {38B9C657-BC2F-44F0-8824-54B31F2A64F5}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {38B9C657-BC2F-44F0-8824-54B31F2A64F5}.Debug|Mixed Platforms.Build.0 = Debug|x86
{38B9C657-BC2F-44F0-8824-54B31F2A64F5}.Debug|Win32.ActiveCfg = Debug|x86
{38B9C657-BC2F-44F0-8824-54B31F2A64F5}.Debug|x64.ActiveCfg = Debug|Any CPU
{38B9C657-BC2F-44F0-8824-54B31F2A64F5}.Debug|x64.Build.0 = Debug|Any CPU
+ {38B9C657-BC2F-44F0-8824-54B31F2A64F5}.Debug|x86.ActiveCfg = Debug|x86
+ {38B9C657-BC2F-44F0-8824-54B31F2A64F5}.Debug|x86.Build.0 = Debug|x86
+ {38B9C657-BC2F-44F0-8824-54B31F2A64F5}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {38B9C657-BC2F-44F0-8824-54B31F2A64F5}.Release|Mixed Platforms.Build.0 = Release|x86
{38B9C657-BC2F-44F0-8824-54B31F2A64F5}.Release|Win32.ActiveCfg = Release|x86
{38B9C657-BC2F-44F0-8824-54B31F2A64F5}.Release|x64.ActiveCfg = Release|Any CPU
{38B9C657-BC2F-44F0-8824-54B31F2A64F5}.Release|x64.Build.0 = Release|Any CPU
+ {38B9C657-BC2F-44F0-8824-54B31F2A64F5}.Release|x86.ActiveCfg = Release|x86
+ {38B9C657-BC2F-44F0-8824-54B31F2A64F5}.Release|x86.Build.0 = Release|x86
+ {EB7C228D-9494-4985-845E-B8312450DF3D}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {EB7C228D-9494-4985-845E-B8312450DF3D}.Debug|Mixed Platforms.Build.0 = Debug|x86
{EB7C228D-9494-4985-845E-B8312450DF3D}.Debug|Win32.ActiveCfg = Debug|x86
{EB7C228D-9494-4985-845E-B8312450DF3D}.Debug|x64.ActiveCfg = Debug|x86
+ {EB7C228D-9494-4985-845E-B8312450DF3D}.Debug|x86.ActiveCfg = Debug|x86
+ {EB7C228D-9494-4985-845E-B8312450DF3D}.Debug|x86.Build.0 = Debug|x86
+ {EB7C228D-9494-4985-845E-B8312450DF3D}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {EB7C228D-9494-4985-845E-B8312450DF3D}.Release|Mixed Platforms.Build.0 = Release|x86
{EB7C228D-9494-4985-845E-B8312450DF3D}.Release|Win32.ActiveCfg = Release|x86
{EB7C228D-9494-4985-845E-B8312450DF3D}.Release|x64.ActiveCfg = Release|x86
+ {EB7C228D-9494-4985-845E-B8312450DF3D}.Release|x86.ActiveCfg = Release|x86
+ {EB7C228D-9494-4985-845E-B8312450DF3D}.Release|x86.Build.0 = Release|x86
+ {78B94552-DB17-40EC-B7C6-23D32DB85DC1}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {78B94552-DB17-40EC-B7C6-23D32DB85DC1}.Debug|Mixed Platforms.Build.0 = Debug|x86
{78B94552-DB17-40EC-B7C6-23D32DB85DC1}.Debug|Win32.ActiveCfg = Debug|x86
{78B94552-DB17-40EC-B7C6-23D32DB85DC1}.Debug|Win32.Build.0 = Debug|x86
{78B94552-DB17-40EC-B7C6-23D32DB85DC1}.Debug|x64.ActiveCfg = Debug|x86
+ {78B94552-DB17-40EC-B7C6-23D32DB85DC1}.Debug|x86.ActiveCfg = Debug|x86
+ {78B94552-DB17-40EC-B7C6-23D32DB85DC1}.Debug|x86.Build.0 = Debug|x86
+ {78B94552-DB17-40EC-B7C6-23D32DB85DC1}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {78B94552-DB17-40EC-B7C6-23D32DB85DC1}.Release|Mixed Platforms.Build.0 = Release|x86
{78B94552-DB17-40EC-B7C6-23D32DB85DC1}.Release|Win32.ActiveCfg = Release|x86
{78B94552-DB17-40EC-B7C6-23D32DB85DC1}.Release|Win32.Build.0 = Release|x86
{78B94552-DB17-40EC-B7C6-23D32DB85DC1}.Release|x64.ActiveCfg = Release|x86
+ {78B94552-DB17-40EC-B7C6-23D32DB85DC1}.Release|x86.ActiveCfg = Release|x86
+ {78B94552-DB17-40EC-B7C6-23D32DB85DC1}.Release|x86.Build.0 = Release|x86
+ {A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Debug|Mixed Platforms.Build.0 = Debug|x86
{A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Debug|Win32.ActiveCfg = Debug|x86
{A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Debug|Win32.Build.0 = Debug|x86
{A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Debug|x64.ActiveCfg = Debug|x64
{A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Debug|x64.Build.0 = Debug|x64
+ {A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Debug|x86.ActiveCfg = Debug|x86
+ {A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Debug|x86.Build.0 = Debug|x86
+ {A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Release|Mixed Platforms.Build.0 = Release|x86
{A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Release|Win32.ActiveCfg = Release|x86
{A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Release|Win32.Build.0 = Release|x86
{A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Release|x64.ActiveCfg = Release|x64
{A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Release|x64.Build.0 = Release|x64
+ {A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Release|x86.ActiveCfg = Release|x86
+ {A9ED070F-AB4D-4380-9DDE-5D931AC71333}.Release|x86.Build.0 = Release|x86
+ {10800F37-F71B-4818-8351-8CF744295F80}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {10800F37-F71B-4818-8351-8CF744295F80}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {10800F37-F71B-4818-8351-8CF744295F80}.Debug|Win32.ActiveCfg = Debug|x86
+ {10800F37-F71B-4818-8351-8CF744295F80}.Debug|Win32.Build.0 = Debug|x86
+ {10800F37-F71B-4818-8351-8CF744295F80}.Debug|x64.ActiveCfg = Debug|x86
+ {10800F37-F71B-4818-8351-8CF744295F80}.Debug|x86.ActiveCfg = Debug|x86
+ {10800F37-F71B-4818-8351-8CF744295F80}.Debug|x86.Build.0 = Debug|x86
+ {10800F37-F71B-4818-8351-8CF744295F80}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {10800F37-F71B-4818-8351-8CF744295F80}.Release|Mixed Platforms.Build.0 = Release|x86
+ {10800F37-F71B-4818-8351-8CF744295F80}.Release|Win32.ActiveCfg = Release|x86
+ {10800F37-F71B-4818-8351-8CF744295F80}.Release|Win32.Build.0 = Release|x86
+ {10800F37-F71B-4818-8351-8CF744295F80}.Release|x64.ActiveCfg = Release|x86
+ {10800F37-F71B-4818-8351-8CF744295F80}.Release|x86.ActiveCfg = Release|x86
+ {10800F37-F71B-4818-8351-8CF744295F80}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/MtApiInstaller/CustomActions.wxs b/MtApiInstaller/CustomActions.wxs
new file mode 100644
index 00000000..9b80d889
--- /dev/null
+++ b/MtApiInstaller/CustomActions.wxs
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MtApiInstaller/MtApiInstaller.wixproj b/MtApiInstaller/MtApiInstaller.wixproj
index c230d653..ce0d2b2f 100755
--- a/MtApiInstaller/MtApiInstaller.wixproj
+++ b/MtApiInstaller/MtApiInstaller.wixproj
@@ -21,6 +21,7 @@
obj\$(Configuration)\
+
@@ -29,6 +30,16 @@
WixUIExtension
+
+
+ MtApiSetupActions
+ {10800f37-f71b-4818-8351-8cf744295f80}
+ True
+ True
+ Binaries;Content;Satellites
+ INSTALLFOLDER
+
+
-
-
-
-
-
-
+
+
+
+
-
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
\ No newline at end of file
diff --git a/MtApiSetupActions/CustomAction.config b/MtApiSetupActions/CustomAction.config
new file mode 100644
index 00000000..233c44d7
--- /dev/null
+++ b/MtApiSetupActions/CustomAction.config
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MtApiSetupActions/CustomAction.cs b/MtApiSetupActions/CustomAction.cs
new file mode 100644
index 00000000..1da80fb1
--- /dev/null
+++ b/MtApiSetupActions/CustomAction.cs
@@ -0,0 +1,59 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using System.Windows.Forms;
+using Microsoft.Deployment.WindowsInstaller;
+
+namespace MtApiSetupActions
+{
+ public class CustomActions
+ {
+ private const string MtApiFile = "MtApi.ex4";
+ private const string TerminalFolder = @"\MetaQuotes\Terminal";
+ private const string Mql4Folder = "MQL4";
+ private const string InstalledExpertFolderProperty = "ExpertFolder";
+ private const string DestinationExpertFolder = @"\Experts\";
+
+ [CustomAction]
+ public static ActionResult InstallEx4File(Session session)
+ {
+ session.Log("Begin action InstallEx4File...");
+
+ var appDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
+
+ var metaquotesFolder = appDataFolder + TerminalFolder;
+
+ if (Directory.Exists(metaquotesFolder))
+ {
+ var foldersFound = Directory.GetDirectories(metaquotesFolder, Mql4Folder, SearchOption.AllDirectories);
+ Console.WriteLine(string.Join("\n", foldersFound));
+
+ foreach (var folder in foldersFound)
+ {
+ var srcFile = session[InstalledExpertFolderProperty] + MtApiFile;
+ var destFile = folder + DestinationExpertFolder + MtApiFile;
+
+ session.Log(string.Format("Try to copy from {0} to {1}", srcFile, destFile));
+
+ try
+ {
+ File.Copy(srcFile, destFile, true);
+ }
+ catch (Exception e)
+ {
+ session.Log(string.Format("Failed to copy MtApi4.ex4. {0}", e.Message));
+ }
+
+ session.Log(string.Format("MtApi.ex4 has been coppied to {0}", destFile));
+ }
+ }
+ else
+ {
+ session.Log("MetaTrader is not installed");
+ }
+
+ return ActionResult.Success;
+ }
+ }
+}
diff --git a/MtApiSetupActions/MtApiSetupActions.csproj b/MtApiSetupActions/MtApiSetupActions.csproj
new file mode 100644
index 00000000..7f4f472a
--- /dev/null
+++ b/MtApiSetupActions/MtApiSetupActions.csproj
@@ -0,0 +1,52 @@
+
+
+
+ Debug
+ x86
+ 8.0.30703
+ 2.0
+ {10800F37-F71B-4818-8351-8CF744295F80}
+ Library
+ Properties
+ MtApiSetupActions
+ MtApiSetupActions
+ v4.5
+ 512
+ $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.CA.targets
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+ True
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MtApiSetupActions/Properties/AssemblyInfo.cs b/MtApiSetupActions/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..0de156f6
--- /dev/null
+++ b/MtApiSetupActions/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("MtApiSetupActions")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MtApiSetupActions")]
+[assembly: AssemblyCopyright("Copyright © 2016")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("c0ee9849-c0cd-4f67-8423-fe334565b863")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]