Determining Installer Type from Installer Binary

637 Views Asked by At

Is it possible to examine an existing installer and determine if it is a WIX / WISE / OtherTechnology installer?

2

There are 2 best solutions below

3
On

All files can be checked with Windows Explorer: Right-click » Properties then Verison or Details. It may not be conclusive. By default, Windows Installer packages built with WiX indicate that in a property viewable with Windows Explorer. For full access to Windows Installer packages, you can use Orca from the Windows SDK or InstMSI, among others. If there are custom action binaries, you can extract those (as DLLs) and check them, too. Custom actions may also use certain naming conventions for properties or custom tables. For example, WiX uses WIX_... for some property names. Similarly, Dialogs might have recognizable names or control layouts.

For executables, try CFF Explorer or UniExtractor. Also, the.exe /? might just tell you.

But, in general, there is no specification or practical requirement that an installer builder or runtime should be identifiable.

2
On

The Windows Installer spec covers this:

Creating Application Summary property

ORCA doesn't show this field for some reason but a quick snippet of code reveals it:

using Microsoft.Deployment.WindowsInstaller;
foreach (string file in Directory.GetFiles(@"C:\windows\installer", "*.msi", SearchOption.TopDirectoryOnly))
{
  using (Database database = new Database(file, DatabaseOpenMode.ReadOnly))
  {
    Console.WriteLine("{0} : {1}", database.ExecutePropertyQuery("ProductName"), database.SummaryInfo.CreatingApp);
  }                
}

Returns interesting results...