Getting the list of installed DLLs from an Microsoft Windows installer class
See the question and my original answer on StackOverflowWhat you can do is use the Windows Installer API to dump all the DLLs contained in a given MSI package.
In C#, there are various libraries or sample code available to do this.
Here, I will use the open source Wix toolset project's DLLs. So, you just need to download the binaries (not the wix installer), create a project and add references to Microsoft.Deployment.WindowsInstaller.dll
and Microsoft.Deployment.WindowsInstaller.Package.dl
l in this binaries directory
Here is a sample program that writes out all DLL files part of the package.
class Program
{
static void Main(string[] args)
{
string path = @"... myfile.msi";
using (InstallPackage package = new InstallPackage(path, DatabaseOpenMode.ReadOnly))
{
foreach (var kvp in package.Files.Where(f => Path.GetExtension(f.Value.TargetName) == ".dll"))
{
Console.WriteLine(kvp.Value.TargetName);
}
}
}
}
}