Hi,
I want to restart an another application when it got closed in c#.net
Restarting an application once its closed
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
AlanRank #669 · 3.6K reputationPosted Jan 11, 2008, 4:30 AM EST
You can use the System.Diagnostics.Process class to start (or restart) any application from C#:
http://msdn2.microsoft.com/en-us/library/system.diagnostics.process.aspx
For example, to restart an application called myapp.exe, which takes no command line arguments and runs in a normal window, use the line:
Process.Start("myapp.exe");