Yes, just don't call the "InstallNow()" method. Let the AutomaticUpdater handle it on the next start of your application.
I would call the InstallNow() method in application closing, so at next start it'll be already updated, but the InstallNow restart always the application; is there a way to that it doesn't happen (setting some properties, other methods to call, ...), only on request, not always?
Thanks.Cristiano
Yes, just don't call the "InstallNow()" method. Let the AutomaticUpdater handle it on the next start of your application.
If I left to AutomaticUpdate to handle the update, at next restart the application has to load, so the AutomaticUpdate shutdown it and than restart it. The time to load the application is much more heavy then the shutdown, so I prefer to apply the path at closing than at starting. One more think, I have only modifies to the files of the application (no registry, no COM, no link on desktop, no link at all,..., only overwrite dll).
Thanks.Cristiano
Hi,
I'm also interested in not restarting the application (and still call InstallNow()) (I use the automatic updater control); so if someone has found a solution ... please share it !
I'm not sure what you're talking about. Windows requires an application to be shut down before itself can be replaced (unlike unix where you can replace running executables).
So a restart is required. Whether you do it on the shutdown of your app or on the next start of your app is up to you.
Does that make sense?
Actually:- as the application start, my software check the updates (or the user by a click on the menuItem) and display the result in the automaticUpdaterControl- when the user Click on the control, he can select "download and install the updates". If he does, it download the update and install the update (because I put "InstallNow()" in the OnReadyToBeInstalled event).- actually, it restart my software after the update (something I don't need !)
So you want to install the update without restarting your app?
Got anywhere with this I also need the automatic updater to not start the app again after "updating" since what I'm doing is downloading a WiX installer file and running it, I have it to run after the update finishes but since it opens up the app again my installer asks me to close it because it is running, is there any way to not run it after "update"?
Only by using wyUpdate in standalone mode.
Could you please elaborate on your answer, you're saying that by using the standalone wyupdate, is that avoiding using the AutomaticUpdater library and just calling directly the wyupdate.exe? So instead of for instance using InstallNow() I should be closing the app and calling in a command line the wyupdate.exe? If you could elaborate a little that would go a long way.
Thanks
you're saying that by using the standalone wyupdate, is that avoiding using the AutomaticUpdater library and just calling directly the wyupdate.exe?
Yes.
So instead of for instance using InstallNow() I should be closing the app and calling in a command line the wyupdate.exe?
Yes.
If you could elaborate a little that would go a long way.
Here's a good place to start: How to Silently Check for Updates