Completely silent update

I have a publicly visible, but unattended installation, running my WinForms app, which I would like to silently update.

I have read about silently checking for updates (http://wyday.com/wybuild/help/silent-checking.php), but i want to silently update as well; i.e. no confirm/OK buttons to be clicked on.

Is this possible with wyUpdate.exe? I have experimented with wyUpdate.exe's commend line switches, but have yet to try the AutomaticUpdater control. I'd rather use the wyUpdate.exe, because i currently don't want to add a control to my main app form.

Hey Rusty,

This isn't possible yet (as of wyBuild 2.6.x) for several reasons. The largest being UAC and admin permission. That is, you can't automatically elevate a user process to an admin process.

That being said, we're working on a version of wyUpdate that runs completely as a windows service. So it won't have any UAC or admin prompts (unless you configure it to). We're planning this to be included with wyBuild 2.8.

For now, if you want a completely automated process you should use the AutomaticUpdater control. You can automate the whole process (providing no permission is needed - if it is, then the only user input needed is clicking OK on the UAC box).

Does this help?

I do want a completely automated process, so i'll look at the AutomaticUpdater control tomorrow. Any sample code you can throw my way; for a prompt-less update experience!?

Presumably, to not throw up UAC prompts, the app would have to be started with admin rights?

Thanks for your help; very prompt (pun). I'm going to try hard to find a way of using your software, 'cause i like it!

Any sample code you can throw my way; for a prompt-less update experience!?

If you want no user prompts then, yes, you will need to start your app as an admin process. Other than that, just follow the AutomaticUpdater instructions for Windows Forms or WPF.

Sam, thanks for you help on all my posts so far.

I've looked at the AutomaticUpdater control, and it looks good. Before I burn time coding some test scenarios, your expertise may allow you to answer some more questions?!

As stated in my first post, my app runs unattended; 24-7, for long periods, days or even weeks. No 'user' is present at the PC (and no keyboard or mouse). I still want a daily check for updates. Examining the AU control's source I can see in ownerForm_Load() the control's own scheduled update only occurs once; when the main form loads at start-up.

Because of this, I intend to give my long-running app a timer to call ForceCheckForUpdate(true) once per day.

Having called ForceCheckForUpdate, do I need to handle an AU event to instigate the restarting of my app, to allow the update to execute? Or, will ForceCheckForUpdate deal with restarting?

Please bare in mind I would like an update that is not going to throw up anything on screen, certainly nothing the user would need to click on or interact with.

Having called ForceCheckForUpdate, do I need to handle an AU event to instigate the restarting of my app, to allow the update to execute? Or, will ForceCheckForUpdate deal with restarting?

No, ForceCheckForUpdate doesn't restart your app. But you can add an event handler for "ReadyToBeInstalled". Simply call automaticUpdater.Install() in the "ReadyToBeInstalled" handler and your app will close and wyUpdate will finish the installation.

Please bare in mind I would like an update that is not going to throw up anything on screen, certainly nothing the user would need to click on or interact with.

If you run your app as an admin app and you use the AutomaticUpdater, you'll never have any prompts from wyUpdate.