Results 1 to 2 of 2

Thread: Executing other apps from within one...

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    London UK
    Posts
    255

    Executing other apps from within one...

    I need my app to execute another app via the command line. How can I do this?
    Not at all related to sheep...

  2. #2
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403
    PHP Code:
    using System.Diagnostics;

    // ....

    Process p = new Process();
    p.StartInfo = new ProcessStartInfo("C:\\\\myapp.exe","-myarguments");
    //go!
    p.Start();
    // if i want to retrieve an exit code..
    p.WaitForExit();
    MessageBox.Show("Applcation returned Exit Code: " p.ExitCode.ToString()); 
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width