pm_2 pm_2 - 2 months ago 17
C# Question

Programmatically building an MSI

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?

Answer Source

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.