share
Stack OverflowWhat is the best choice for building Windows installers?
[+138] [25] pc1oad1etter
[2008-08-06 17:54:26]
[ installer installation windows-installer setup ]
[ http://stackoverflow.com/questions/3767/what-is-the-best-choice-for-building-windows-installers ] [DELETED]

I have primarily used Visual Studio 2003, and its tool for building an installer was pretty painful. Files and folders had to be added manually, one by one. I am looking at upgrading to Visual Studio 2008, and I'm not sure what its installer is like.

Also, I'm interested in installers for non- .NET [1] applications.

Are there good, open source options? Is Visual Studio's installer any better in Visual Studio 2008?

(2) Closing, but not deleting this just creates false outdated information. - Benjamin Gruenbaum
(1) I completely agree with @BenjaminGruenbaum that closing but no deleting is creating outdated information. This question comes back as one of the top results in google via 'tools for creating an installer'. - Zenox
[+118] [2008-08-06 17:56:47] Michal Sznajder [ACCEPTED]

Have you seen InnoSetup [1]? This is general install engine. There is really nice front end to InnoSetup called IsTool [2]. I used it in old Delphi-days and it was superb.

WiX [3] plus its editor WiXEdit [4] seem to be the similar pair and look pretty powerful as noted below.

There is also NSIS [5] originally created by Nullsoft, the people who made Winamp. Now it is opened.

Ohloh [6] does not say which one is particularly better.

Some people suggest VS2008's ClickOnce [7] but seems to be not very good.

You can always look for a big list [8] on Wikipedia.

[1] http://www.jrsoftware.org/isinfo.php
[2] http://www.istool.org/
[3] http://wixtoolset.org/
[4] http://wixedit.sourceforge.net/
[5] http://nsis.sourceforge.net/Main_Page
[6] http://www.ohloh.net/projects/compare?metric=Activity&project_0=Windows+Installer+XML+%28WiX%29+toolset&project_1=Inno+Setup&project_2=Nullsoft+Scriptable+Install+System
[7] http://stackoverflow.com/questions/3544/what-is-the-best-way-to-deploy-a-vbnet-application
[8] http://en.wikipedia.org/wiki/List_of_installation_software

(2) Just to add to this, Votive integrates WiX into Visual Studio and is available from the WiX website. - OregonGhost
(12) Hmm..good collection of other answers but doesn't really help me to choose. - Luke
(4) I would recommend against tools for Windows that are not msi-based (the Windows Installer service). There are many features that make an installer and/or the installed version more robust and useful, e.g. resilience, elevated installs, deployment over ActiveDirectory, etc. - vividos
(1) Of course it's not always free (InstallShield etc.) and not as usable as one of the free alternatives (WiX without UI). - vividos
How does this answer the question? - Greg Dean
I just read question again and you are right. Technically speaking it does not answer this question. But people are happy with this answer. - Michal Sznajder
(2) @GregDean, there's no single answer which will be generally correct because everybody's needs differ. The best answer notes all of the possible choices and details the advantages and disadvantages of each, allowing you to make your own informed decision. I'll admit this answer falls a bit short of that ideal. - Mark Ransom
@vividos definitely agree with you about non msi-based installers being against recommendations. I'd go with industry standard compliant authoring tools like InstallShield or Advanced Installer. - EddieBytes
I checked the WiX licence terms, and they are very lax so perfect for corporations. however Inno has an intrisive license with no clarification about application to bundled works so it makes it unsuitable for a lot of businesses. - v.oddou
1
[+41] [2008-08-06 18:39:00] Jason Pratt

NSIS [1] is a fantastic open source, highly optimized, scriptable installer system.

It's the perfect installer system for programmers, because you create the installer using a powerful script rather than the bloated and unintuitive GUIs that most installer systems use.

It was originally created by Nullsoft, the people who made Winamp.

[1] http://nsis.sourceforge.net/

(1) I have had compatibility issues with NSIS. It was a great tool, but getting it to work with all the various plugins was a nightmare. - Tim
(4) The learning curve is perhaps the only stumbling block, but I too love NSIS. It'll only do what you tell it to do. The installers it cranks out are so much smaller & faster than InstallShield. And on top of that, it's been incredibly reliable for me. Just a small tip for those looking into it -- check out the HM NIS EDIT tool ( hmne.sourceforge.net ). It has a wizard built-in to make it easier when building your first NSIS installer script. - Steve Wortham
(2) It should be noted NSIS can also output .MSI's. - GONeale
(2) @GONeale: Really, and how? This SO thread says something else. - Paya
(2) Hmmm. I don't know. I don't know why I wrote that :) I think I stumbled across this at the time, which was lying helpdeskgeek.com/free-tools-review/… - GONeale
"bloated", "unintuituve". Spoken like a true system hacker. I'll wager one or both of those applies to your own code ;) Like it or not, putting lots of options on screen needs tends towards more screen space. Similarly, having notepad open and the script docs open also take a lot of screen space. - Gusdor
See also nisedit (hmne.sourceforge.net). It is a nice nsis script editor/ide and also has a super-easy wizard for making simple installers. - Curtis Yallop
2
[+29] [2008-08-06 18:11:12] Chris Marasti-Georg

