Installing Out-of-Browser application silently in Silverlight 4

Silverlight 4 now has support for installing out-of-browser application silently. In this article I will describe about it.

Silverlight 4 now has support for installing out-of-browser application silently. If you are new to Silverlight Out-of-Browser application development, you can read the complete guide in “How can you implement the Silverlight 3 Out Of Browser feature?" Also have a look into the following article to get the basic understanding of Silverlight 4 Out Of Browser feature “Silverlight 4: How can I create customized OOB Window?"

Hope, you read my previous articles on the Out of Browser application development and have confident building application. In those articles you have seen that I wrote code for installing the OOB application from browser window. Now imagine some scenarios where you want to install the Silverlight application (XAP) using your Installer silently without the user interaction. How can you do that? Silverlight 4 now came up with that feature for you. In this article I will describe it and after reading it you will be able to install your Silverlight OOB Application (XAP) silently in your local drive and can run it from the desktop or startmenu without opening the browser.

How Silverlight Out-of-Browser application works?

Before going to implement the feature we will first discuss how the Silverlight OOB application works. When you install Silverlight plug-in, it also installs an .exe file named "sllauncher.exe" which you can find in your "Program Files\Microsoft Silverlight\" directory. This exe file now has the capability to install your Silverlight OOB application silently without opening the browser window. If you have already installed your OOB application it will create a shortcut to launch the application from desktop or start menu. Right click on the shortcut & go to it's properties. You will notice that, the target location is set to "Microsoft Silverlight" and the target is set to something similar to the following line:

"C:\Program Files\Microsoft Silverlight\sllauncher.exe" 744317312.localhost

That is responsible for launching the XAP file as your Out-of-Browser application.

Script for installing Out-of-Browser application silently

Let's come to write some scripts to install your XAP silently as out of browser Silverlight application. Hope, you have a Silverlight application configured as out of browser. Build the application & you will get the output file (.XAP) in the ClientBin of the web application. Copy this file to your local drive in a specific folder (say, C:\MySilverlightApps\). I am using my Chromeless Window Demo Application and hence the complete path of the XAP is: "C:\MySilverlightApps\Silverlight4.OOB.ChromelessWindow.Demo.xap".

Now open your notepad and write the following code in a single line:

"C:\Program Files\Microsoft Silverlight\sllauncher.exe"

Related Articles

Free Microsoft Silverlight 4 Exam

Microsoft just announced the availability of beta exam for Silverlight 4. This is beta exam for 71-506, TS: Silverlight 4, Development.

Step-by-Step Command Binding in Silverlight 4

Silverlight 4 now came up with the support of Command Binding. Using Command binding you can easily develop your Silverlight MVVM (Model-View-ViewModel) applications where your view will not know about data. In this article, I will describe you the Command binding feature in Silverlight 4 Step-by-Step.

Microsoft Releases Patches for Silverlight

Microsoft released an update to its Silverlight media streaming client that fixes a range of bugs in both the Windows and Mac OS versions. Instead of a patch, per se, Microsoft (NASDAQ: MSFT) released an update to Silverlight on Thursday. Most Silverlight users will be offered the update via the Silverlight installer, but there are other delivery options, as well.

More articles: Silverlight 4 Out of Browser Silverlight 4


Author: Saran24 May 2010 Member Level: Silver   Points : 0

Hi kunal

Thanks for posting this article

Author: Kunal Chowdhury24 May 2010 Member Level: Gold   Points : 0

Thanks Saran.

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: