Update ClickOnce installation to a completely new application

132 views Asked by At

I am in the process of upgrading an unsigned Winforms application installed on a number of sites using ClickOnce. The new application has a different name and is going to be installed to a different URL and digitally signed.

I know that I can change the installation URL path using this technique, but is it also possible to change the application name? Ideally I would like to uninstall the old application and install the completely new, renamed and signed application seamlessly to the users.

I have tried using MageUI but keep getting an error "The application manifest is not signed" when I choose OldApplication.exe.manifest so I don't know if I am on the right track here.

1

There are 1 answers

0
Russell On

For those that need to do this, I came up with the following solution :

  1. Firstly I created an install for my application. In my case I am actually trying to get away from ClickOnce and am moving to Advanced Installer, so I created a MyNewApplicationInstaller.exe package using that.
  2. Then I packaged MyNewApplicationInstaller.exe as part of a compulsory ClickOnce upgrade and placed it in the application folder.
  3. In the updated ClickOnce application I run MyNewApplicationInstaller.exe and thus install the new application.
  4. Finally, MyNewApplication contains code to uninstall the original ClickOnce application. I achieved that using the code from this SO answer