I don't think so. I don't think the update URL is part of the application identity. The INSTALL URL is definitely part of it. So your users would have to continue to install from the same URL they were already using, but it would pick up updates from the new one. I read one article that said you could do something like the following to change your deployment location, but I haven't tried it. App is deployed to URL1.
Deploy the app to URL2. Deploy an update to URL1 with update URL (in the Updates dialog) set to URL2. After all your users have updated, I think you can get rid of the app deployed to URL1. (For my company, it's the last step that makes it impossible - our customers don't use our app every day.) You can always test it with a simple deployment and see if it works. RobinDotNet Microsoft MVP, Client App Dev. I don't think so.
An in-depth look at the various ways that ClickOnce applications can be programmatically launched. It's not always easy to programmatically launch a ClickOnce application. The installation is not particularly transparent, and it's tricky to find exactly where on your local machine a.
![Install Clickonce Programmatically Using Google Install Clickonce Programmatically Using Google](/uploads/1/2/5/4/125432097/532277962.png)
I don't think the update URL is part of the application identity. The INSTALL URL is definitely part of it. So your users would have to continue to install from the same URL they were already using, but it would pick up updates from the new one. I read one article that said you could do something like the following to change your deployment location, but I haven't tried it. App is deployed to URL1. Deploy the app to URL2. Deploy an update to URL1 with update URL (in the Updates dialog) set to URL2.
After all your users have updated, I think you can get rid of the app deployed to URL1. (For my company, it's the last step that makes it impossible - our customers don't use our app every day.) You can always test it with a simple deployment and see if it works. RobinDotNet Microsoft MVP, Client App Dev.
Looks like you can do this by changing some properties in the build. MinimumRequiredVersion - Tells ClickOnce that when it updates this application it should update to this version (however this does not force ClickOnce to perform the update). As you can see we set this to the same version number that the ApplicationVersion is set to so that the MinimumRequiredVersion is always the latest version. UpdateMode=Foreground - Tells ClickOnce to update the application before it is opened. UpdateRequired=True - Tells ClickOnce to automatically perform the update. No MSBuild scenario:. Right Click your project and select Properties.
Go to the 'Publish' tab on the bottom left. Click the 'Updates.' Button to open the Application Updates dialog. Check 'The application should check for updates'. Select 'Before the application starts'. Check 'Specify a minimum required version for this application'. Enter the Publish Version that you can see in the underlying Publish window as the minimum version.
Unfortunately, you have to change this every publish. There might be a way for this to be auto, though. Then publish the application and test it. This was worked fine for me on a local test application. Edit: looks like some people have been getting the minimum required version to update, might want to look into their. Edit 2: Image showing where versioning is important: Also, note I have 'Automatically increment revision with each publish' checked. Every time you go into the Properties for the project, that version will be up to date.
You'll generally just have to change the 'Revision' part of the Version in the 'Application Updates' window to match the 'Revision' in the Publish tab. This did not work for me: 1.Right Click your project and select Properties 2.Go to the 'Publish' tab on the bottom left 3.Click the 'Updates.' Button to open the Application Updates dialog 4.Check 'The application should check for updates' 5.Select 'Before the application starts' 6.Check 'Specify a minimum required version for this application' 7.Enter the Publish Version that you can see in the underlying Publish window as the minimum version. Unfortunately, you have to change this every publish. There might be a way for this to be auto, though.
– Oct 11 '12 at 18:36. As long as it's a network-deployed application, you can easily check for updates using this code.
In follow-up of Ahmed's answer, below is the code in VB.NET with minor enhancements. It might not be as per the best practices yet it is readable and descriptive. ' ' Checks if the update is available for network based deployment and download it. ' ' If the update is available, should it be downloaded automatically.Default value is True ' It will return True only if the latest version is already installed. ' If autoDownloadUpdate is set to True, the update is auto downloaded (and app restarts and nothing is returned) else it returns False.