tags:

views:

80

answers:

2

I was trying to use ClickOnce installation 2 years ago and was having problem with:

  • application was not able to start due to errors
  • limited access to the file system

Then later on I have seen that google Chrome was using ClickOnce to get installation package locally and then start real installation

Is it possible to have with ClickOnce ability to download files from server and save locally?

+2  A: 

We have used ClickOnce in the past, but abandoned it. Having to have a certificate was a pain, and when we replaced the server it was hosted on, it broke things, and we had to uninstall from all our clients and reinstall as a new app with a new certificate. BUT on to your question...

ClickOnce can be deployed the standard way (web server) to a Network Share, or CD. However, if you want to avoid your issues, don't use ClickOnce. Downloading the files to the desktop and doing the install sort of defeats the purpose.

Create an MSI using a normal Setup project, and post it to the web. Users can download it and run the setup just fine. (They may have to Unblock it, if Windows blocks it because it comes from an untrusted source, however.)

David Stratton
+3  A: 

My company has been using ClickOnce for over three years, and we have thousands of customers installing multiple products (both desktop and Office add-ins), with very little trouble. We do have a signed certificate, because all of our customers are external, and it assures them that the installation is coming from a trusted source.

Also, the problem with changing the signing certificate was fixed in .NET 3.5 if using automatic updates and a desktop application (not for VSTO), and is fixed in all cases in .NET 4. And there are workarounds for the cases where it is still a problem.

The huge advantage of ClickOnce is the ability to publish updates and have the users pick them up automatically, and the fact that the updates are incremental. THis is especially important if your application accesses a database, and you need to make sure the user updates the application when you deploy changes to your database.

If you have a ClickOnce app and are having errors at startup, you need to try running the [exe] from the ClickOnce cache and determine if the problem is in your application or with the deployment.

I'm not sure what you mean by having ClickOnce download from the server and saving files locally. If you mean the deployment itself, it does that. If you mean can it download files from somewhere else and save them locally, sure it can. Our application uses the WebClient to both upload and download files.

Note that ClickOnce app do not install for all users, and you can not write to Program Files. If you are using additional files, you need to stuff them in LocalApplicationData. Our application creates a cache under the LAD folder and retains information there, and that works fine for us.

RobinDotNet
+1. Thank you for the update, particularly the fixes to our woes. I loved ClickOnce originally, and now I might give it another shot.
David Stratton
You're welcome. You might also check out my blog at http://robindotnet.wordpress.com -- I am trying to answer questions that I see asked a lot in the MSDN ClickOnce Forum, and provide helpful info that is not commonly known, like how to pass parameters to an offline clickonce app, how to keep your data safe from ClickOnce updates, etc. Hope it's helpful!
RobinDotNet