You can also look into using WiX [1], which is pretty powerful, and not too tough with a good editor, like WiXEdit [2]. This tutorial [3] should help a great deal as well.

[1] http://wix.sourceforge.net/
[2] http://wixedit.sourceforge.net/
[3] http://www.tramontana.co.hu/wix/

3
[+26] [2008-08-12 19:03:35] Rob Hunter

To help keep everything straight, you basically have the option of a "Windows Installer" or a script-based installer.

With Windows Installer you use WiX, InstallShield, Wise Installation Studio, Orca, or Visual Studio to author a .msi database file which is then consumed by the Windows Installer service (msiexec) on the target PC.

Script-based installers are NSIS, classic InstallShield and Wise (and I am sure a bunch of others), that use a self contained script or executable to perform installation tasks (copy files, register things, make icons, etc).

Windows Installer editors usually make a basic installation easy to create, but many start to have issues when the support of Windows Installer starts to falter (checking for dependencies for example) or more complex tasks are desired (upgrading and patching tend to be a sore point). Often you will see a mix of native Windows Installer databases with embedded custom actions and wrapped with bootstrappers and/or chainers and/or dependency checks.


Inno Setup is also script-based. - Slappy
"and I am sure a bunch of others" - back in '08 when I answered this, I didn't use Inno Setup very often. It has since become my script-based installer of choice. - Rob Hunter
4
[+20] [2008-08-29 06:54:39] tsellon

WiX [1] is the best Windows Installer [2] based system that I've used. The learning curve is a little steeper than the Visual Studios install builder, but you get a lot more control of the final product. WiX provides access to all of the Windows Installer features, most of which are hidden when using Visual Studios. It's also easy to generate WiX definition files on the fly -- the source is all XML [3]. Build integration is also simple, since the tools are all command line driven.

I'd discourage using a script based installer, or a Windows installer one which relies too much on custom actions. One of the big advantages Windows Installer provides is a transactional approach to installation. Losing these rollback facilities by using XCOPY [4], or trying to roll your own transaction system, is a bad idea.

To get started with WiX, download the package from the SourceForge page. It comes with a couple of basic tutorials to get you started, but I would recommend working through Tramontána's tutorial [5].

[1] http://en.wikipedia.org/wiki/WiX
[2] http://en.wikipedia.org/wiki/Windows_Installer
[3] http://en.wikipedia.org/wiki/XML
[4] http://en.wikipedia.org/wiki/XCOPY
[5] http://www.tramontana.co.hu/wix/

(5) Windows installer based installers, like WiX, are also the only way to install certain things properly - such as registering DLLs to the GAC. Gacutil is not redistributable, and self registration methods on DLLs are inherently problematic if anything at all goes wrong. - Robert P
(5) The comment above is incorrect/outdated, Inno Setup can register DLLs to the GAC. - mlaan
5
[+18] [2008-08-07 01:50:05] saschabeaumont

I'm using Installshield - steep learning curve, steep price... so assuming you don't want to lay out a lot of cash (if any), I'd start with checking out Advanced Installer [1]. The free version is pretty damn easy to use, and they have a pro version for $500, which is pretty damn cheap in comparison to Installshield.

