How to create .msi installer with WiX

Good tutorial here:

http://wix.tramontana.co.hu/

http://www.codeproject.com/Tips/105638/A-quick-introduction-Create-an-MSI-installer-with

They should get you started.

If you learn something about the MSI log that will also help - install the MSI with a command line that includes /L*vx

And "doesn't install anything" should be easy to check - are there are any files installed, or did it create an entry in Programs&Features?


If you're using Visual Studio:

  1. Install the WiX Toolset V3 Visual Studio plugin.
  2. Install the Wax interactive editor.
  3. Build your project if you haven't already.
  4. Add a new project to the solution containing the project you want to create an installer for.
  5. Choose the template Setup Project for WiX v3.
  6. Name the installer. A personal convention is the name of the project plus ".Setup"
  7. A Product.wxs file will open up. Change the Manufacturer="" value to something like your company name or your name. Keep the file open.
  8. Go to Tools -> WiX Setup Editor
  9. On the left under Root Directory choose InstallFolder
  10. Under Projects to install, choose the project you want to install.
  11. In the red area to the right, you'll see a list of files. These are the output results of your build from step 3.
  12. Click the plus sign next to files you want to copy. They should turn white and change to a Resolved state.
  13. This might look daunting, but you're just telling it what to copy--which would be your project's executable, configs, dll libraries, and images it's dependent upon.
  14. You typically want to copy everything. If there are dll's you know you don't need, it's better to remove them as a dependency from the Visual Studio.
  15. Notice the Product.wxs has changed. It now has the files you checked off in the Setup Editor GUI added to the <Wix><Fragment><ComponentGroup> section. Save that file.
  16. Close the Setup Editor.
  17. Build the setup project you just configured.
  18. Open Windows explorer and go to that project's bin/Debug or bin/Release folder, depending on what mode you built in. There you'll see the .msi that you can copy to where you need.

To make an update, make the necessary changes and then change the version number in that project's Properties -> Application -> Assembly Information. Then also change it in Product.wxs <Wix><Product.Version>. Then just build your setup project again.