Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Auto update optin in windows form project
 

Auto update optin in windows form project

Hi,
We are deploying a application using vb.net and windows form. This application will be deployed in various factories of customer. Each factory has its own local server. Curretnly we are using app.config file to specify connection string of sqlserver 2008 database.

We want to deploy this application such way that whenever new updates comes, the application need to update it automatically without user intervention.

We can use Click Once for auto update facility. But we need to change the app.config file to specify database name and also we need to read some files from the local computer also like importing from excel, reading data from a access file. Till date there is no registry reading and writting from our application.

Is there way to do it by click once?  Shall I run click once in full trust mode in local PC?

I read some of the sites. They are explaing that puting the enteir application exe and its required assemblys in server and call a html from server IIS to execute this exe. While executing this, the exe will auto downloaded  in the client location and replace the old one provided .NET framewrok need to be install at client PC.

I want to know the best possible solution to over come the difficulitis of auto update.


Muhilan
Muhilan  Tuesday, October 06, 2009 9:25 AM

Hi Muhilan,

ClickOnce deployment allows you to deploy a version of your application, and when you deploy a new version, the users will get the update automatically. For some general information on ClickOnce, check out these links:

ClickOnce Overview
http://msdn2.microsoft.com/en-us/library/142dbbz4(VS.80).aspx   

HowTo publish a clickonce app   
http://msdn2.microsoft.com/en-us/library/31kztyey(VS.80).aspx   

When a new version is installed, it creates all new folders and puts the files there.

I always deploy ClickOnce apps as full trust, but that's a decision you'll have to make. It does give you access to the user's file system under his profile, such as MyDocuments. ClickOnce installs in the user's profile, and to access anythihng from, say, Program Files, requires elevated privileges with Windows Vista and Windows Fabulous (7).

You can change the app.config file when you release each version and it will update it on the client side.

You can also store files in LocalApplicationData in Vista and Windows Fabulous, and in fact it is the recommended place if you want to create some kind of cache for your application.

For us, there are some files we want to put on the user's machine and still be located by our app when a ClickOnce update goes out. We create a folder in LocalApplicationData and cache a bunch of files and settings there. If there are files you are deploying that you want the user to be able to update and then not get lost by a ClickOnce update, you could do something similar, creating or updating the LocalApplicationData the first time the user runs the application, and then not when there is an update. This should give you the idea of what we're doing, and it's working great for us:

http://robindotnet.wordpress.com/2009/08/19/where-do-i-put-my-data-to-keep-it-safe-from-clickonce-updates/

RobinDotNet


Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev
RobinDotNet  Tuesday, October 06, 2009 9:09 PM

Hi Muhilan,

ClickOnce deployment allows you to deploy a version of your application, and when you deploy a new version, the users will get the update automatically. For some general information on ClickOnce, check out these links:

ClickOnce Overview
http://msdn2.microsoft.com/en-us/library/142dbbz4(VS.80).aspx   

HowTo publish a clickonce app   
http://msdn2.microsoft.com/en-us/library/31kztyey(VS.80).aspx   

When a new version is installed, it creates all new folders and puts the files there.

I always deploy ClickOnce apps as full trust, but that's a decision you'll have to make. It does give you access to the user's file system under his profile, such as MyDocuments. ClickOnce installs in the user's profile, and to access anythihng from, say, Program Files, requires elevated privileges with Windows Vista and Windows Fabulous (7).

You can change the app.config file when you release each version and it will update it on the client side.

You can also store files in LocalApplicationData in Vista and Windows Fabulous, and in fact it is the recommended place if you want to create some kind of cache for your application.

For us, there are some files we want to put on the user's machine and still be located by our app when a ClickOnce update goes out. We create a folder in LocalApplicationData and cache a bunch of files and settings there. If there are files you are deploying that you want the user to be able to update and then not get lost by a ClickOnce update, you could do something similar, creating or updating the LocalApplicationData the first time the user runs the application, and then not when there is an update. This should give you the idea of what we're doing, and it's working great for us:

http://robindotnet.wordpress.com/2009/08/19/where-do-i-put-my-data-to-keep-it-safe-from-clickonce-updates/

RobinDotNet


Click here to visit my ClickOnce blog!
Microsoft MVP, Client App Dev
RobinDotNet  Tuesday, October 06, 2009 9:09 PM

You can use google to search for other answers

Custom Search

More Threads

• Publisher info in ClickOnce manifest
• How to publish a project to CD'S using ClickOnce
• how to license managing VB.NET
• Excel 2003 VSTO setup project not replacing workbook on upgrade install
• Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
• Can't host ClickOnce app in IIS because it won't download the config files
• Bootstrapper leaves files in TEMP directory
• Help on signing/manifests
• Installation of USB Driver via Setup Package
• "Could not access network location <appname>" - Error when running a Setup.exe that has been working until now...