I'm trying to get some information from an msi file
I used:
Type installerType = Type.GetTypeFromProgID("WindowsInstaller.Installer");
object installerInstance = installerType.CreateInstance(installerType);
i'm well aware of the option to add reference to the file C:\windows\system32\msi.dll, and cast installerInstance to WindowsInstaller.Install, but since my application will run on many different operating systems (xp, 2003, vista, 7, 2008) and processors (x86 - x64), I want to dynamically use the instance.
Problem is that I can't reach the underlying "WindowsInstaller.Installer" type, only System.__ComObject methods are visible and executable.
How can I dynamically invoke methods, such as "OpenDatabase" etc... from the underlying object?