$fverp function
$fverp(path)
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.
Parameters
All parameters may contain symbolic references; these are resolved before the function is applied. See Examples below.
- path
- File path of the file whose product version must be retrieved.
Examples
Here are some usage examples for this function:
- <$fverp(<WindowsFolder>\Notepad.exe)>
- 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 5.0.0.0 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)>.
- <$fverp(<#Tin_alias>)>
- Returns the product version of the Tin.exe executable, assuming that Tin_alias is the file alias for that file.