views:

54

answers:

2

With a windows MSI file, is there a way to grab all the possible installation parameters in .NET code? I need to make a generic user interface to configure multiple MSI files not known until run-time – then install them together in one go.

+1  A: 

Windows Installer packages are database that can be easily reflected. WiX DTF has a Microsoft.Deployment.WindowsInstaller namespace with classes that can accomplish that. From there you just write your .NET code to handle all your requirements and just be very reflective/plug-in oriented in the way you do this.

There are some bootstrapper projects out there (CodePlex) that do this but use pre-generated XML files to describe the MSI's.

Christopher Painter
+1  A: 

As technically you can provide any public property on the command line, no. You could also update private properties using a MSI transform. You can enumerate existing properties (public or private), but there is no way of knowing what the installer itself does with them.

If you want to know how, download the Windows SDK. Included are a very large number of VBS scripts which show how to use the Windows Installer API. From there you can just use normal SQL, e.g. Select * from Properties

sascha
That's fine - I just want to know how to enumerate them. Any ideas?
Ben Breen