On Deployment: ClickOnce & The Client Profile Configuration Designer
May 29, 2009 By Karsten JanuszewskiI recently engineered the deployment of two client applications, Glimmer and The Archivist. Both are WPF applications that required the .NET Framework 3.5, which is not installed by default on Windows XP or Windows Vista. (It is on Windows 7 – rad! – yet another feather in the cap for Windows 7, which I am using as my dev machine quite happily, BTW.) So, I needed deployment strategies for getting not only my application on the machines but also the .NET Framework 3.5. I took different approaches for each application, which I will discuss below.
For The Archivist, I used ClickOnce. I did everything through the Visual Studio publish features, which work great -- gotta love wizards. I’ve always been a big fan of ClickOnce. I used it for Flotzam and also for many of the other prototypes I’ve written. My favorite feature of ClickOnce is the auto-update feature. The application always phones home when the user starts it to make sure it has the latest version and, if they don’t, prompts the user to upgrade. This makes it trivial to push out new features -- and the rare bug fix :).
The one thing I did above and beyond what Visual Studio generates is to roll my own HTML page instead of the publish.htm that the wizard generates. When the user clicks the Install Now link, I fire off a javascript which I took from the Windows SDK and slightly modified. The script looks at the USER AGENT string to detect if the user has the .NET Framework or not. If they don’t, I send them off to a setup.exe which will do the installation. If they do, I send them to the .application file. If you are interested in this script, you can see it if you view source on The Archivist homepage.
For Glimmer, I couldn’t use ClickOnce because of Glimmer’s plug-in model. (Here’s a good discussion of ClickOnce vs. MSI if you are interested.) So, for Glimmer, I used Visual Studio to create an .MSI and then used the new Client Profile Configuration Designer
to create a setup program that installed both .NET 3.5 and Glimmer in one fell swoop. This is a great tool that made it easy to create a slick looking set-up program with a good user experience. They’ve got a bunch of good documentation up on WindowsClient.net as well as a video that walks through using the tool. If you are doing any deployment of WPF applications and you can’t use ClickOnce, I’d highly recommend using this tool. And the folks who built it are very responsive as far as feedback and help.
If you installed either Glimmer or The Archivist, I’d be curious about how the experience was, especially if you didn’t have .NET 3.5 on your machine.



Follow the Conversation
8 Comments so far. You should leave one, too.
Even if you can use ClickOnce the tool can be very useful. Users can specify prerequisites (like the .NET Client Profile), install conditions, bundle additional installers, add a custom license agreement, customize the install experience, and more.
Hello Karsten,
we’re currently struggling with the client profile: the MSI seems fine but after installing the client profile, it asks for the installation of the full .net framework as well.
Do you have a clue why this is happening? Our app is at www.tabbles.com (the beta in the download area is not build with the client profile, but with the full framework)
thanks,
Andrea
What is the best way to handle installations of KB’s?
Thanks
How do both ClickOnce and MSI fit into ‘Citrix Published Application’ deployment?
It’s a fairly corporate-specific requirement: but we need to support both local-install and remote-via-Citrix access to WPF applications. Neither ClickOnce nor an MSI seem to “fit” into publishing a single EXE for remote access via Citrix… the EXE/MSI that you ‘hit’ proceeds to trigger/run the ‘real’ application after a download/install/update process — and I’m not sure Citrix plays well with that concept.
any pointers/suggestions would be much appreciated.
@Andrea — Hmm, not sure. Your best bet is to leave feedback here (http://code.msdn.microsoft.com/cpcd/Thread/List.aspx) and I’m sure Eric or someone from the product team will get back to you.
@guayo — Installation of KBs will require an .msi; this is outside the scope of ClickOnce
@CraigD — sorry, Citrix is outside my sphere of understanding.
@Karsten :: well, i tried ur Glimmer on my machine..it smoothly installed on it.because i have .net 3.5 and .net 3.5 Sp1 on it…But the problem is occured when i tried it on machine in which there is no .net 3.5 installed.
i tried it on VMWare(running vista Sp1). it show me error..which i posted on
http://code.msdn.microsoft.com/cpcd/Thread/View.aspx?ThreadId=1770
i have the same experience with my setup file.it is run with any prerequisites..it show error(error no.1) from the link
@Karsten :: well, i tried ur Glimmer on my machine..it smoothly installed on it.because i have .net 3.5 and .net 3.5 Sp1 on it…But the problem is occured when i tried it on machine in which there is no .net 3.5 installed.
i tried it on VMWare(running vista Sp1). it show me error..which i posted on
http://code.msdn.microsoft.com/cpcd/Thread/View.aspx?ThreadId=1770
i have the same experience with my setup file.it is not run with any prerequisites..it show error(error no.1) from the link
Can u also provide the .Net Framework 3.5 with your setup file? I tried it with my installer when i run the setup file it show me error..(Fatal error)
The setup does attempt to install the .NET Framework on to machines that don’t have it yet…