mathiaso
Posts: 23
Joined: Wed Feb 10, 2016 9:54 am

c# display update available in application

Tue Sep 20, 2016 8:29 am

We would like to display a message in our application that says "new version available, click here to upgrade", kind of like spotify does.
Is this possible with AI updater? I see that we can start the application "updater" from C#, but I cannot find how to check for update and get a return code that would indicate if update is available or not.

Any ideas on this? Thanks!

Eusebiu
Posts: 4893
Joined: Wed Nov 14, 2012 2:04 pm

Re: c# display update available in application

Tue Sep 20, 2016 12:50 pm

Hi,

In order to achieve this you can take a look on the example from the "How do I integrate the Advanced Updater with my C# application" article.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

mathiaso
Posts: 23
Joined: Wed Feb 10, 2016 9:54 am

Re: c# display update available in application

Wed Sep 21, 2016 8:45 am

I assume you mean this:

/**
* This handler should be associated with a menu item that launches the
* updater in check now mode (usually from Help submenu)
*/
private void HelpCheckForUpdates_Click(object sender, EventArgs e)
{
Process process = Process.Start(updaterModulePath, "/checknow");
process.Close();
}


But how can I tell that there is an update. I need to have a value returned when I check for an update in the background.
As I understand this function it will just start the updater.exe with the parameter checknow displaying it´s user interface?

Eusebiu
Posts: 4893
Joined: Wed Nov 14, 2012 2:04 pm

Re: c# display update available in application

Wed Sep 21, 2016 9:59 am

Hi,

Yes, using that function you can check for updates from your application. The value returned when the updates are found is "0". You can see all the Updater return values and command line switches in the "Auto Updater article.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”