I suppose it's better to parse EXE object table correctly. IMHO it's better than scanning through all undetermined content of other code and data object sections. Here is an example just to show how to get file version from exe or dll files. All files I tested answers version correctly.

NOTE: THIS IS AN EXAMPLE. THERE IS NO ERROR CHECKING, IT IS NOT OPTIMIZED AND IT IS INCOMPLETE but it works :)

USE IT AT YOUR OWN RISK. Sorry for my English. My Russian is much better :)

The get* procs represent a programatic interface to the information. The read* procs output this information in a nice human readable format. The *2 procs exist because there are 2 slightly different types of files, the newer ones are unicode.

getFixedInfo returns array with the fixed file info

getFixedInfo2 returns array with the fixed file info

getStringInfo returns array with the string file info

getStringInfo2 returns array with the string file info

readFixedInfo prints the formatted/decoded fixed file info

readStringInfo prints the formatted/decoded string file info

writeStringInfo writes the info in an array to a files string file info

Vince adds - this is great! I particularly like the code to adjust the version/name/etc of a tclkit. I do notice, however, that there seem to be two different 'File version' fields, one of which I can set, but the other of which I can't. Is that true?

AF replies - windows will display the fixedfileinfo version string if it exists instead of the stringfileinfo version string.

27jan04 jcw - If someone is interested in creating a command-line wrapper (at least for the key items), I'd be delighted to include it in the SDX utility to make it easier for developers to adjust it (see [1]).