jackson_1
14 years agoFrequent Contributor
cannot get the file version correctly in windows xp
hi all,
i met a troubsome thing in my project, i create a routine to get the version of the specified execution file likes below, but i find it works well in windows 7 os and get empty value in windows xp, anybody know why does it this?
i met a troubsome thing in my project, i create a routine to get the version of the specified execution file likes below, but i find it works well in windows 7 os and get empty value in windows xp, anybody know why does it this?
function GetBuildVersion(AdhocBuild: string): string;
var
FileObj: OleVariant;
begin
FileObj: = Sys.OleObject['Scripting.FileSystemObject'];
Result: = VarToStr(FileObj.GetFileVersion(AdhocBuild));
end;
===================================
and i use another way to test it in windows xp,get the 'FileFullVersion' unknown name error message when run it, anyone meet this same error?
function GetBuildVersion(AdhocBuild: string): string;
var
FileObj,VerInfo: OleVariant;
begin
Result: = aqFileSystem.GetFileInfo(AdhocBuild).VersionInfo.FileFullVersion;
end;
anyone can help me?
thanks depth!!!