Reputation: 11
The problem is that I want to restart my application to upgrade the current application. For this I am using below mentioned two lines of code.
System.Windows.Forms.Application.Restart();
Process.GetCurrentProcess().Kill();
OR
System.Windows.Forms.Application.Restart();
Application.Current.Shutdown();
But this is giving an error message of "An unhandled win32 exception is occurred
". Hence this is not working.
Upvotes: 1
Views: 3806
Reputation: 91
Have you tried?
Application.Restart();
or
System.Diagnostics.Process.Start(Application.ExecutablePath);
Application.Exit();
Upvotes: 1