Silverlight Tips/Tricks – How to change the “Download Source” of Silverlight

Note: This post is written for Silverlight 1.1 Alpha version.

One interesting question came up in Silverlight forum that I actively participate lately. You can read the original question here.

Silverlight Download


The question is ~

I want to host a silverlight site in a entwork with no internet connection. If someone opens the silverlight site you see an message to download silverlight. But with no internetConnection this won’t work. How can i Change the link where this message leads me to download silverlight plugin. Can I change it to a path like c:\tools\silverlight.exe?


I think this question is very interesting since I worked a place where the internet connection is extremely slow or doesn’t work all the time. He wants to host the Silverlight application on the web server within the LAN where there is no internet connection. He wants to provide the way to download the Silverlight installers for those who don’t have Silverlight installed on their machines within LAN.

So, I gave him the following steps to solve his problem.

Steps ~

  • Download the Silverlight installer (AFAIK, there are three types of installers for Windows, MacIntel and MacPPC)
  • Upload the Silverlight installers to your web directory of your local IIS server. let’s say your silverlight.exe is under the following path.
    • “http://localhost/silverlightinstallers/wins/silverlight.exe”
    • “http://localhost/silverlightinstallers/macIntel/silverlight.exe”
    • “http://localhost/silverlightinstallers/macppc/silverlight.exe”
  • Open the Silverlight.js in VS 2008 or your favorite text editor.
  • Find Silverlight.fwlinkRoot in that file. (Just press Ctl+F to find the string)
  • You will see this code below
  • Replace with Silverlight.fwlinkRoot=”http://localhost/silverlightinstallers/”
  • Find b=”92800″ in that file again.
  • You will see this code
    "if(c=="Windows")b="92800";else if(c=="MacIntel")b="92812";else if(c=="MacPPC")b="92811"")
  • Replace with the following code
    if(c=="Windows")b="wins/silverlight.exe"; else if(c=="MacIntel")b="macintel/silverlight.exe";else if(c=="MacPPC")b="macppc/silverlight.exe"

That’s all. Remember that you will be able to download the installer based on what OS you are using. For example, you can’t download the installer for MacIntel if you are not using Mac Intel machine.

Feel free to let me know if you have any question or comment. Don’t hesitate to contact me if you have any issue with the steps that I mentioned in this post.

7 Replies to “Silverlight Tips/Tricks – How to change the “Download Source” of Silverlight”

  1. Hi bro, sorry this is an off topic.
    Just a small inquiry, wanna send through contact form or such but couldn’t find one so just dropping it here.

    If I remember right, last time you wrote something about syntaxHighlighter plugin. Is that the one you are using in this post or different one?

    I tried using the same thing. ie.
    and also tried another similar one but all in vain. Just not displaying properly with my template or wp version or not sure.

    What version of WP are you using and could you kindly let me know which syntaxhighlight plugin you are using.

    Appreciate your help.

  2. Hey sis,

    Just a small inquiry, wanna send through contact form or such but couldn’t find one so just dropping it here.

    Yes. :) I don’t have a contact form.. I was looking for one but didn’t find the one I like.

    My current wp version is 2.3.3 and I’m using SyntaxHighlighter from Initially, I was using the similar one but SyntaxHighlighter is better… YOu can find the installation instruction from that URL. You just have to make sure that you have uploaded everything (including js and css) to your host..

    Let me know if you are still having the problem in installing that plugin..

  3. Unfortunately it’s not working. I just updated to new wp2.3.3 and still the same problem. So it must be cos’ of my theme. Something must have screwed up in my theme codes.

    Well thanks anyway bro.
    I’ll try again later or may be I’ll just ditch it. Not that I post many post with codes in it so it’s ok I guess.

    Enjoy your day.

  4. Oh my gosh! I finally got it. My stupid theme doesn’t have wp_footer() code in the footer.php file. Once I added it, the plugin works like a charm.

    Anyway thx.

Leave a Reply