The $fverp function returns the product version of the file specified by path, as 4 decimal numbers separated by periods: a.b.c.d, from most to least significant. If path does not refer to a file, if the file does not exist, or if the file does not have a VERSIONINFO resource, the result is 0.0.0.0.
You can use the resulting version as-is, or compare it against another version with the $vercmp function. To retrieve the file's product version and compare it against a given version in a single operation, you can use the $fverpcmp function. To retrieve the file's file version instead of its product version, use the $fverf function.
All parameters may contain symbolic references; these are resolved before the function is applied. See Examples below.
- File path of the file whose product version must be retrieved.
Here are some usage examples for this function:
- Returns the Notepad.exe product version, for example 5.1.2600.2180 (for Windows XP).
- <$vercmp(<$fverp(<WindowsFolder>\Notepad.exe)>, 5)>
- Compares the Notepad.exe product version to 22.214.171.124 and returns a value < 0, 0, or > 0 depending on the result. You can achieve the same effect with less typing by using <$fverpcmp(<WindowsFolder>\Notepad.exe, 5)>.
- Returns the product version of the Tin.exe executable, assuming that Tin_alias is the file alias for that file.