Forum > General
TFileVersionInfo.getVersionSetting dont work and VersionStrings.Values neither
(1/1)
amartitegui:
Hi Im working with fpc 3.0.2
trying to check version of installer exe file (inno setup).
but when I try
function.....:string;
var info:TFileVersionInfo;
begin
info := TFileVersionInfo.Create(nil);
info.fileName:=Filename;
info.ReadFileInfo;
return:=info.VersionStrings.Values['ProductVersion'];
info.free;
end;
error saying .exe doest have available that info:
EResourceReaderNotFoundException with message cannot find resource reader for extension '.exe'
and if I try
info.getVersionSetting ... well it looks likeit doesnot exist that function.
Anyone has a tip?
thanks and regards
jamie:
Please look at this persons reply code..
http://www.delphigroups.info/2/5/756976.html
P.S.
this is for windows...
amartitegui:
This particular case is for windows too. I'm gonna try .
Thanks jamie.
amartitegui:
solved. With a piece of code similar to the one you sent me.
http://lists.lazarus.freepascal.org/pipermail/lazarus/2013-November/214108.html
There is a Unit working great.
It's supposed to work not just in windows.
But just tested in windows
Nice code.
thanks guys
Navigation
[0] Message Index