954,546 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

open exe file using c#

how can i open/close an exe file using c#? thank you.

jigoro
Light Poster
41 posts since Jul 2006
Reputation Points: 10
Solved Threads: 0
 

what do you mean by Open? Do you want to execute the program:

Process.Start(@"C:\windows\notepad.exe");

Mahen
Junior Poster
144 posts since Aug 2004
Reputation Points: 10
Solved Threads: 2
 

And that's found within:
using System.Diagnostics;

mariocatch
Junior Poster
103 posts since Apr 2007
Reputation Points: 11
Solved Threads: 17
 

using System.Diagnostics


// string str = @"C:\windows\system32\notepad.exe";
// string str = @"C:\windows\system32\winamp.exe";
string str = @"C:\Documents and Settings\Puru\Desktop\NewsLetter\SendNewsletter.exe";
Process process = new Process();
process.StartInfo.FileName = str;
process.Start();

RaviRaturi
Newbie Poster
1 post since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You