Sunil Chaudhary
Sunil Chaudhary

Reputation:

Provide version to only the Prerequisites in clickonce

I am deploying an application, where I need to add two prerequisites. My problme is that I need someway to provide version to the prerequisites so that in the future may be I could only update the prerequisites without updating the entire application.

Thank You Sunil Chaudhary

Upvotes: 1

Views: 252

Answers (1)

codeConcussion
codeConcussion

Reputation: 12938

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

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

One option would be to write custom code to get the behavior you want. I did this with a third-party reporting tool that needed to run an msi file. After my app started, I checked the registry to see if the application was installed, prompted the user, downloaded the necessary files in the background, and ran the install. A major pain, but doable as long as your app can initially start with out the prereqs. However, keep in mind security restrictions. A lot of installs require users to be admins. One of the big advantages of ClickOnce is that users don't have to be admins.

Upvotes: 1

Related Questions