Archive: NSIS vs. INNO???


NSIS vs. INNO???
I am in the market for a free installer. Can someone enlighten me on the pros and cons of NSIS vs. INNO??? (Those are my top 2 choices right now) Thanks in advance!!!


Well, basically InnoSetup is based on INI file while NSIS is based on a script. Though InnoSetup allows you to use VCL in it (objective Windows "scripting" with Pascal), NSIS is entirely scripted. From extracting files, registering DLLs and writing to registry keys to showing message boxes you control the flow of anything in the installer.

Both installers feature bzip2 and zlib compression. The overhead of NSIS is about 34KB, while InnoSetup's overhead is 200-300KB (I don't remember the exact number). This means that the basic installer size of NSIS is around 34KB while in InnoSetup it's around 200-300KB.

Both installers feature plug-in ability, though NSIS has many more plug-ins unless I have missed InnoSetup's plug-ins archive.

Both installers supply a modern UI, but NSIS lets you change the UI to whatever you want. NSIS lets you add images, URLs (in the latest CVS version of InstallOptions - a plug-in), and change position and sizes of controls. NSIS is generally more customizable, or is at least built with that thought in the mind of the developers.

I'll post here later if I have anything to add. I'm sure others will have something to say too.


kichik, when you say "based on INI file" and "based on script", what exactly do you mean by that?


I mean that to create a InnoSetup installer you have to write an INI script and to create a NSIS installer you have to write a script. The difference is that for InnoSetup it's usually a shopping list. Your INI file tells InnoSetup do this, then this, then this and then this. When you reach that stage do this, this and then this. You can't do two things that are not of the same type in two different sections. You can't for example tell InnoSetup to write a registry key after you extract the first file and before you extract the second file. I bet you can do it with the VCL scripting language I have told you before, but it would require converting the whole thing to work with it.

NSIS on the other hand is based on a scripting language. It means you control the flow of the installation. You combine everything in everything, check for errors and handle them yourself, use variables to store user input or values you've read from whatever source you'd like and use them for output names, message boxes and whatnot.

So the difference is that in NSIS the default is full control, while in InnoSetup, though it's possible to use some sort of scripting, the default is to have minial control and just let the installer do the default in its own order.


Apart from being so amazing at creating custom installers, it has the ability to do a lot of other things too.

Here is a list of programs that I made using the NSIS scripting language...
* Live Chat Room (BazChat) for my school network
* D-Day Stats logger (logs stats for my gaming experiences)
* D-Day Map Packager (packages Quake2 D-Day game levels into zips ready for public release - used by 100's of people creating levels for our game)
* D-Day Updater (automatically checks for updates on our game serverd, then downloads and installs these updates)
* Afrow UK's Map Compiler (compiles Quake2 maps through various methods and settings)

Because NSIS has built-in compression, I am able to include other exe's within my application for nifty things like: creating zips, compiling my Quake2 maps, extracting from Quake2 paks etc.

NSIS has the full effect of hard-core scripting languages, that people like me have no time to learn (I'm at school!)
I learnt the basics of NSIS scripting within 1 to 5 weeks, and straight away started writing my own multi-purpose scripts to do simple or advanced things.

I'm now glad to say that I have 32 scripts on the NSIS Archive!

Of course, I love NSIS a lot (very enjoyable to use because people using other scripting langauges take a few months to make one application, whereas it takes me less than a week to build an equivalent application!)
I also love the community here too, and enjoy being able to help others that need help!
I also thank the people that are developing NSIS for all of their free support that they have given me, and the time they have put into NSIS.

-Stu


Thank you Afrow :)

You are indeed a valuable user of this community.


Well me, as an ex-INNO user, I can tell you
that you need a lot of extra - addons to use INNO with
more features (like download feature, password pages, detect installed files, etc.., increasing the size of your installer at 100%+ or more...
With NSIS the same features, with less addons, you increase the installer like 10 KB or less, sometimes nothing :)...
Tell me if I'm wrong, but NSIS is the only installer that you can
change almost every color of the installer, like the background...
As you can see, INNO has to use INNO-extensions to customize your installer...
NSIS is build-in to do that and more to bit INNO...
Well, the quote say it:

NSIS tries to be a scriptable win32 installer/uninstaller system that doesn't suck and isn't huge
:)

Thank you Lobo.

Indeed to get the scripting and some more features that come by default in NSIS you need InnoSetup Extensions which increases the overhead even more. But to be fair, InnoSetup 4 (not yet available as binary download - beta) includes those by default.


