1

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 again? Is this even possible?

jonnyb
  • 352
  • 1
  • 2
  • 17

1 Answers1

1

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.

codeConcussion
  • 12,739
  • 8
  • 49
  • 62
  • That was my thought as well after initial research. I would be nice if MSFT would somehow add prereqs to the manifest where you could specify version, and update download address. I would like to think with everything ClickOnce can do, it wouldn't be a reach to add that functionality. Thanks for the reply. – jonnyb May 19 '11 at 14:18
  • The central problem with adding prereqs is security. A user needs very few privileges to install a ClickOnce app since all it's doing is copying files to their user profile. Most prereqs require registry entries, adding files under "Program Files", etc. All those things require elevated privileges. – codeConcussion May 20 '11 at 13:35