Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4113154
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:17:15+00:00 2026-05-20T22:17:15+00:00

If anyone has any feedback on why my WyUpdate application doesn’t want to work

  • 0

If anyone has any feedback on why my WyUpdate application doesn’t want to work please let me know.

I’m trying to create a basic console application which launches the WyUpdate process, and then on completion executes my main application (which has just been updated).

Following the instructions on http://wyday.com/wybuild/help/silent-update-windows-service.php gives me no luck at all. The application runs, and executes the “ForceCheckForUpdate” process, but I don’t receive any feedback 🙁

here is a complete listing of my code.

I’ve added a while loop to hopefully catch the response from the auBackend, but that doesn’t seem to work. is there an easy way to run the process synchronously and wait for the response before closing the application?

Thanks in advance.

using System;
using System.Threading;
using wyDay.Controls;

namespace NPS.CeAUpdateLauncher { class Program { private static AutomaticUpdaterBackend auBackend; private static bool receivedFeedback;

static void Main(string[] args) { auBackend = new AutomaticUpdaterBackend { //TODO: set a unique string. // For instance, "appname-companyname" GUID = "CeALauncher_AutoUpdate", // 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, }; auBackend.CheckingFailed += auBackend_CheckingFailed; auBackend.UpdateAvailable += auBackend_UpdateAvailable; auBackend.DownloadingFailed += auBackend_DownloadingFailed; auBackend.ExtractingFailed += auBackend_ExtractingFailed; auBackend.ReadyToBeInstalled += auBackend_ReadyToBeInstalled; auBackend.UpdateSuccessful += auBackend_UpdateSuccessful; auBackend.UpdateFailed += auBackend_Failed; // Initialize() and AppLoaded() must be called after events have been set. // Note: If there's a pending update to be installed, wyUpdate will be // started, then it will talk back and say "ready to install, // you can close now" at which point your app will be closed. auBackend.Initialize(); auBackend.AppLoaded(); if (!auBackend.ClosingForInstall) { //TODO: do your normal service work CheckForUpdates(); } // while(!receivedFeedback) Thread.Sleep(10000); } static void CheckForUpdates() { // Only ForceCheckForUpdate() every N days! // You don't want to recheck for updates on every app start. if (//(DateTime.Now - auBackend.LastCheckDate).TotalDays > 10 && auBackend.UpdateStepOn == UpdateStepOn.Nothing) { auBackend.ForceCheckForUpdate(); } } static void auBackend_CheckingFailed(object sender, FailArgs e) { receivedFeedback = true; } static void auBackend_UpdateAvailable(object sender, EventArgs e) { receivedFeedback = true; } static void auBackend_DownloadingFailed(object sender, FailArgs e) { receivedFeedback = true; } static void auBackend_ExtractingFailed(object sender, FailArgs e) { receivedFeedback = true; } static void auBackend_ReadyToBeInstalled(object sender, EventArgs e) { // ReadyToBeInstalled event is called when // either the UpdateStepOn == UpdateDownloaded or UpdateReadyToInstall if (auBackend.UpdateStepOn == UpdateStepOn.UpdateReadyToInstall) { //TODO: Delay the installation of the update until // it's appropriate for your app. //TODO: Do any "spin-down" operations. auBackend.InstallNow() will // exit this process using Environment.Exit(0), so run // cleanup functions now (close threads, close running programs, // release locked files, etc.) // here we'll just close immediately to install the new version auBackend.InstallNow(); } receivedFeedback = true; } static void auBackend_UpdateSuccessful(object sender, SuccessArgs e) { receivedFeedback = true; } static void auBackend_Failed(object sender, FailArgs e) { receivedFeedback = true; } }

}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:17:15+00:00Added an answer on May 20, 2026 at 10:17 pm

    With the code I attached in my initial post, the problem was that the console application would be running indefinitely. I thought that was because the wyUpdate process never returned a value. I found out it was because I didn’t raise all events.

    After implementing the eventhandler for “UpToDate” I received a response and was able to set the indicator to have the application exit successfully.

    I also replaced the boolean indicator and the ‘while’ method of waiting for a response to the ‘resetEvent’ as per the vendor’s instructions, and it is working very well.

    
    static readonly ManualResetEvent resetEvent = new ManualResetEvent(false);
    
    static void Main(string[] args)
            {
              ...
              auBackend.UpToDate += auBackend_UpToDate;
              ...
    
              // Blocks until "resetEvent.Set()" on another thread
              resetEvent.WaitOne();
    
            }
    
    static void auBackend_UpToDate(object sender, SuccessArgs e)
            {
                resetEvent.Set();
            }
        

    Thanks for the responses.

    If anyone ever needs a very versatile application updater solution, I would suggest the wyBuild/wyUpdate package.

    Njoy!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am wondering if anyone has any experience using a JQuery plugin that converts
I'm wondering if anyone has any experience using log4net in a multi-threaded environment like
Just wondering if anyone has any favourite SQL references they to use when creating
I am wondering if anyone has any insight into this. I am thinking of
I was wondering if anyone has any preference for referencing images/ css or javascript
Im wondering if anyone has any input on this subject? Im building a flash
I've just started using Linq to SQL, and I'm wondering if anyone has any
I read somewhere that snprintf is faster than ostringstream. Has anyone has any experiences
Does anyone here has any experience on how to send HTML emails that renders
I wonder if anyone here has any experience with mercurial running on Ubuntu? I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.