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

Recommended Answers

All 3 Replies

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

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

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;
process.Start();
Be a part of the DaniWeb community

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