How to run .EXE on button click in C#

using System.Diagnostics;

This namespace provides access to local and remote processes and enables you to start and stop local system processes.

protected void Button1_Click(object sender, EventArgs e)
    {
       // string str = @"C:\windows\system32\notepad.exe";

       // string str  = @"C:\windows\system32\winamp.exe";


        string str  = @"C:\Documents and Settings\RAJ\Desktop\MCNewsLetter\SendNewsletter.exe";
        Process process = new Process();
        process.StartInfo.FileName = str;
        process.Start();
    }

Ebook Download
View all
Learn
View all