Let’s create a smart installer for Windows

Installer is the first experience of an application. You can create a user friendly, very helpful application but if it contains a very bad installer the users of your application get a very bad first experience and you all know that the first impression makes a mind set which can be never changed… ๐Ÿ˜‰

“How to create an installer?”.I asked this question from the founder of iReport, Giulio. He told me to use NSIS. Now NSIS came in to the scene. Lets explore what is NSIS.

Here we go…

According to Wikipedia

Nullsoft Scriptable Install System (NSIS) is a script-driven Windows installation system with minimal overhead backed by Nullsoft, the creators of Winamp. NSIS has risen to popularity as a widely used alternative to commercial and proprietary products like InstallShield.

It was created mainly to distribute Winamp and NSIS is a free software ๐Ÿ™‚

Popular products that use NSIS are

Mozilla Firefox
Bit Torrent
Google Talk
Kaspersky AntiVirus
OpenOffice.org for Windows
and the list goes on.

You can easily create an windows installer for a zip file just by one click using NSIS. If you need more advanced features and a modern user interface you have to read about NSIS scripts a little. Don’t worry I can assure you it wont take much time.

Step 1: download NSIS from here and install it.

Step 2: Open your favorite editor and type this script and save it as CopyPaste.nsi

#Sample script by Harshani Nawarathna to paste a folder “hi”
#which contains the text file “hi.txt”
#to the folder “CopyPaste” created in Program Files and
#create a shortcut to the “hi.txt” on the desktop.

Name “CopyPaste”
OutFile “CopyPaste.exe”
InstallDir “$PROGRAMFILES\CopyPaste”
Page License
Page Directory
Page InstFiles

Section “CopyPaste”

File /r hi
CreateShortCut “$Desktop\hi.lnk” “$INSTDIR\hi\hi.txt”


Step 3: Right click on the file and compile the script.

Step 4: You can see the .exe file created. Let us test the installer.

Step 5: This is how the installation procedure looks like

Then you can see the folder copied to the Program Files and the shortcut on the desktop ๐Ÿ™‚

You can explore more about NSIS by it’s user manual and NSIS tutorials.

Have a nice time with NSIS ๐Ÿ™‚


Author: Harshani Nawarathna

Sri Lankan woman in Computing

13 thoughts on “Let’s create a smart installer for Windows”

  1. @kalani akka: Just now saw your comment. you are almost welcome ๐Ÿ™‚

    I found your blog 2years back via Saliya sir's blog and it was your blog motivated me to start blogging. I'm so happy finally you also found my blog. ๐Ÿ™‚


  2. So nice to hear that nangi:) Actually Saliya is the one who directed me to your blog post when I was searching for a good installation sys. So I could make a pretty good installer and thought of posting some tips on NSIS too…

    Keep up the good work, this is such a nice blog (I read almost all the posts) ๐Ÿ™‚


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s