Search code examples
wixwindows-installerinstallshield

Windows Installer : Which files are considered "versioned"


The windows installer documentation makes many references to "versioned" and "nonversioned" files (for example, see this or this). However, nowhere could I find which files are considered "versioned" or "nonversioned".

I know that PE-format files (eg., .dll and .exe files) are considered versioned, and the version is read from the VersionInfo resource embedded in these files.

What about other files, for example TTF font files? These files do have a version header which is recognized by windows (for example in fontview and windows explorer), but it is not the same as PE files.

How does msi determine whether a file is versioned or nonversioned? Based on the extension only? Or do it attempt to read known headers / resources? Are those supported extensions (or file formats) documented anywhere?


Solution

  • Windows Installer supports version information coming from PE versioninfo resources and TTF font headers. The extension isn't used. The MsiGetFileVersion function provides a public API to do the same version checking that MSI does internally.