ClickOnce vs. a shortcut

clickoncedeployment

I have seen some application whose “deploy” strategy is to have an .exe file in a server and access it via a shortcut from different “clients”, and it works fine. They only worry about keeping that EXE file updated when a new version arrives. Why could this approach be wrong and what would be the advantage of using ClickOnce instead of this old fashioned style?

Best Answer

What happens when disgruntled Joe decides he wants to spread a massive virus throughout the organization and replaces your friendly .exe with a malicious virus? ClickOnce deters this through certificate validation.

Also...

ClickOnce has a system of prerequisite checking. You don't have Data Access Components? You don't even have .NET Framework 2.0? No problem! It installs the prerequisite quietly.

Can't think of any other reasons off hand but those are the big ones.

Edit: Also, ClickOnce installs a local copy that can be ran while disconnected from the network. When the local copy is ran, it automatically checks for any updates, offers the user the choice to update to the new version or run the current version. This can be configured to be done at the startup of the program or at the shutdown of the program if my memory serves me correctly.

Hmm.. what else..

By running an .exe across the network like that, you'll probably run into problems modifying the file system of the PC the .exe is running on. ClickOnce does not have any problems with this since it is ran locally.