Install Clickonce Programmatically Scroll

Install Clickonce Programmatically Scroll Average ratng: 6,3/10 6287 reviews

ClickOnce Extends Windows Forms Applications into Smart Client Applications. This is the more traditional and common installation. ClickOnce Publishing. As previously stated, to make your application available, you publish it to a Web server, network file share, or removable media such as CD. Programmatically using the ClickOnce. Using System.Deployment.Application. Using System.Linq. Using System.Text. Using System.Threading. Namespace InstallClickOnceApp. /// InstallClickOnceApp.exe uri unc. /// Programmatically installs a ClickOnce application under the current user's profile without. /// launching the application.

Active2 years ago

We have been using click once since 2006 and now have a need to change the update location, this happened once before but we just uninstalled and reinstalled, this will now be problematic.

A solution was presented in Click Once Migrate URL, however when we tried this years ago (.NET 2.0), it failed with the app stating that the URL of the update and the URL of the client did not match raising a security risk and prevented the update from occurring and starting for that matter.

Install Clickonce Programmatically Scroll On Windows 10

The docs state that this property can only be altered in the application manifest, but I'm not sure the approach to actually change this in an already deployed app.

I want to use a process such as the following assuming current version is 5 and deployment location is apps.mycompany.com and new location is clickonce.mycompany.com

  1. Publish app at clickonce.mycompany.com with version 5.2
  2. Publish app at apps.mycompany.com with version 5.1 which has bootstrapping code when the app starts up to alter the apps manifest to change the URL.

With this process the clients will then get two new updates consecutively. Infect, if I publish 5.1 to both locations it should work.

Community
Brett RyanBrett Ryan
15.3k25 gold badges109 silver badges140 bronze badges

2 Answers

This type of thing can be solved by having the app uninstall itself, and then reinstall itself. I have done it before, although I was installing from a network location, and not a url, but it should be the same thing.

Here is a link on msdn for this solution. Go down to the section 'How to programmatically uninstall a Click Once application and install a new version'.

You can also check out a different version of the solution here.

This works, but it's a bit tricky. It is the only way I know of to solve this type of problem though.

EDIT If you use the information in that article, here are 2 things to watch out for.

  1. Make sure the update for the app that is uninstalling itself is not optional. You need to make the required version be the current deployed version. Otherwise, the restore option is available and is the default for the uninstall dialog box, and the app won't uninstall itself.
  2. Make sure in the GetUninstallString method in the DeploymentUtils class, change the DisplayName it is looking for from 'TestCertExp_CSharp' to the name of your app.
richardScrollrichard
4,14015 gold badges71 silver badges130 bronze badges

use these command lines

Check this: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2939893&SiteID=1

Ahmed SabryAhmed Sabry

Not the answer you're looking for? Browse other questions tagged c#.netclickonce or ask your own question.