We have a consumer app in the market that uses ClickOnce deployment. We've had various issues over time with ClickOnce, most of which have been resolved, but kind of always regretted not going with a straightforward MSI installer. In particular we'd like to be able to offer proper offline installs (from a boxed copy), and better multi-lingual installation options. We have just updated our beta to an AnyCPU build after finally getting shot of some old 32 bit dll dependencies (before you ask - yes, our app can really benefit from the increase in memory address space, we crunch a lot of data). Now of course we realise that going from x86 to AnyCPU doesn't work with ClickOnce, so it seems like the ideal time to make the switch away to another install technology.
SO here's the issue: we want to upgrade automatically to the new installer, from existing ClickOnce installations. We would also very much like to keep the user settings (.config) file. Not a total deal breaker if we can't, but it will irritate a lot of users if we don't.
So the very rough gameplan is something like this:
Create a new version of the app and deploy via ClickOnce. This new version is basically a front-end for the MSI installer. It somehow grabs the existing user settings, sets off a download of the new installer and invokes it. Then it copies the existing settings to the new application directory. Then it uninstalls itself (itself being the previous, ClickOnce, installation of the app).
In principle I think that could work, but am unsure about how to go about it. Particularly the moving of the user settings to the new application, and self-uninstalling at the end.
If anyone has any tips, or has gone through a similar process, I'd be very keen to hear about it.
Application is c# targeting .NET 4.
thanks, Matt
Windows Installer deployment requires administrative permissions and allows only limited user installation; ClickOnce deployment enables non-administrative users to install and grants only those Code Access Security permissions necessary for the application.
With a project selected in Solution Explorer, on the Project menu, click Properties. Click the Publish tab. Click the Updates button to open the Application Updates dialog box. In the Application Updates dialog box, make sure that the The application should check for updates check box is cleared.
In the Publish wizard, select Folder. In the Specific target page, select ClickOnce. Enter a path or select Browse to select the publish location. In the Install location page, select where users will install the application from.
Create an msi version with the following features:
Create a new ClickOnce version which detects the msi installed version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With