Blog

How to run .EXE on button click in C#

Posted by Raj Kumar Blogs | C# Language Nov 04, 2008
This code will show you how to run a executable file(.exe) on a button click.

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();
    }

post comment
     

thank you bro

Posted by mohit bajaj Dec 26, 2012

This Tutorial was very helpful for me, you can try it TO. <a href="http://www.letsbedeveloper.blogspot.in">LetsBeDeveloper</a>

Posted by Letsbe Developer Oct 04, 2012

This Tutorial was very helpful for me, you can try it TO. <a href="http://www.letsbedeveloper.blogspot.in">LetsBeDeveloper</a>

Posted by Letsbe Developer Oct 04, 2012

System.Diagnostics.Process.Start(@"C:\skn.txt");

Posted by surender bhyan Mar 13, 2011

@nikhil @dharmendra Search in google u ll get it other tah wat work u hav..

Posted by jhn Mar 10, 2011
COMMENT USING
PREMIUM SPONSORS
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.