Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Wix and Visual Studio installer

I'm developing a Visual Studio application with WPF, but right now is the moment where I have to choose my installer.

I need my project to be able to write on the GAC and on registry, but I'm not sure if I should use Visual Studio installer or Wix... I can't find on Google information that says exactly the differences between both of them.

I found that Wix is more complete, but I can't find any article that specifies real differences between one or another...

Can anyone help me to find more specific information or to choose between both of them?

EDIT: Sorry, I specify:

I'm using Visual Studio 2010 professional.

like image 588
Sonhja Avatar asked Mar 07 '13 10:03

Sonhja


2 Answers

The end product is the same, a windows installer msi.

It's just different how you get there. With the old vdproj there wasn't much other than setting up files to be copied and registry keys as far as I remember. Anything else and you would have to create a custom action in C++ or VBS, not a particularly easy task if you are .net developer.

However with the advent of Wix there are a lot more in-built custom actions which enable you to create a rich installation experience and if you need to create your own custom action you can use .net. Also it is much easier to create a bootstrapper which can install dependencies along with your msi as well as being able to create a front-end in WPF.

As @nvoigt said the old vdproj type is not supported in VS2012 and it also cannot be built by a build server without doing some nasty setup (you have to install VS).

All in all there really should be no question of what to use, Wix is the way forward.

like image 150
caveman_dick Avatar answered Sep 20 '22 18:09

caveman_dick


Caveman_Dick wrote:

"Anything else and you would have to create a custom action".

And that in a nutshell is the difference. Visual Studio Deployment Projects heavily abstracts you from the underlying windows installer and seals away a great deal of it's ability. This goes against the very design of Windows Installer which is supposed to be a declarative, transactional programming model.

Take installing a Windows Service as an example? Windows Installer has the ServiceInstall table. VDPROJ fails to expose this so you are off writing brittle custom actions resulting in a less elegant and less robust installer.

WiX on the other hand is a very thin abstraction. It's all about XML XSD elements and attributes that represent the underlying Windows Installer table data. The build process simply transforms the XML to SQL tables. If MSI can do it, WiX can (99%) do it.

VDPROJ was a horrible mistake and Microsoft has finally owned up to it and killed it. Now WiX doesn't have UI designers ( I've written one on CodePlex though) so you might also want to consider InstallShield Limited Edition (FREE).

Using a combination of ISLE and WiX I can get the best of both worlds.

like image 29
Christopher Painter Avatar answered Sep 19 '22 18:09

Christopher Painter