No, you can tell notepad to close itself when it is done. Here is some code.
ProcessStartInfo psi = new ProcessStartInfo("notepad.exe");
psi.WindowStyle = ProcessWindowStyle.Hidden;
Process p = new Process();
p.EnableRaisingEvents = true;
p.Exited += new EventHandler(MyExited);
p.StartInfo = psi;
p.Start();
..... do stuff ...
p.Kill(); // Try killing the process
private void MyExited(object sender, EventArgs e)
{
MessageBox.Show("Exited process");
}
This will run notepad "hidden" (for illustration purposes).. Then p.Kill();
should kill it.
--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"George Ter-Saakov" <nospam@hotmail.com> wrote in message
news:etw$9PL7DHA.1596@TK2MSFTNGP10.phx.gbl...[color=blue]
> What for?
> ASP.NET executes on server side.
> Your admin will curse you every time he will have to close that notepad
>
> George.
>
>
> "Selen" <skiyanc@yahoo.com> wrote in message
> news:OXPlPgK7DHA.1632@TK2MSFTNGP12.phx.gbl...[color=green]
> > How can I run the program i.e.notepad.exe from asp.net c#?
> >
> > Thanks..
> >
> >[/color]
>
>[/color]