Actually if it’s not asking too much could someone break down the names for each section? I may need to get the company name down the road for something different…
The regapp inspector simply returns a file object, so any properties of a file object will work identically.
From the Inspector help library:
The format of the string returned when casting a file using ‘as string’ is:
"" “” “” “” ""
Where:
The name of the file
The ‘Product Version’ of the file.
The value ‘FileDescription’ of version block 1 of the file.
The value ‘FileVersion’ of version block 1 of the file.
The value ‘CompanyName’ of version block 1 of the file.
q: value “FileDescription” of version block 1 of regapp “besconsole.exe”
One additional note is that for a file in DOS/Windows, the creator can add or omit the Version Block file, and any of the properties.
This is why when we right-click on a property of a file, sometimes a lot of info is not available.
Because of that, you need to do proper error checking to extract the info.
Here is an example:
(
name of it,
(if (exists product version of it) then (product version of it as string) else ("")),
(if (exists version block 1 of it and exists value "FileDescription" of version block 1 of it)
then (value "FileDescription" of version block 1 of it) else ("")),
(if (exists version block 1 of it and exists value "FileVersion" of version block 1 of it)
then (value "FileVersion" of version block 1 of it) else ("")),
(if (exists version block 1 of it and exists value "CompanyName" of version block 1 of it)
then (value "CompanyName" of version block 1 of it) else (""))
)
of regapps