But InnoSetup 4 still increase the exe-head data with more
installer options....although you app size is like 50 KB :igor:

I think the reason is their source code is mabe in Delphi.


I like the idea of NSIS creating a smaller installer than INNO. However, and let me play devil's advocate here, smaller is not always better ;)

If the NSIS installer is smaller and has the same or more functionality, then I am all for NSIS. But, if the installer is smaller and has LESS functionality...I guess I would have to determine if those "missing" funtionalities are going to impact me.

As far as functionality between INNO and NSIS, are they comparable? Does NSIS have more functionality? Does INNO?

Thanks all. This discussion thread is exactly what I was hoping for!!!


dude... did you check the Manual?
Install Options? Modern UI?
Web Archive? The Plugins?
Now compare with the INNO.. :)


Also, read what I said before?

I doubt that you have seen Windows applications made with INNO...

The best bet I can give you, is firstly make you're installer in NSIS, then see if you can remake it in INNO.
If you start with NSIS first, I bet that you won't want to bother with INNO!

-Stu :)


I like NSIS because it's small and is a turing-complete programming language.
With NSIS you can do almost every possible calculation, only limited by the stack size (dunno, is there any limit at all?) and by the amount of memory, including secondary memory like harddisks (file operations).
Take a look at the prime number generator script.
And all this is possible without even using any plugins.

And with the plugins I guess NSIS could fly a space shuttle to the moon, orbit it 666 times and fly back ;-)


I use both currently and prefer NSIS because of its "scripting" ability. As an example, I've written an NSIS script that runs an automated Installshield setup...NSIS extracts the installshield files and runs the "setup.exe /s setup.iss" or whatever. In this case, I used NSIS the same way I would use vbscript or another similiar "scripting language".

I've written NSIS scripts to compact access databases chosen by the user in a custom drop down list via installoptions. I've written NSIS scripts to simply delete files and registry entries off users machines. Also simply to distribute 1 file to a directory specified by a registry entry (this last thing, as simple as it is, is something I believe you need to go into the "innosetup extensions" to do).

I use Innosetup to distribute my installers that don't do anything but create a few registry entries and copy files into a location. The setup of an installer of this type, with an "installshield" look to it, would take me an hour in NSIS and took me 10 mins in Innosetup. The installer asks me for a password, which is 1 line in Innosetup vs. an installoptions customization in NSIS. That alone would take me time to code and test.

Also Innosetup supports disk spanning, whereas NSIS does not. This is also a reason why I use Innosetup for certain installs.

They each have their use...NSIS consumes about 80% of what I use for "installers".

And as far as support goes...I don't think i've ever posted a question here that didn't have some kind of response within 10 minutes...and most of my problems are solved the same day (as long as I'm smart enough to figure out what Kichik is saying :D )

I've never used Innosetup's support because I never did anything at all complicated.


Thanks everyone! This is exactly the type of information I've been looking for!

So, it's my understanding (from reading everyone's postings) that NSIS is a much more powerful installer. However, if all I wanted to do was a simple install (a few registry entries and copying files places), INNO is the way to go. Does this sound reasonable?

With that said, let me pose this scenario...
1) I have a VB application that I've created. I also have an external .DLL that I link into my app. During installation, I want some registry entries created/filled, I want some files copied to the hard drive, I want all the necessary files registered and, sometimes, if some registry values already exist, I want to tell the user that they must uninstall the older version before installing this version...or, better yet, give them to option to uninstall the old version right then (this might be where NSIS is much better????).
2) I want the uninstaller to not only delete some files that were put on the hard drive during installation, but I want it to also delete some registry entries.

This seems like basic install/uninstall functionality (with the exception of the uninstalling of the older version...maybe?). Is it worth my time to learn NSIS or, as Dick4 explained, is it simpler to use INNO setup for my needs?

I guess my dilemma here is that I would like to get my app out in the market in a timely manner. I don't want to spend 2 weeks on simply putting together the installer. However, I understand that there are example scripts out there, so maybe that's my answer?!?!?

Any thoughts? Thanks again!


Now that you know what you are going to use, you need to go ahead and use it!
There is nothin much else we can tell you.

NSIS in my mind can do anything possible, so whatever you want to do is possible (from what you have wrote)
I have made installers that do far more that what you want, and they take me a very short time to make.

Modern UI comes with everything you need.

All you do is add the pages in whatever order you want, then add sections that contain you're files.

It couldn't be any simpler, unless NSIS was extremely basic, then it would be simpler, but NSIS does so much with so little coding.

-Stu


