Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restart Windows App using .NET

Is there a way to restart a windows application written in .NET using .NET code

I mean the application should exit and restart itself, on click of a button.

like image 586
Ramji Avatar asked Jan 15 '10 20:01

Ramji


2 Answers

Application.Restart() is your method :)

Here is another StackOverflow answer that points out a couple of "watch-out-for's" with using this method.

like image 143
STW Avatar answered Sep 28 '22 21:09

STW


http://msdn.microsoft.com/en-us/library/system.windows.forms.application.restart.aspx

like image 22
Eric Mickelsen Avatar answered Sep 28 '22 21:09

Eric Mickelsen