I've heard and seen good things about Nullsoft Installer [2] as well, but I've never tried it myself. YMMV.

[1] http://www.advancedinstaller.com/
[2] http://nsis.sourceforge.net

6
[+12] [2008-08-12 19:16:05] Jon Galloway

I love InnoSetup for simple installs. It just works, supports common scenarios like filetype associations, and has good support for upgrades (doesn't make you uninstall to upgrade, as MSI's do by default).

ClickOnce is good, providing that you have a server that will support it. It's great in an enterprise environment, but harder in the real world - especially if you're working on an open source project, since none of the hosting providers (even CodePlex!?!?) supports ClickOnce delivery. Another issue with ClickOnce is that it requires the .NET framework be installed, which is an issue for any .NET based install. The .NET 3.5 SP1 Client Install should hopefully change that, as it's "only" 24MB.


7
[+10] [2008-08-07 02:09:29] Chris Miller

The first thing you want to decide is do you want a Windows Installer based setup for your application or do you want to use any technology. If you do not need or want to do Windows Installer, there are bunch of free installer authoring tools. As mentioned above, NSIS [1] and InnoSetup [2] are both very good. There's a big list [3] on Wikipedia.

For Windows Installer based setups, the only free one that I know of is WIX [4]. It's pretty bare bones and you should have a good understanding of how Windows Installers are setup. For commercial authoring tools, there are a few. InstallShield [5] and Wise [6] have been around forever and a lot of people use them.

I use InstallAware [7], which was founded by some ex-InstallShield people. I found it to be very powerful and very flexible. Support was pretty good. I used to use Wise For Windows, but I was not happy with the quality or the support. Whatever tool that you choose, try to find one with an active user base. The other users will provide the most help for solving problems and helping with the learning curve.

[1] http://nsis.sourceforge.net/Main_Page
[2] http://www.jrsoftware.org/isinfo.php
[3] http://en.wikipedia.org/wiki/List_of_installation_software
[4] http://wix.sourceforge.net/
[5] http://www.acresso.com/products/installation/installshield.htm
[6] http://www.wisesolutions.com/
[7] http://www.installaware.com/

8
[+10] [2008-08-12 19:44:48] Chris Hanson

While I'm not a Windows developer, I would always use the platform vendor's native installation technology when possible. Otherwise, you run the risk of the platform vendor adding features that your installation system can't participate in. For example, Windows added the ability to roll back installs; I don't imagine it worked all that well with custom installers.

  • For Windows, I'd ship Windows Installer .msi packages. I expect Visual Studio includes something for creating these.
  • For Mac OS X, if I wasn't shipping a self-contained app for drag-and-drop install, I'd ship an Installer .pkg package. The Mac OS X developer tools include PackageMaker for creating these.
  • For Linux, I'd use whatever's native to my distribution. (rpm for RedHat-derived, apt for Debian-derived.)

The best user experience on a platform usually comes from using your platform vendor's native technologies, even when it comes to software installation.


9
[+8] [2008-10-23 06:47:38] john mcfadyen

Inno setup and NSIS do not cater for application sociability, they do not handle installation under locked down environments. they are procedural and only designed for low impact installations.

Prior to Windows Installer there was SMS installer which is very similar to NSIS and InnoSetup. Windows Installer advanced so much more advanced than you could ever get from a third party installer such as NSIS and Inno.

Here's some reasons why.

  1. sociability between applications is available with windows installer (none with the others)
  2. locked down installation supported (not with the others)
  3. multi platform support (limited with the others)
  4. enterprise friendly, (support teams can easily generate silent installations)
  5. a full secured installation platform
  6. user elevation / impersonation
  7. self healing
  8. user profile fix up
  9. widely adopted as the mainstream installer
  10. the list goes on and on but this is probably enough to steer you away from the others

If you care about your target clients in any way go the windows installer route.

Its harder to learn, its complex but on the other hand its enterprise ready.

if your target audience is a bunch of home users who are unlikely to care use the others. If not stick with the known entity.


