0

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?

ftherien
  • 153
  • 6
  • Adding as a comment since it is not a real answer. But here are a couple of links that might be relevant: [Fonts are special to install](https://stackoverflow.com/questions/30080832/how-do-i-disable-font-registration-in-an-installshield-2011-basic-msi-project/46918276#46918276) - see link for some details. And also, [Chris Painter's answer here](https://stackoverflow.com/questions/9312221/msi-version-numbers/9313229#9313229) - on version related issues. – Stein Åsmul Sep 08 '18 at 04:45

1 Answers1

2

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.

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47
  • Just want to add a link to the mentioned MSI API function: [**`MsiGetFileVersionW`**](https://learn.microsoft.com/en-us/windows/desktop/api/msi/nf-msi-msigetfileversionw). For the record, I ran a `*.ttf file` through the **`MsiGetFileVersionW function`** and it returns the expected version number (version also available in Windows Explorer Properties if you get a real `*.ttf file`, and not just the logical view from the `Fonts` folder). – Stein Åsmul Sep 08 '18 at 04:41