1
votes

I'm using VS 2008 deploying a VB.NET winforms app using click once.

Currently I have the app setup to check for updates upon start, but would like to be able to push an update when a new version is deployed. Has anyone done this?

1

1 Answers

1
votes

This isn't possible with ClickOnce. At its heart, ClickOnce is extremely simple. It keeps files on a client in sync with files on a server. But it relies on the client to initiate the check for updates. The server doesn't keep track of who installed the app - something it would have to do if it was going to push out updates.

You could write a service for the client that would poll for updates but then you face the challenge of getting the service installed and updated.

What's the problem with having the app update itself when it launches? What is the actual problem you are trying to solve?

Edit

It looks like you are simply concerned that users run the latest version. That shouldn't require a push.

First, you can force a minimum required version with ClickOnce. By making that the current version, the user won't be able to decline an update. As soon as the app starts they will be on the latest version.

The minimum version will work but you may still run into issues if users leave your app open all the time. To solve this, you could write code to check for updates on a timer and force the app to update. Here is a quick sample.

A push notification just isn't feasible but I think you have plenty of creative ways to accomplish what you want.