I have a msi file that installs the application. I need to know the product name of this application before starting the installation.
I tried the following:
{ ... Type type = Type.GetType("Windows.Installer"); WindowsInstaller.Installer installer = (WindowsInstaller.Installer) Activator.CreateInstance(type); installer.OpenDatabase(msiFile, 0); //this is my guess to pass in the msi file name... ... }
but now? The type is null, which generates an error. And where do I pass the MSI file name?
Thanks for any tips and comments.
source share