Windows Service AutomaticUpdate is not checking for updates

Hi.

Im testing a WyBuilder/WyUpdate tool but im having a problem with my windows service.

I did all the recommended settings but my windows service does not automatically update when I generate a new version on my FTP server.

When I run the WyBuilder.exe he finds the new version and update it. The problem is the automatic check. I think its not working.

which the frequency that automaticupdater checks for new versions?

Whatswrong with my source code below?

=====================SOURCE CODE===============================

static AutomaticUpdaterBackend auBackend;

protected override void OnStart(string[] args) { try {//WyBuilder configuration here ConfigureWyBuilder();

logFourNet.Info("Start Service. Version " + GetVersion()); StartProccess(); } catch (Exception ex) { logFourNet.Error(ex); } }

static void ConfigureWyBuilder() { auBackend = new AutomaticUpdaterBackend { GUID = "75471C11-8353-4EA1-93B7-D08E59E6FA62",

UpdateType = UpdateType.Automatic, ServiceName = "Service1" //The name of my service };

auBackend.ReadyToBeInstalled += auBackend_ReadyToBeInstalled; auBackend.UpdateSuccessful += auBackend_UpdateSuccessful; auBackend.CheckingFailed += auBackend_CheckingFailed; auBackend.DownloadingFailed += auBackend_DownloadingFailed; auBackend.ExtractingFailed += auBackend_ExtractingFailed; auBackend.UpdateFailed += auBackend_UpdateFailed;

auBackend.Initialize(); auBackend.AppLoaded();

if (!auBackend.ClosingForInstall) { CheckEvery10Days(); } }

static void auBackend_ReadyToBeInstalled(object sender, EventArgs e) { if (auBackend.UpdateStepOn == UpdateStepOn.UpdateReadyToInstall) { auBackend.InstallNow(); } }

static void auBackend_UpdateFailed(object sender, FailArgs e) { logFourNet.Error("Atualizao falhou. Motivo\r\nTitulo: " + e.ErrorTitle + "\r\nMensagem: " + e.ErrorMessage); }

static void auBackend_UpToDate(object sender, SuccessArgs e) { logFourNet.Info("Aplicativo ja foi atualizado anteriormente."); }

static void auBackend_UpdateSuccessful(object sender, SuccessArgs e) { logFourNet.Info("Aplicativo atualizado com sucesso."); }

static void auBackend_CheckingFailed(object sender, FailArgs e) { logFourNet.Error("Falha ao procurar por atualizao do aplicativo. Motivo\r\nTitulo: " + e.ErrorTitle + "\r\nMensagem: " + e.ErrorMessage); }

static void auBackend_DownloadingFailed(object sender, FailArgs e) { logFourNet.Error("Falha ao baixar o aplicativo para atualizao. Motivo\r\nTitulo: " + e.ErrorTitle + "\r\nMensagem: " + e.ErrorMessage); }

static void auBackend_ExtractingFailed(object sender, FailArgs e) { logFourNet.Error("Falha ao extrair o aplicativo para atualizao. Motivo\r\nTitulo: " + e.ErrorTitle + "\r\nMensagem: " + e.ErrorMessage); }

static void CheckEvery10Days() { if ((DateTime.Now - auBackend.LastCheckDate).TotalDays > 10 && auBackend.UpdateStepOn == UpdateStepOn.Nothing) { auBackend.ForceCheckForUpdate(); } }

which the frequency that automaticupdater checks for new versions?

In the code you posted? Every 10 days (just look at the function name and the code in the function).

So. i created a timer to call ForceCheckForUpdate() to check for update and my windows service was updated but on wybuilder configuration i created a custom action to stop and start the service but the stop method was not called. would not the automaticUpdate call the stop automatically?

I create a log on stop service method to check but when the service autoupdate it not called. If i click manually in wybuilder.exe. The stop and start service method was fired well. Are there any trick?

would not the automaticUpdate call the stop automatically?

No. The service will run forever. If you're talking about shutting down the service after an update has been applied then use the CloseAppNow event.

Are there any trick?

Any trick to what?