Thursday, May 13, 2010

Don’t think you can create an offline, non-browser, install for your OOB SilverLight apps? Nope! I mean, yep, I mean, yes, yes you can (and here’s how)…

Amazedsaint's .net journal - How to create an Offline installer (no browser) to deploy your Silverlight applications directly

“…

What?

Recently a friend asked me to help him create an ‘installer’ to pack and distribute the Silverlight game he recently developed. He wanted to distribute his game via software download websites (like download.cnet.com), and via medias like CD/DVD.

In fact, that is pretty easy (technically) - and this post is about creating and deploying Silverlight Runtime + Your Silverlight application (Xap file) using your very own custom, standalone, offline installer with out getting a browser installed - instead of the user installing your Silverlight application Out Of Browser via the web browser.

Alright. In this post, we’ll see how to build a standalone installer for Silverlight Nerd Dinner Client that I built some time earlier (It is a Silverlight client for Scott’s Nerddinner.com to enable nerds to ‘eat in packs’). The installer will start with a Splash screen as well ;).

Why?

I can already hear you thinking, “why this is required”? Think about this - You created a Nice game or a Cool gadget in Silverlight. Now you want to create a standalone Installer - so that you can push the same to your potential users via various means. Like, users may download your installer via CNET like software websites - or you may distribute your installer via CD/DVD media etc. In this way, you can push your Silverlight apps to the masses- instead of waiting for them to come to your website and discover it – You got it, that is what we are talking about :).

So, in short, I think Silverlight can be used a platform of choice for building light weight desktop applications, mainly applications like utility tools, light weight games etc.

I feel there are a good number of use cases where you want to do this.

  • You can write and deploy tiny apps and gadgets - with out worrying about the presence of/version of the .NET runtime in user’s machine.
  • You can maintain the same code base for your web and desktop versions if the scenario suits.
  • You can contribute towards increasing the number of boxes where Silverlight exists :). More people with Silverlight = a brighter web ;)

And yes, if you are doubtful about what you can really do from a Silverlight application that is running in an elevated trust, out of browser mode, check out this epic post from Justin Angel where he demonstrates how to do all whacky things with Silverlight + COM, including accessing Win 7 APIs, Accessing Scanners and printers, Adding your OOB application to windows startup etc. He rocks.

How?

So, let us see this in detail – …

image …”

As a long time Smart/Win Client guy, I found this interesting. I think it would be cool to be able to distribute a SilverLight app using “traditional” methods.

No comments: