Hi Wyatt, here is my code snippet for initializing the wyUpdate exe.
static void Main() { Run(new UpdateService()); }
protected override void OnStart(string[] args) { System.Diagnostics.Debugger.Break(); TimerCallback timercallback = timer_Elapsed; timer = new Timer(timercallback, null, 0, timerInterval);
auBackend = new AutomaticUpdaterBackend { //TODO: set a unique string. // For instance, "appname-companyname" GUID = "85578d7b-0487-4597-9caf-bc51a814007b", // With UpdateType set to Automatic, you're still in // charge of checking for updates, but the // AutomaticUpdaterBackend continues with the // downloading and extracting automatically. UpdateType = UpdateType.Automatic, wyUpdateLocation = @"C:\Program Files\TestApp\wyUpdate.exe", wyUpdateCommandline = " /fromservice", // We set the service name that will be used by wyUpdate // to restart this service on update success or failure. ServiceName = "UpdateService" }; auBackend.ReadyToBeInstalled += auBackend_ReadyToBeInstalled; auBackend.UpdateSuccessful += auBackend_UpdateSuccessful; auBackend.UpToDate += auBackend_UpToDate; auBackend.UpdateFailed += auBackend_UpdateFailed; auBackend.BeforeChecking += auBackend_BeforeChecking; auBackend.BeforeDownloading += auBackend_BeforeDownloading; auBackend.BeforeExtracting += auBackend_BeforeExtracting; auBackend.Cancelled += auBackend_Cancelled; auBackend.CheckingFailed += auBackend_CheckingFailed; auBackend.ClosingAborted += auBackend_ClosingAborted; auBackend.DownloadingFailed += auBackend_DownloadingFailed; auBackend.ExtractingFailed += auBackend_ExtractingFailed; auBackend.UpdateAvailable += auBackend_UpdateAvailable; auBackend.UpdateStepMismatch += auBackend_UpdateStepMismatch;
//TODO: use the failed events for logging & error reporting: // CheckingFailed, DownloadingFailed, ExtractingFailed, UpdateFailed
// the functions to be called after all events have been set. auBackend.Initialize(); auBackend.AppLoaded(); }
WyUpdate.exe is version 2.6.18.4. AutomaticUpdater.dll is also version 2.6.18.4
Thanks.