I’ve seen a few questions regarding how to deploy a Silverlight Out of Browser application in an .exe over the past couple days. This post will show you one way of doing that.

  1. Create your Silverlight OOB app
  2. Open up a new .txt file and add:
    "%ProgramFiles(x86)%\Microsoft Silverlight\sllauncher.exe"
    /overwrite
    /emulate:"MyOOB.xap"
    /origin:http://www.mydomain.com
    (remove the line breaks & watch the spaces!)
  3. Save the file and change the file extension to .bat (i.e. run.bat)
  4. Run c:\Windows\System32\iexpress.exe as admin
  5. Follow the wizard until you’re prompted for the “Packaged Files”
  6. Add your .xap and .bat
  7. Continue until you’re promoted for the “Install Program to Launch”
  8. Type  cmd.exe /C run.bat for the “Install Program”
  9. Complete the wizard.

You application should now be packaged in a distributable .exe.

P.S - If you’ve never heard of sllauncher.exe check out Tim’s blog post here.
P.S.S – Step 8 is only required if you’re deploying to an x64 machine. Otherwise just specify the .bat file.

posted on 2010-12-10 08:36  混沌中  阅读(242)  评论(0)    收藏  举报