skizdigidy
Posts: 10
Joined: Fri Mar 12, 2010 6:58 pm

Waiting for Updater to Download and Install

Hi,

I was wondering if someone had a code example in either VB.net or C# to wait for the updater to check, download, and install an update? The one that is posted on here is in C++ and I have no idea how to convert it. Also I have no idea what a mutexpath is. When my application runs, it checks for updates at startup each time it is launched using the /silentall -nofreqcheck command. However, I want to alert the user when/if an update is available and make them wait for it to be downloaded and installed. I have the AutoClose and AutoRestart set up in my update configuration project so that works fine, but I have no way of letting the user know to wait until the update is completed. If someone could help me out with the wait procedure, that would be fantastic.

Thanks in Advance,

Scott
dms
Posts: 164
Joined: Tue Aug 28, 2007 7:11 am
Location: UK

Re: Waiting for Updater to Download and Install

Scott

I must be honest and say that it's been a while since I've had my programs do automatic checks on startup, as I found it conflicting with other things I was doing and so I opted for a windows scheduled task instead. After solicting feedback from Customers I found that most prefered to be informed that updates were available (via the standard AI dialog) and then choose to install them there and then or later.

I'm assuming that you have now done a couple of practice runs with the updater, should you should also be aware that you can add custom text to the dialog that pops up telling your end user what's in the update.

In my case If I want thenm to install it straight away I effectively tell them too there. True they can opt not to, but generally they do. It's a personal thing I know, but I've found this to be the easiest way to get updates to run smoothly with less hassle for me in the form of support issues.

Dom
skizdigidy
Posts: 10
Joined: Fri Mar 12, 2010 6:58 pm

Re: Waiting for Updater to Download and Install

Thanks for the reply. This is the thing, this is an in-house application and I really do not want to give the user the option of not installing the update. I need it to be a mandatory update with pretty much no user interaction, but I would like to tell the user what I'm doing. Does that make sense?
dms
Posts: 164
Joined: Tue Aug 28, 2007 7:11 am
Location: UK

Re: Waiting for Updater to Download and Install

Hi Scott

Yes that makes perfect sense. In that case why not have it as a windows scheduled task at startup. Your end users don't have the chance to fire up the application in the first thus removing the need to tell them.

Alternatively you need to pick up the reply the updater exe gets when it looks for an update and react to that. Refering to your earlier part about converting code there are some excellent code conversion utilities on the web, this is just one;
http://converter.telerik.com/

HTH
Dom
skizdigidy
Posts: 10
Joined: Fri Mar 12, 2010 6:58 pm

Re: Waiting for Updater to Download and Install

Do you know how to pick up the reply from the updater? I know that status 0 means that an update is available, but how do I "grab" that status return code from the exe?

Regarding the code converter, I need to convert C++ to C# or C++ to VB. That code converter that you gave me a link to is only for conversions between VB and C#. I've searched but have not found a sufficient code converter for C++.

Thanks,
Scott
dms
Posts: 164
Joined: Tue Aug 28, 2007 7:11 am
Location: UK

Re: Waiting for Updater to Download and Install

Scott

I think you'll find what you need here:
http://www.tangiblesoftwaresolutions.com/

Dom

Return to “Common Problems”