That's the default behavior of the AutomaticUpdater. You don't have to do anything special. And you don't have to add an update menu/button to your app. Just follow the step-by-step walkthrough.
hello we cant understand the automatic updater.
you say in this link it is a automatic updater examplehttp://wyday.com/wybuild/help/automatic-updates/automatic-updater-for-your-.net-app.php
but in this link its a button and you must click it to update the program.but we dont have a update button.we want when our desktop program opens the updater program must works automaticly if its a new version. would you have an example about it ?please help
That's the default behavior of the AutomaticUpdater. You don't have to do anything special. And you don't have to add an update menu/button to your app. Just follow the step-by-step walkthrough.
ok i do it but my problem is different when i setup my app on a new computer updater is working in the first opening it checks the updates and it gets the last update when my dektop program opens firstly the updater working
but when i open my program the second time the updater doesnt work but when i click the my program update button it works but it doesnt work automaticly in the second time
my code
static AutomaticUpdaterBackend auBackend;
//static void CheckEveryOneDays() //{ // if ((DateTime.Now - auBackend.LastCheckDate).TotalDays > 1 // && auBackend.UpdateStepOn == UpdateStepOn.Nothing) // { // auBackend.ForceCheckForUpdate(); // } //}
static void auBackend_ReadyToBeInstalled(object sender, EventArgs e) { if (auBackend.UpdateStepOn == UpdateStepOn.UpdateReadyToInstall) { auBackend.InstallNow(); } }
static void auBackend_UpdateSuccessful(object sender, SuccessArgs e) { }
[STAThread] static void Main() { auBackend = new AutomaticUpdaterBackend{ GUID = "3711322D-DB82-4610-9E27-140CCBFDE06C", UpdateType = UpdateType.Automatic, };
auBackend.ReadyToBeInstalled += auBackend_ReadyToBeInstalled; auBackend.UpdateSuccessful += auBackend_UpdateSuccessful; auBackend.Initialize(); auBackend.AppLoaded();
if (!auBackend.ClosingForInstall) { //CheckEveryOneDays(); auBackend.ForceCheckForUpdate(); } }
when i click the my program update button it says there are new versions of your program? do you want to install it? when i click yes it installs succesfully.
but if i dont click the updater buton on my windows desktop. my app opens but the updater program doesnt works automaticly
please hellp
Handle all the events except CloseAppNow.
Log the responses from the events. What do you get? (My guess is you're getting an error, but because you're not handling the event you never find out about the error).
i do this things its working now thank you very much
Great, glad to help.