Welcome

You have reached the blog of Keith Elder. Thank you for visiting! Feel free to click the twitter icon to the right and follow me on twitter.

Tip: ClickOnce Deployment

Posted by Keith Elder | Posted in Smart Clients | Posted on 28-07-2006

Julie Lerman posted to her blog about her struggles with ClickOnce deployment. I don’t know all the facts but reading her post really made me go, huh?  I’ve deployed a major CRM app via ClickOnce at work and I haven’t had any of these problems.  Everyone has different ways of getting their apps out to their users based on their environment configurations.  I don’t know what type of environment you are in or how your desktops are managed but here’s how I deploy ClickOnce apps for our Enterprise. 

ClickOnce Catch 22
You’ve wrote your application and you’ve copied it to your web server for ClickOnce deployment.  Question:  How do end users sitting in their cubes know the app is there?  Answer:  They don’t.  The big thing with ClickOnce is you have to jump start the user into launching the application via the URL.  One way would be to just email them the link.  That’s no different than how web sites are passed around today.  But what about tomorrow when a new employee starts.  They didn’t get the email so how do they know what to click on.  To make things somewhat seemless we need to help the users out.  We also want to automate this deployment so if a new computer get’s added to the network, the new employee can just start their computer and launch the app. 

Solution
To make it easy for user’s put an Icon on their desktop.  This icon should be a URL shortcut icon which is a link to the ClickOnce application.  Since the user is always launching the application via the network, auto updates will occur.  Even if your application installs a shortcut menu item for the user, it doesn’t matter which icon they click on.  They are still launching the application via the standard URL.  Depending on your environment, the steps below may be different.  The end result is the same.  To accomplish this:

1.  Make a simple MSI installer which has desktop icon.  The icon is just a shortcut to a URL where the application is deployed.
2.  Deploy the icon.  How you do this will depend on your environment.  At our company the windows engineers can deploy the icon using their whizbang deployment tools where user’s don’t even have to reboot.  I think they use Altiris for this but if you can auto update computers and have software updates installed at boot time, the same thing applies.

After the icon is deployed, the user sees the icon on the desktop and clicks on it.  The first launch it will check to see if it has already been installed and if not, install itself.  If they close the app and then click the icon again, the app checks for updates and then launches.  All subsequent clicks on the app (no matter which version is installed) work.  If they click on the app in the start menu, doesn’t matter, they are still launching it from the network in the right place.

If you think about it, how do user’s know how to find an internal web application or the intranet?  Usually the same thing is done, someone puts an icon on the desktop.

Write a comment