In what ways is the Windows installer locked down? - pc1oad1etter
(1) I think the "locked down" means that you can install a msi file on a locked-down (LUA user) system when it doesn't write to system-only places like registry HKEY_LOCAL_MACHINE and such. Of course this feature can be disabled with a policy as well. - vividos
(2) The list of reasons above is incorrect/outdated for Inno Setup - mlaan
10
[+7] [2008-09-20 16:23:52] Lyman Enders Knowles

I'll second/third/fourth the kudos for Inno Setup. It's a scripted-type (not an MSI-type) system, but the basic scripts are written in a simple, clear declarative style, and one can get something up and running very quickly, yes, yes! I have used some commercial installer packages that didn't measure up at all.


(2) Agreed, I had used NSIS before, InnoSetup was a lot easier to use. - romkyns
11
[+4] [2009-02-06 18:33:15] Tim

I've used NSIS and Inno. I was not really happy with NSIS - the plugins and versions seemed to be incompatible and we had problems maintaining an installer.

One specific problem I remember having was dynamic setting of a version - perhaps they fixed this, but you had to go though all sorts of hoops to set the version info of your app and display it in your installer scripts.

I am happy with Inno, but note that the project that uses Inno is a lot simpler than the install for NSIS.

Inno is great.


12
[+3] [2008-08-06 17:58:24] Grant

It's relatively simple using VS2008's ClickOnce. ClickOnce sorta does all the work for you.

I asked over here [1] if there was anything better, and I got the response that although ClickOnce was not the most powerful, it was just about the easiest.

[1] http://stackoverflow.com/questions/3544/what-is-the-best-way-to-deploy-a-vbnet-application

13
[+3] [2008-08-12 19:14:40] Derek Park

My vote goes to NSIS [1], too. It's simple. It's free. There are numerous examples and lots of information on the web. You can try it out with very little time and no money, and see how you like it. It's also open-source since you said you would like that.

[1] http://nsis.sourceforge.net/

14
[+3] [2008-08-12 19:15:09] BlaM

I've been working with InnoSetup [1] for some years and am very happy with it. It's really easy to create simple "copy bunch of files to directories" and putting configs in the registry with InnoTool, but it's also possible to do more complicated things using a PASCAL based script language.

[1] http://www.jrsoftware.org/isinfo.php

15
[+3] [2008-08-23 02:51:14] Joshdan

One of the great features of Inno Setup is that it asks all the user questions before decompressing the payload. So you don't have to sit and wait for 5 minutes, answer 30 seconds worth of questions, and then wait another 5 minutes. Also, since it's not making two copies of all the data, the total time is actually lower, and you don't need as much extra free disk space.


16
[+3] [2010-07-14 09:09:48] Tomasz Grobelny

If you decide to use WiX and your application requires .NET Framework you might be interested in having a look at SharpSetup [1]. It builds on WiX but gives you the possibility to check for prerequisites before launching msi and create user interface of your installer in WinForms (.NET/C#). It also provides controls to interact with windows installer service, sample dialog templates and helper tool for adding files to your wix script. Ok, it's not open source (only free to use, both personal and commercial) and more targeted for .NET applications, but still I think that people looking for installer tool might be interested.

[1] http://sharpsetup.eu/

Are the dialog templates plain .NET forms or are they converted to Wix format? Does it work with 3.6? - Joel Rodgers
Main part of the installer is just a .NET application - there is no conversion to WiX format. Yes, SharpSetup works with WiX 3.6. - Tomasz Grobelny
17
[+2] [2008-12-15 08:47:28] Darkwoof

I've never had much luck with installers until I found NSIS. Somehow the scripting just appealed to me, and the examples started me off quickly. Before I knew it (within a week's time), I had an functioning installer that was a couple of thousands of lines long.

Utilising the ExperienceUI plugin made the installer look great without me having to do much more stuff.

One bad thing about NSIS, at least the last time I checked, was that it doesn't keep track of what was installed. So if you want to write a setup program that remembers installed components and allows your user to selectively choose parts to uninstall, you have to script that manually.


18
[+2] [2009-01-19 20:14:23] Rob Hunter

I am now experimenting with Windows Installer (WiX) msi files being run from an Inno Setup script.

Each .msi file would have it's own ARP entry and install a logical application package, with Inno Setup script logically chaining the prerequisites and coping optional files like sample data.

