Luke
Luke

Reputation: 18953

Is there a way to force ClickOnce updates even while my app is not running?

I would like to periodically check for updates for my ClickOnce application even if it is not currently running. I found a post about using ClickOnce to deploy a background service, which would allow me to run a service that checks for updates, but the setup is kind of tricky so I'm wondering if there is an easier or more straightforward method. Maybe just add something to the startup folder in my ClickOnce deployed app rather than using a service?

Edit:

The reason I'm thinking about this approach is that I basically want to create a ClickOnce wrapper for a set of very simple commonly used apps. What this means is that each app's executable file will not be ClickOnce integrated (since I do not control the source code), so I can't rely on the standard methods of triggering an update.

The real answer might be to use some sort of app virtualization software like Xen or Citrix provides, but I'm ok with something free and kinda buggy. Unfortunately Xen/Citrix are targeted at large IT enterprises rather than individual users that are sick of reinstalling the same sets of apps on a bazillion machines.

Upvotes: 1

Views: 1386

Answers (3)

Ian Ringrose
Ian Ringrose

Reputation: 51897

I would write a very simple .net exe or batch file that starts each "simple commonly used app". Then make the start menu and file extensions etc point to your app starter.

Your app started could then check for update.

I see no point using “click once” at all, as it is easy to download the updates over HTTP yourself anyway. I have found in the past, that pushing “click once” past the simple cases it works well for just leads to lots of unnecessary pain.

Upvotes: 1

James Jones
James Jones

Reputation: 8763

As far as I know, ClickOnce does not support your need of updating clients while the application is dormant. If you work at a company as a Domain Administrator, you can instead package the app as an .msi and "push" out updates to your target machines via group policy. Here's a link on how to accomplish this.

Upvotes: 2

Henk Holterman
Henk Holterman

Reputation: 273169

You can configure it so that the App checks for updates when it is started. Apart from the slight delay this should be functionally equivalent.

Upvotes: 1

Related Questions