I have a WinForms app I am deploying via ClickOnce. I added a custom prereq in the form of a .msi that installs X509 certificates. Question is, if I need to change certs due to expiration, how do I get ClickOnce to notice the difference in setup versions and run the .msi aga开发者_JAVA百科in? Is this even possible?
No, this isn't possible using ClickOnce. ClickOnce doesn't handle prereqs at all. It simply keeps client files in sync with files on a server.
It's confusing because when you deploy with Visual Studio it lumps prereqs in with ClickOnce so people think ClickOnce handles them. All Visual Studio does is build a small bootstrapper exe that ties all your prereqs together. That way, the user can run a single exe that handles downloading and running all the install packages in the correct order rather than telling your users, "Install the .NET Framework 4.0 (unless you already have it), then go here and download something else and run it, then this..."
If you want to handle this, you'll have to write code in your app's startup to do it. Check if they have the latest version, prompt them to install, send them to a webpage, etc. Not fun, but definitely possible.
精彩评论