I need a post action on ClickOnce installer which should be performed after the application files are stored on the client side but before the application’s first run. Specifically, I would like to encrypt sections of a configuration file.
From what I’ve found, it’s possible to add a class containing InPlaceHostingManager methods and use it for explicit installation/updates later on, but how can one override the default ClickOnce installer so that custom code is called?
I would like to emulate the behavior of the ancient Setup Project which invokes the Install method of whatever inheritor of System.Configuration.Install.Installer you plug into your project.
Thanks.
I don’t believe this is possible with ClickOnce.
As I see it some of your options include:
Also, you mentioned InPlaceHostingManager. It looks to me that it’s a way of hosting the ClickOnce installation framework (rather than doing it via IE for example). So this might let you make a custom installation application to host the installation and run the post-installation steps, but the problem is that you’ll still need to install your custom installation application somehow (and run it as a user with installation rights)…