Hi, I'm pretty sure I'm 95% there, but my Windows Service isn't automatically updating. First off, I need to upload my update files via FTPS. So I do that manually. Here's what I'm doing...
(1) I implemented the code changes to my service:
auBackend = New AutomaticUpdaterBackend() With { .GUID = "My Local Services", .UpdateType = UpdateType.Automatic, .ServiceName = Me.ServiceName } AddHandler auBackend.ReadyToBeInstalled, AddressOf auBackend_ReadyToBeInstalled auBackend.Initialize() auBackend.AppLoaded()
If Not auBackend.ClosingForInstall Then CheckNewVersion(180) End If
...later...
' -- I made it every 3 hours while I'm debugging... Private Shared Sub CheckNewVersion(ByVal Minutes As Integer) If (DateTime.Now - auBackend.LastCheckDate).TotalMinutes > Minutes AndAlso auBackend.UpdateStepOn = UpdateStepOn.[Nothing] Then auBackend.ForceCheckForUpdate() End If End Sub
Private Shared Sub auBackend_ReadyToBeInstalled(sender As Object, e As EventArgs) If auBackend.UpdateStepOn = UpdateStepOn.UpdateReadyToInstall Then auBackend.InstallNow() End If End Sub
(2) Created a project in WyBuild:
Update Information - set version to 2.1.1.76 (original was 2.1.1.75) Download site = http://service.mysuperapp.com/software/services/%file% Build wyUpdate & Updates = I click both buttons...should I? 🙂 Then I manually upload the files created: a) mysuperservice.all.to.2.1.1.75.wyu b) mysuperservice.all.to.2.1.1.76.wyu c) wyserver.wys To the FTPS server place that corresponds to the Download site below.
I've put some debug logging into the service and it runs CheckNewVersion(..), but it never gets into Backend_ReadyToBeInstalled(..) which to me seems like it's not detecting the newly published version.
Any suggestions? Thanks so much (in advance)!