A simple Silverlight OOB Application installer using NSIS

What is NSIS?

NSIS (Nullsoft Scriptable Install System) is a professional open source system to create Windows installers. It is designed to be as small and flexible as possible and is therefore very suitable for internet distribution.

You can download the NSIS Installer from here

Script for Silverlight Installer:

Name "Silverlight Installer"
OutFile "SilverlightInstaller.exe"
InstallDir "$PROGRAMFILES\SilverlightPackage"

XPStyle on

Function .onInit
# This function will be fired during initialization of the installer FunctionEnd

Section
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
File "Silverlight.exe"
ExecWait "$INSTDIR\Silverlight.exe /q /doNotRequireDRMPrompt"
File "NameOftheXAP.xap"
ExecWait '"$PROGRAMFILES\Microsoft Silverlight\sllauncher.exe" /install:"$INSTDIR\NameOftheXAP.xap" /origin:"http://yoursite.com/NameOftheXAP.xap" /shortcut:desktop+startmenu'
SectionEnd

We will see some more functionality of NSIS in my up coming Articles.

Thanks.

Next Recommended Reading Simple storyboard in silverlight