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

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


And that's found within:

using System.Diagnostics;
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;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.