yamid

yamid

  • NA
  • 98
  • 0

A solution to run other applications through c#

Nov 4 2008 6:14 AM

If you want to run an application that needs a data file to start you can use the following code:

 

using System;
using System.Diagnostics;

class MyProcessManipulator {
    static void Main(string[] args) {
        Process ieProc = Process.Start(@"exe or Bat file Path ", @"path for file to be read by exe/bat file");

        Console.Write("--> Hit a key to kill {0}...", ieProc.ProcessName);
        try {
            ieProc.Kill();
        catch { } // In case user already killed it...

    }
}


Answers (1)