if some registry values already exist, I want to tell the user that they must uninstall the older version before installing this version...or, better yet, give them to option to uninstall the old version right
It is for this reason that you may want to use NSIS. I haven't found how to "read" a registry entry using Innosetup but truth be told I haven't looked hard, either.

Innosetup will create a basic uninstall I believe of everything you installed....including registry entries. I'm not 100% sure of this.

If I remember correctly, InnoSetup has a flag for each entry that tells it whether to remove the entry at uninstall time or not.


As far as the uninstaller is concerned...is it possible (without too much effort) to have NSIS uninstall in the two ways that I mentioned:

1) Tell the user that they must uninstall the older version first, or;

2) Give the user an option to uninstall the older version during the install of the newer version

Afrow UK, the problem is that I HAVEN'T decided what to use, yet. Although, I am beginning to lean towards NSIS because I want to know that I have that functionality...even though I might not need it now, it may be useful in the future. I would whole-heartedly move to NSIS now, but I'm kind of nervous about the ramp up time...although, there's probably ramp up time on any installer.

Let's put it this way, if I will be able to do #1 and/or #2 above, I will probably start diving into NSIS :)


Telling if an older version is installed depends on your program. If you have a registry key you can read it using ReadRegStr, if there's a file in the Windows directory you can open it and check, etc. But it's usually very easy to do. To execute the uninstaller all you need to do is find out where it is and use 'ExecWait "$INSTDIR\uninstall.exe" _?=$INSTDIR'. That extra _?= part is to make the uninstaller waitable (see the FAQ).

To make this an option use a MessageBox to ask the user if he wants to do it. This too is very simple, just a few lines of scripts.


Sweet!! Thanks for kichik and everyone else's input. I can see a use for both NSIS and INNO...but, as you've described to me...NSIS appears to be much more powerful! So.....you've sold me on NSIS!!!!! You'll probably be hearing from me on this message board in the near future ;)

Thanks again, ALL!!!


And he's now a senior member...howabout that :)

Dunno why I thought it was cool, but makes a change from the usual posts on here about basic stuff (e.g. all of my posts).


while inno is a worth easy to use staight-forward software installer used by many software vendors around, it is just an installer if this is all what you need. for my point of view nsis is a rich futured scripting language. you can use it to make flexible installers or you can step forward and manage a target computer the way you like. besides, diving inside nsis is an amazing experience.


Also
Yep, NSIS can almost make you coffee if you put a little time into learning it.

I'm not really replying to the original poster now, but mostly to those that may run across this thread in the future:

If all you want is a "simple" installer, and don't yet want to invest much time learning NSIS (although I'd say any time invested learning NSIS is worthwhile) - there is software out there that will help you simply create a basic NSIS installer with minimal effort, too :)

See: this page, listing a couple easy-to-use programs.


I'm new to NSIS and I learned it in 2 days (I really needed to get the installer out). I did everything with it, and it works well. One thing I'd like to add to anybody coming across this thread is that if you use an editor like HM NIS editor to generate a script before learning NSIS, it helps alot, and you can see where your input went in the script. That's how I learned so quick.


Same. After a couple of scripts being generated when I first started learning NSIS, I started getting the hang of it. Now I manage my own user interface, and two plugins that I have written. Check my Wiki profile for the list.


Command Line Compiler !!!

Don't know whether InnoSetup can do this, but one of the main reasons i chose NSIS for creating an installer was that it was possible to create the installer from command line. This made it possible for me to integrate setup creation to my build process which uses Apache ANT.

(The decision was made to use NSIS just three days back and i already have a working installer/script with all necessary functionality. Thanks mainly to information from this forum)


NSIS has a better Interface and supports 63 languages.
I can Extract Inno scripts from its setup file and compile it again and this item decrease the security Inno setups.


Inno doesn't support branding text. That is crazy.:mad:


while i've never used innosetup to create installers, i like it for coming with certain default features that make it more user-friendly (and that will hopefully be adapted by nsis at some point.)

for instance, innosetup installers have a set of commandline instructions to skip pages such as the finish page. sure, this can be done with nsis but only "by hand"


Originally posted by sethradio
Inno doesn't support branding text. That is crazy.:mad:
Inno installers do not HAVE a branding text to begin with... And it was never designed for complete modability.

Bring up such old topic is crazy!
Inno Setup is intended for simple and fast writing an installer.
User does not need special knowledge he can click-click-click to create full featured installer.

NSIS is more powerful and with plug-ins it has infinite possibilities because the power of it's scripting language.
With Inno you will probably stuck on some intermediate problem...