title: How to run multiple SSIS packages programmatically by C#?
body: <p>guy, I used this code snippet, I execute multiple SSIS packages, when the first one finished, it takes a so long time to execute the another one, but I run the script command line on the CMD, it execute quickly. So I think it's the problem of code, do you know why? This is my code below:</p>
  
  <pre><code>SSISHelper.ExecuteSSISPackage("/F \"C:\\Users\\v-nashi\\Documents\\visual studio 2010\\projects\\ImportExcel\\ImportExcel\\LYO_DailyLogin.dtsx\"");
  SSISHelper.ExecuteSSISPackage("/F \"C:\\Users\\v-nashi\\Documents\\visual studio 2010\\projects\\ImportExcel\\ImportExcel\\LYO_COSMOS_Activities.dtsx\"");
  
  
      /// &lt;summary&gt;
      /// Excuete SQL Server Integration Services packages with parameter.
      /// &lt;/summary&gt;
      /// &lt;param name="para"&gt;parameter&lt;/param&gt;
      /// &lt;returns&gt;bool&lt;/returns&gt;
      public static bool ExecutePackage(string parameter)
      {
          if (File.Exists(DTExec_Path) == false)
              throw new Exception("The file DTExec.exe is not found, or the file is not exist.");
  
          Process process = new Process();
          process.StartInfo.FileName = DTExec_Path;
          process.StartInfo.Arguments = parameter;
          // True if the shell should be used when starting the process; false if the process should be created directly
          // from the executable file.
          process.StartInfo.UseShellExecute = true;
          process.StartInfo.RedirectStandardOutput = true;
          process.StartInfo.RedirectStandardError = true;
  
          Console.WriteLine("{0} {1}", DTExec_Path, parameter);
  
          process.Start();
          process.WaitForExit();
  
          string[] results = process.StandardOutput.ReadToEnd().Split('\n');
          foreach (string item in results)
          {
              if (item.Contains("DTExec: The package execution returned DTSER_SUCCESS (0)."))
                  return true;
          }
  
          return false;
      }
  </code></pre>
  
  <p>I just want to run the SSIS package programmatically, or the better way?</p>