Question : Restarting a WPF application to apply updates

Hi All,

I have used Updater block v2.0 to perform updates on my WPF application following the link mentioned below.
http://www.codeproject.com/KB/cs/vanillaupdaterblock.aspx

I have succesfully implemented the solution but now I need to add a new feature i.e when updates have been downloaded, user will be prompted a messagebox to restart the application to apply updates. If user selects Restart Now then application is closed and restarted again with the updates.

I tried to use Application.Current.ShutDown() followed by Process.Start(..app path..) but the issue is application starts before the updates are applied.

In short, this is what I want:
1. Shutdown the application
2. Apply the updates - (done by process "Wait For Exit" in Application Updater Block)
3. Restart the application

Thx!
Swaps...

Answer : Restarting a WPF application to apply updates

What I would do is write another app which starts up your "main app"

so then - when user clicks reset app the app must create a new process which basically looks for the app in the processes list. As soon as the app sees the process is no there then it can start it up again.
Random Solutions  
 
programming4us programming4us