SimHorizon
Posts: 44
Joined: Sun Jan 31, 2021 7:11 am
Contact:  Website

How to notify updates are available in my app?

Fri Feb 12, 2021 12:14 am

I'd like to notify my users of my app that an update is available via a DispatcherTimer (checks every 60 seconds). If an update is found then I will animate an image to show the user there is a pending update (note that the new application file is NOT downloaded at this time). This is just a simple notification for the user that they are NOT required to act on.

My application is .NET managed.

Since "/silent" doesn't provide any return information as it runs as a separate process, does it write to a file or registry entry to show that an new version of my application is available? If so, that would allow me to interrogate the file or registry entry via my app and then I can do UI update animation notification for my users.

Possible? Thoughts?

Cheers, Rob.

SimHorizon
Posts: 44
Joined: Sun Jan 31, 2021 7:11 am
Contact:  Website

Re: How to notify updates are available in my app?

Sat Feb 13, 2021 11:43 pm

UPDATE:

I was able to figure out a solution using /justcheck and wait for process to exit and capture the return code using:

https://www.advancedinstaller.com/user- ... section340 for return codes

0 - Found updates for the application or the updates match /justcheck filters like -installready or -critical.
hex: 0xE0000011 / decimal: -536870895 - No updates are available for the application or there are no updates matching /justcheck filters

Important note for others using .NET apps, be sure to use a System.Timers.Timer to ensure separate thread for /justcheck and then a DispatcherTimer to update the UI with notification ... ensures no UI blocking.

Cheers Rob.

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: How to notify updates are available in my app?

Mon Feb 15, 2021 2:00 pm

Hell Rob,

Thank you for your followup on this and for sharing your solution with us!

I am sure this will be of help for further users facing a similar scenario.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”