I am hoping this will integrate nicely into our automated build system.

Anybody have success with this approach or something similar?


19
[+1] [2008-09-25 20:09:38] Ben Griswold

I am a big Inno Setup fan. I would suggest playing around with the provided samples to get started.


20
[+1] [2009-05-27 18:21:19] Joshua

Speaking from experience, the best answer seems to be DON'T.

If you have the skills to build an installer by hand, do so. You'll be a lot happier in the long run.


(2) Hand built installers are not an ideal way to offer customers enterprise deployability, self healing apps, etc. As per advice above, you're generally better off going with an MSI-based installer (WiX, InstallAware, InstallShield, VS2008 Setup & deploy) than writing your own installer. - Mark
(1) @Mark, self-healing doesn't work. - Joshua
(1) Building an installer by hand is a complete waste of time. The amount of work that it takes to build an installer that will work across all the different Windows configuration is very difficult. You're better off biting the bullet and learning it or hand the work to a more experienced person. Finally, if I was evaluating software and it used a homemade installer, my first inclination is to assume the software is of poor quality. It would be akin to someone writing their own .NET class libraries. - Joel Rodgers
(1) @Joel Rodgers: I found MSI to be of absolutely atrocious quality. - Joshua
21
[0] [2008-08-12 19:37:57] Diago

For quick and simple installation I use Visual Studio's built in installers. For more complex installation and especially Mobile Apps I prefer NSIS. I did use Advanced Installer for a while but the power of NSIS and the open source nature of the product made it a more suitable choice.


(4) Can you believe MS yanked VS built-in installers from 2012? Why? The only reason I can surmise is that they don't want to hurt the third-party installer eco-system. - Joel Rodgers
22
[0] [2009-01-29 21:14:02] Damon Courtney

You should take a look at InstallJammer [1]. Not only is it free, it's cross-platform and very easy to use. Most common actions don't require any scripting at all, but with a powerful scripting language underneath the hood, you can make an install do just about anything you want.

If all you want is a basic installer to install your application, you can have it built in a matter of minutes from the first time you start it up. If you want something more powerful, the capabilities and documentation are excellent.

[1] http://www.installjammer.com/

seems to be no longer in production? - flamingpenguin
23
[0] [2009-09-30 17:57:09] Mark

After using WiX, NSIS and InstallAware, I have to humbly admit that they were all overkill for what I really need as a software developer. There are no projects that I've done so far which couldn't be deployed using the Visual Studio deployment project.

Is it limited? Yes.

It is also very simple to learn an use. Moreover, you actually can do really neat things like automatically create patches (.MSP files) by using techniques as described here [1]

I fully understand that you can't do everything inside of a Visual Studio setup project, but it's rather surprising what you can accomplish. It's free, it's easy and, frankly, for general use is a better option than spending endless hours learning WiX's mind-boggling XML (impressive as it is), or InstallAware's verbose scripts...

With VS Setup, it's drag'n'drop & build'n'deploy. Every other solution I've tried had set backs... they can't automatically detect your project output... or need special filters so as not to include unwanted outputs from the build.

My suggestion is thus: If you simply wish to get your project deployed, then learn:

  1. How to build a custom installer class, and
  2. How to author your own pre-requisite packages

These are both reasonably easy skills to master, and satisfy the needs of most developers.

[1] http://69.10.233.10/KB/install/dotnetpatching.aspx?fid=209224&df=90&mpp=25&noise=3&sort=Position&view=Quick

There is no Setup and Deployment project template in Visual Studio Express Edition. - Peter Lee
(1) They also removed it from all editions of VS 2012. - Joel Rodgers
24
[0] [2009-10-19 13:33:36] JoelHess

I've had experience with the VS Installer/Deployment packages, installield, and InstallAware, and have found Installaware to be a good compromise of ease of use and power.

Installshield has so much power, it's overkill for almost any straight application install.

The VS Package stuff is fine for very simple installs, but doesn't have a lot of options.

InstallAware has worked well for me. Their support staff has generally been helpful, and it's been able all my .net and native application/driver installs without too much hassle. It also has a decent dialog editor.


25