I used to think that getting a file version in PowerShell was a fairly simple process:
PS> (Get-Item c:windowssystem32mshtml.dll).VersionInfo.FileVersion 11.00.9600.16410 (winblue_gdr.130923-1706)
There are two issues with that method, though:
1. That property can contain text along with the version
2. It turns out that in Windows Vista and higher, that property might not be coming from the file you think it is.
Issue #1 just means that the property is only good if you’re visually checking the version, or if no comparisons with other versions are necessary.
Issue #2 is the big one for me. What appears to be going on is that the FileVersion string is considered a non-fixed part of the version information, and it is pulled from the MUI resource file (if one exists). This file contains the language specific settings, and it looks like it only gets updated when the major or minor file version of…
View original post 743 more words