To make it short, I was writing a part of a login script in vbs which collects some version information on some “critical” software, and I was a bit suprised when I saw, that “getfileversion” returns 0.0.0.0 for Cisco Systems VPN Client files (such as ipsecdialer.exe). In this case, this happens, because the data part of it’s VS_FIXEDFILEINFO is not filled out properly (at all), …
… thus you can only rely on the “text based” stringfileinfo’s productfile information.
I was looking for several hours to find a method to obtain those parts with some simple commands or script, but all I could find referred to Visual Basic (not VB Script) or C.
“When I was young”, I wrote an assembly program (version.com on this page) to read data from VS_FIXEDFILEINFO, so I knew that implement it from the scratch would take some time, so I searched along…
Then I found an excellent site with excellent scripts, such what I needed: http://www.jsware.net/jsware/scripts.php3#fvinfo
Even more, I found some “comments” which I couldn’t even find it on Microsoft’s site:
“Normally there is no VBScript method to return the information that shows when a file is right-clicked, then “Properties” is clicked, and the “Version” tab is selected.”
I mean: Come on, Microsoft!?! Sometimes documenting that something cannot be done is better than nothing, at least I wouldn’t try to look for an “all-in-one” vbs command for it.
The script is neatly written and does the job. However, after some consideration, I decided not to put another 16K into the login script (tripling its size) just for read one screwed up application’s version number, I will just rely on the DisplayName value of the registry’s relevant uninstall key’s “DisplayName”, it is currently “Cisco Systems VPN Client 4.8.00.0440” on my system, so extracting the version number out of it would do the job.
Anyway, hats off to JSWare for creating and publishing such a brilliant code sample for obtaining version info from the VS_FIXEDFILEINFO resource.