Running external application using .Net

We can call external applications using .Net programs.

// Main.cs created with MonoDevelop
// User: bharani at 13:59 11/23/2008
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
using System;
using System.Diagnostics;

namespace two
class MainClass
public static void Main(string[] args)
Process p=Process.Start(“notepad”);//Use the programs file name
//or windows command used to run the program
//Another way of running a program with external arguments
ProcessStartInfo p1=null;
p1.Arguments=”c:/red.mp3″;//File name used as argument
p1.FileName=”D:/winamp/winamp.exe”;//Actuall file to run
Process p2=Process.Start(p1);//winamp is run with red.mp3 as argument
//ie winamp will play red.mp3

Hope u understand



Back to top