Don't work.
That's not nearly enough information. Did you handle the other events for the AutomaticUpdater (see: http://wyday.com/wybuild/help/automatic-updates/members.php)? Did you get an error? If so, what error?
Hi!
I want to check if there are updates available without download or install it. My code:
static void auBackend_UpdateAvailable(object sender, EventArgs e) { // do things }
static void CheckUpdate() { if ((DateTime.Now - auBackend.LastCheckDate).TotalMinutes > 10 && auBackend.UpdateStepOn == UpdateStepOn.Nothing) { auBackend.ForceCheckForUpdate(); } }
----- Main function -------
auBackend = new AutomaticUpdaterBackend { GUID = <guid>, UpdateType = UpdateType.OnlyCheck, ServiceName = this.ServiceName, wyUpdateLocation = <location> };
auBackend.Available += auBackend_UpdateAvailable;
auBackend.Initialize(); auBackend.AppLoaded();
CheckUpdate();
Don't work. How could I do that?
Don't work.
That's not nearly enough information. Did you handle the other events for the AutomaticUpdater (see: http://wyday.com/wybuild/help/automatic-updates/members.php)? Did you get an error? If so, what error?
Don't work.That's not nearly enough information. Did you handle the other events for the AutomaticUpdater (see: http://wyday.com/wybuild/help/automatic-updates/members.php)? Did you get an error? If so, what error?
Ok, sorry. I want to know which is the best way for check if there are updates available. My goal is put a button in my app (enabled when updates are available) to open wyupdate.exe. In theory auBackend.ForceCheckForUpdate() should launch updateAvailable event when updates are available, is correctly?
Thanks in advance
Handle all the other events. My guess is UpToDate is being called, but because you're not handling it you're not getting any feedback.
So, handle all the other events.
Handle all the other events. My guess is UpToDate is being called, but because you're not handling it you're not getting any feedback.
So, handle all the other events.
Ok, I handled all the other events. Now, although there are no updates available, UpdateAvailable event is always launched. I set UpdateType = OnlyCheck. WyUpdateLocation path is correct.
You probably have an incorrect cache because you checked for updates with the AutomaticUpdater, then updated with "standalone" wyUpdate, then switched back to the AutomaticUpdater. You shouldn't do that.
The way to fix this is to "forceRecheck" using that Boolean parameter of the ForceCheckForUpdates() function.