views:

56

answers:

3

I would like to create a C# program that creates an MSI based on a number of parameters. For example, based on user settings, certain files would be included, or runtime parameters set.

Can anyone point me towards any documentation that might help, or give me an idea where I might start with something like this?

+4  A: 

I would check out WiX. It has a pretty steep learning curve, but it will produce the msi as part of your project's build cycle.

mmr
+2  A: 

If you really want to do this in code you'll want to take a look at the Windows Installer API. However, Wix has built a nice managed tool set that will make authoring MSIs much easier using an XML language. They have also wrapped many of the Windows Installer APIs in managed wrappers, but to get the full power of Windows Installer you'll want to check out the API docs.

heavyd
+2  A: 

Check out WixSharp - a C# set of libraries which allows you to express your installation in C# code. This is then turned into a WiX (XML) file which in turns is compiled and linked to create a standard MSI (Windows Installer) file.

marc_s