0

I'd like to setup a way to get installed applications to automatically update. The closest I can get to that is to have them poll my server for a "close" flag. If that is is set, the applications MainWindow.xaml.cs closes. This will force the user to open it again, which will pull in the updates (I have the ClickOnce setup to pull updates from a URL)

It would be nicer for the users if I could get the application to open automatically after it closes, is there a way to do that?

mike
  • 1,583
  • 1
  • 19
  • 35

1 Answers1

2

Is System.Windows.Forms.Application.Restart() what you want?

The most common reason for calling Restart is to start a new version of the application that you have downloaded through ClickOnce using the Update or UpdateAsync method.

Patrick Hofman
  • 153,850
  • 22
  • 249
  • 325
JFischer00
  • 91
  • 9