Provide version only to prerequisites in clickonce

I am deploying an application where I need to add two preconditions. My problem is that I need to provide a prerequisite version somehow so that in the future I can only update the prerequisites without updating the whole application.

Thanks Sunil Chaudhary

+1


source to share


1 answer


Installing the prerequisites is not part of ClickOnce. ClickOnce is the deployment of a .NET application to a user profile. It cannot run msi files, edit registry, etc.

There is a lot of confusion about this because of how the deployment process works in Visual Studio. In VS you can choose your prerequisites and it will build a bootstrapper installation for you. However, this feature has nothing to do with ClickOnce, it's just a quick way to combine your prerequisites. It doesn't even do anything reasonable with the version. All it does is say, "Please install this before running our ClickOnce installation for a .NET application." It is entirely up to the user at this point.



One option is to write your own code to get the behavior you want. I did this with a third party reporting tool that was supposed to run the msi file. After my application started, I checked the registry to see if the application was installed, prompted the user, downloaded the required files in the background, and started the installation. A lot of pain, but doable as long as your application can initially start without preconditions. However, be aware of security restrictions. Many installations require users to be administrators. One of the great benefits of ClickOnce is that users don't need to be admins.

+1


source







All Articles