Close current application & start another one  
Author Message
Redsome





PostPosted: .NET Base Class Library, Close current application & start another one Top

I would like to close my running application and programmatically start an updater which will update the above application. When the update process completes, the updater should close and the application should run again. What should I do



.NET Development16  
 
 
ahmedilyas





PostPosted: .NET Base Class Library, Close current application & start another one Top

you could try this:

To exit the application:

Application.Exit();

to kick start another process:

System.Diagnostics.Process.Run("path\filename.ext");

this would apply for both apps, your current app and the updater. Does this help



 
 
Mark Rendle





PostPosted: .NET Base Class Library, Close current application & start another one Top

Have you looked at using ClickOnce to deploy your application It automatically does what you describe.

http://msdn2.microsoft.com/en-us/library/142dbbz4.aspx